Refactor: rename alert to dialog
This commit is contained in:
@@ -78,7 +78,7 @@ export default Vue.extend({
|
||||
this.$root.api('i/pin', {
|
||||
noteId: this.note.id
|
||||
}).then(() => {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
});
|
||||
@@ -95,7 +95,7 @@ export default Vue.extend({
|
||||
},
|
||||
|
||||
del() {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('delete-confirm'),
|
||||
showCancelButton: true
|
||||
@@ -114,7 +114,7 @@ export default Vue.extend({
|
||||
this.$root.api('notes/favorites/create', {
|
||||
noteId: this.note.id
|
||||
}).then(() => {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
});
|
||||
@@ -126,7 +126,7 @@ export default Vue.extend({
|
||||
this.$root.api('notes/favorites/delete', {
|
||||
noteId: this.note.id
|
||||
}).then(() => {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
splash: true
|
||||
});
|
||||
|
@@ -25,7 +25,7 @@ export default Vue.extend({
|
||||
type: 'password'
|
||||
}).then(newPassword2 => {
|
||||
if (newPassword !== newPassword2) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
title: null,
|
||||
text: this.$t('not-match')
|
||||
});
|
||||
|
@@ -213,7 +213,7 @@ export default Vue.extend({
|
||||
this.$store.state.i.bannerUrl = i.bannerUrl;
|
||||
|
||||
if (notify) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('saved')
|
||||
});
|
||||
|
@@ -223,7 +223,7 @@ export default Vue.extend({
|
||||
try {
|
||||
theme = JSON5.parse(code);
|
||||
} catch (e) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
text: this.$t('invalid-theme')
|
||||
});
|
||||
@@ -236,7 +236,7 @@ export default Vue.extend({
|
||||
}
|
||||
|
||||
if (theme.id == null) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'error',
|
||||
text: this.$t('invalid-theme')
|
||||
});
|
||||
@@ -244,7 +244,7 @@ export default Vue.extend({
|
||||
}
|
||||
|
||||
if (this.$store.state.device.themes.some(t => t.id == theme.id)) {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'info',
|
||||
text: this.$t('already-installed')
|
||||
});
|
||||
@@ -256,7 +256,7 @@ export default Vue.extend({
|
||||
key: 'themes', value: themes
|
||||
});
|
||||
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('installed').replace('{}', theme.name)
|
||||
});
|
||||
@@ -269,7 +269,7 @@ export default Vue.extend({
|
||||
key: 'themes', value: themes
|
||||
});
|
||||
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'info',
|
||||
text: this.$t('uninstalled').replace('{}', theme.name)
|
||||
});
|
||||
@@ -306,7 +306,7 @@ export default Vue.extend({
|
||||
const theme = this.myTheme;
|
||||
|
||||
if (theme.name == null || theme.name.trim() == '') {
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'warning',
|
||||
text: this.$t('theme-name-required')
|
||||
});
|
||||
@@ -320,7 +320,7 @@ export default Vue.extend({
|
||||
key: 'themes', value: themes
|
||||
});
|
||||
|
||||
this.$root.alert({
|
||||
this.$root.dialog({
|
||||
type: 'success',
|
||||
text: this.$t('saved')
|
||||
});
|
||||
|
Reference in New Issue
Block a user