mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-12-25 09:03:08 +02:00
Merge pull request #2512 from Hiramiya/avatarbannerfiletypes
Fix linting errors
This commit is contained in:
commit
02341ceb6e
2 changed files with 9 additions and 10 deletions
|
@ -7,7 +7,7 @@ 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%',
|
||||||
|
@ -16,7 +16,7 @@ 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, {
|
||||||
|
|
|
@ -7,8 +7,7 @@ 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%',
|
||||||
|
@ -17,7 +16,7 @@ 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, {
|
||||||
|
|
Loading…
Reference in a new issue