dismiss warning when loading theme

This commit is contained in:
Henry Jameson 2020-01-22 01:28:05 +02:00
parent 1191207aa5
commit 803edcb53a
2 changed files with 3 additions and 1 deletions

View file

@ -162,7 +162,7 @@ export default {
} else if (origin === 'localStorage') { } else if (origin === 'localStorage') {
// FE upgraded from v2 // FE upgraded from v2
if (themeEngineVersion === 2) { if (themeEngineVersion === 2) {
return 'upgraded_from_v2' return t(pre + 'upgraded_from_v2')
} }
// Admin downgraded FE // Admin downgraded FE
if (themeEngineVersion > CURRENT_VERSION) { if (themeEngineVersion > CURRENT_VERSION) {
@ -426,6 +426,7 @@ export default {
this.onImport(this.tempImportFile, true) this.onImport(this.tempImportFile, true)
break break
} }
this.dismissWarning()
}, },
loadThemeFromLocalStorage (confirmLoadSource = false) { loadThemeFromLocalStorage (confirmLoadSource = false) {
const { const {

View file

@ -399,6 +399,7 @@
"load_theme": "Load theme", "load_theme": "Load theme",
"use_snapshot": "Keep as is", "use_snapshot": "Keep as is",
"help": { "help": {
"upgraded_from_v2": "PleromaFE has been upgraded, theme could look a little bit different than you remember.",
"v2_imported": "File you imported was made for older FE. We try to maximize compatibility but there still could be inconsitencies.", "v2_imported": "File you imported was made for older FE. We try to maximize compatibility but there still could be inconsitencies.",
"future_version_imported": "File you imported was made in newer version of FE.", "future_version_imported": "File you imported was made in newer version of FE.",
"older_version_imported": "File you imported was made in older version of FE.", "older_version_imported": "File you imported was made in older version of FE.",