rollback language.js
This reverts commit 37d0a6d3f1b277f4470618a249dca77f14c8c11f.
This commit is contained in:
parent
0e84cffa41
commit
2c4cb8a67a
2 changed files with 1 additions and 15 deletions
|
|
@ -1,14 +0,0 @@
|
||||||
import { useI18nStore } from 'src/stores/i18n.js'
|
|
||||||
|
|
||||||
export const piniaLanguagePlugin = ({ store, options }) => {
|
|
||||||
if (store.$id === 'sync_config') {
|
|
||||||
store.$onAction(({ name, args }) => {
|
|
||||||
if (name === 'setPreference') {
|
|
||||||
const { path, value } = args[0]
|
|
||||||
if (path === 'simple.interfaceLanguage') {
|
|
||||||
useI18nStore().setLanguage(value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -10,7 +10,7 @@ const simpleDeclaration = {
|
||||||
store: 'server-side',
|
store: 'server-side',
|
||||||
migrationFlag: 'configMigration',
|
migrationFlag: 'configMigration',
|
||||||
migration(serverside, rootState) {
|
migration(serverside, rootState) {
|
||||||
serverside.setPreference({ path: 'simple.' + field, value: rootState.config[oldField ?? field] })
|
serverside.setPreference({ path: 'simple.' + field, value: ootState.config[oldField ?? field] })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue