summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNasha Hiramiya <git@hiramiya.me>2018-08-28 09:44:49 +0100
committerNasha Hiramiya <git@hiramiya.me>2018-08-28 09:44:49 +0100
commit3dcdd7a5d7f873f1e31de49c8199d0aea3e97996 (patch)
tree667790b768af87a8b9e4e1ca65cc5ab1131d6419 /src
parentAdd "invalid-filetype" translation (diff)
downloadsharkey-3dcdd7a5d7f873f1e31de49c8199d0aea3e97996.tar.gz
sharkey-3dcdd7a5d7f873f1e31de49c8199d0aea3e97996.tar.bz2
sharkey-3dcdd7a5d7f873f1e31de49c8199d0aea3e97996.zip
Fix linting errors
Diffstat (limited to 'src')
-rw-r--r--src/client/app/desktop/api/update-avatar.ts10
-rw-r--r--src/client/app/desktop/api/update-banner.ts9
2 files changed, 9 insertions, 10 deletions
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts
index f07dc623f2..e9d92d1eb1 100644
--- a/src/client/app/desktop/api/update-avatar.ts
+++ b/src/client/app/desktop/api/update-avatar.ts
@@ -6,9 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue';
export default (os: OS) => {
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({
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
text: null,
@@ -16,9 +16,9 @@ export default (os: OS) => {
text: '%i18n:common.got-it%'
}]
});
- reject
+ reject();
}
-
+
const w = os.new(CropWindow, {
image: file,
title: '%i18n:desktop.avatar-crop-title%',
diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts
index 5af6ea88d2..e8fa35149b 100644
--- a/src/client/app/desktop/api/update-banner.ts
+++ b/src/client/app/desktop/api/update-banner.ts
@@ -6,10 +6,9 @@ import ProgressDialog from '../views/components/progress-dialog.vue';
export default (os: OS) => {
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({
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
text: null,
@@ -17,9 +16,9 @@ export default (os: OS) => {
text: '%i18n:common.got-it%'
}]
});
- reject
+ reject();
}
-
+
const w = os.new(CropWindow, {
image: file,
title: '%i18n:desktop.banner-crop-title%',