forked from FoundKeyGang/FoundKey
Fix linting errors
This commit is contained in:
parent
14ad3af30d
commit
3dcdd7a5d7
2 changed files with 9 additions and 10 deletions
|
@ -6,9 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
export default (os: OS) => {
|
export default (os: OS) => {
|
||||||
|
|
||||||
const cropImage = file => new Promise((resolve, reject) => {
|
const cropImage = file => new Promise((resolve, reject) => {
|
||||||
|
|
||||||
var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$')
|
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
|
||||||
if(!regex.test(file.name) ) {
|
if (!regex.test(file.name) ) {
|
||||||
os.apis.dialog({
|
os.apis.dialog({
|
||||||
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
||||||
text: null,
|
text: null,
|
||||||
|
@ -16,9 +16,9 @@ export default (os: OS) => {
|
||||||
text: '%i18n:common.got-it%'
|
text: '%i18n:common.got-it%'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
reject
|
reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
const w = os.new(CropWindow, {
|
const w = os.new(CropWindow, {
|
||||||
image: file,
|
image: file,
|
||||||
title: '%i18n:desktop.avatar-crop-title%',
|
title: '%i18n:desktop.avatar-crop-title%',
|
||||||
|
|
|
@ -6,10 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue';
|
||||||
export default (os: OS) => {
|
export default (os: OS) => {
|
||||||
|
|
||||||
const cropImage = file => new Promise((resolve, reject) => {
|
const cropImage = file => new Promise((resolve, reject) => {
|
||||||
|
|
||||||
var regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$')
|
|
||||||
|
|
||||||
if(!regex.test(file.name) ) {
|
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
|
||||||
|
if (!regex.test(file.name) ) {
|
||||||
os.apis.dialog({
|
os.apis.dialog({
|
||||||
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
||||||
text: null,
|
text: null,
|
||||||
|
@ -17,9 +16,9 @@ export default (os: OS) => {
|
||||||
text: '%i18n:common.got-it%'
|
text: '%i18n:common.got-it%'
|
||||||
}]
|
}]
|
||||||
});
|
});
|
||||||
reject
|
reject();
|
||||||
}
|
}
|
||||||
|
|
||||||
const w = os.new(CropWindow, {
|
const w = os.new(CropWindow, {
|
||||||
image: file,
|
image: file,
|
||||||
title: '%i18n:desktop.banner-crop-title%',
|
title: '%i18n:desktop.banner-crop-title%',
|
||||||
|
|
Loading…
Reference in a new issue