summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2018-08-28 18:08:22 +0900
committerGitHub <noreply@github.com>2018-08-28 18:08:22 +0900
commit02341ceb6ee55e15e5a791796e9f90d5dc633c0b (patch)
tree0b9a277160436ca68869d93b795f82067769d908 /src
parentMerge pull request #2484 from syuilo/greenkeeper/nan-2.11.0 (diff)
parentFix linting errors (diff)
downloadsharkey-02341ceb6ee55e15e5a791796e9f90d5dc633c0b.tar.gz
sharkey-02341ceb6ee55e15e5a791796e9f90d5dc633c0b.tar.bz2
sharkey-02341ceb6ee55e15e5a791796e9f90d5dc633c0b.zip
Merge pull request #2512 from Hiramiya/avatarbannerfiletypes
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%',