summaryrefslogtreecommitdiff
path: root/src/client/app/desktop/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-11-14 16:30:58 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-11-14 16:30:58 +0900
commit11afa8140c5706c8ad105e50cef63df83db66e7a (patch)
treed7e322dab3dc20f9ba86681dd7b2354af922fdda /src/client/app/desktop/api
parent[Client] Add missing icons (diff)
downloadsharkey-11afa8140c5706c8ad105e50cef63df83db66e7a.tar.gz
sharkey-11afa8140c5706c8ad105e50cef63df83db66e7a.tar.bz2
sharkey-11afa8140c5706c8ad105e50cef63df83db66e7a.zip
[Client] Improve alert component
Diffstat (limited to 'src/client/app/desktop/api')
-rw-r--r--src/client/app/desktop/api/update-avatar.ts14
-rw-r--r--src/client/app/desktop/api/update-banner.ts12
2 files changed, 7 insertions, 19 deletions
diff --git a/src/client/app/desktop/api/update-avatar.ts b/src/client/app/desktop/api/update-avatar.ts
index ae8b723ea6..e0215aa34f 100644
--- a/src/client/app/desktop/api/update-avatar.ts
+++ b/src/client/app/desktop/api/update-avatar.ts
@@ -8,12 +8,9 @@ export default ($root: any) => {
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
if (!regex.test(file.name) ) {
- $root.$dialog({
+ $root.alert({
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
- text: null,
- actions: [{
- text: '%i18n:common.got-it%'
- }]
+ text: null
});
return reject('invalid-filetype');
}
@@ -90,12 +87,9 @@ export default ($root: any) => {
value: i.avatarUrl
});
- $root.$dialog({
+ $root.alert({
title: '%fa:info-circle% %i18n:desktop.avatar-updated%',
- text: null,
- actions: [{
- text: '%i18n:common.got-it%'
- }]
+ text: null
});
return i;
diff --git a/src/client/app/desktop/api/update-banner.ts b/src/client/app/desktop/api/update-banner.ts
index c338d4e95c..36582684ec 100644
--- a/src/client/app/desktop/api/update-banner.ts
+++ b/src/client/app/desktop/api/update-banner.ts
@@ -10,10 +10,7 @@ export default ($root: any) => {
if (!regex.test(file.name) ) {
$root.dialog({
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
- text: null,
- actions: [{
- text: '%i18n:common.got-it%'
- }]
+ text: null
});
return reject('invalid-filetype');
}
@@ -90,12 +87,9 @@ export default ($root: any) => {
value: i.bannerUrl
});
- $root.$dialog({
+ $root.alert({
title: '%fa:info-circle% %i18n:desktop.banner-updated%',
- text: null,
- actions: [{
- text: '%i18n:common.got-it%'
- }]
+ text: null
});
return i;