Refactor: rename alert to dialog
This commit is contained in:
@ -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