Refactor: rename alert to dialog
This commit is contained in:
parent
bb14895fd8
commit
c9ac9923df
27 changed files with 66 additions and 66 deletions
|
|
@ -8,7 +8,7 @@ export default ($root: any) => {
|
|||
|
||||
const regex = RegExp('\.(jpg|jpeg|png|gif|webp|bmp|tiff)$');
|
||||
if (!regex.test(file.name) ) {
|
||||
$root.alert({
|
||||
$root.dialog({
|
||||
title: '%fa:info-circle% %i18n:desktop.invalid-filetype%',
|
||||
text: null
|
||||
});
|
||||
|
|
@ -87,7 +87,7 @@ export default ($root: any) => {
|
|||
value: i.avatarUrl
|
||||
});
|
||||
|
||||
$root.alert({
|
||||
$root.dialog({
|
||||
title: '%fa:info-circle% %i18n:desktop.avatar-updated%',
|
||||
text: null
|
||||
});
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ export default ($root: any) => {
|
|||
value: i.bannerUrl
|
||||
});
|
||||
|
||||
$root.alert({
|
||||
$root.dialog({
|
||||
title: '%fa:info-circle% %i18n:desktop.banner-updated%',
|
||||
text: null
|
||||
});
|
||||
|
|
|
|||
|
|
@ -170,7 +170,7 @@ export default Vue.extend({
|
|||
|
||||
copyUrl() {
|
||||
copyToClipboard(this.file.url);
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('contextmenu.copied'),
|
||||
text: this.$t('contextmenu.copied-url-to-clipboard')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ export default Vue.extend({
|
|||
}).catch(err => {
|
||||
switch (err) {
|
||||
case 'detected-circular-definition':
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('unable-to-process'),
|
||||
text: this.$t('circular-reference-detected')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -313,7 +313,7 @@ export default Vue.extend({
|
|||
}).catch(err => {
|
||||
switch (err) {
|
||||
case 'detected-circular-definition':
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('unable-to-process'),
|
||||
text: this.$t('circular-reference-detected')
|
||||
});
|
||||
|
|
@ -340,7 +340,7 @@ export default Vue.extend({
|
|||
folderId: this.folder ? this.folder.id : undefined
|
||||
});
|
||||
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('url-upload-requested'),
|
||||
text: this.$t('may-take-time')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -186,7 +186,7 @@ export default Vue.extend({
|
|||
|
||||
methods: {
|
||||
hint() {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('@.customization-tips.title'),
|
||||
text: this.$t('@.customization-tips.paragraph')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -596,12 +596,12 @@ export default Vue.extend({
|
|||
this.checkingForUpdate = false;
|
||||
this.latestVersion = newer;
|
||||
if (newer == null) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('no-updates'),
|
||||
text: this.$t('no-updates-desc')
|
||||
});
|
||||
} else {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('update-available'),
|
||||
text: this.$t('update-available-desc')
|
||||
});
|
||||
|
|
@ -610,7 +610,7 @@ export default Vue.extend({
|
|||
},
|
||||
clean() {
|
||||
localStorage.clear();
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: this.$t('cache-cleared'),
|
||||
text: this.$t('cache-cleared-desc')
|
||||
});
|
||||
|
|
|
|||
|
|
@ -307,7 +307,7 @@ export default Vue.extend({
|
|||
listId: list.id,
|
||||
userId: this.user.id
|
||||
});
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
});
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ export default Vue.extend({
|
|||
},
|
||||
|
||||
block() {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('block-confirm'),
|
||||
showCancelButton: true
|
||||
|
|
@ -108,7 +108,7 @@ export default Vue.extend({
|
|||
listId: list.id,
|
||||
userId: this.user.id
|
||||
});
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
title: 'Done!',
|
||||
text: this.$t('list-pushed', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue