Fix localStorage usage

This commit is contained in:
Andrew Bastin
2021-06-21 00:27:45 -04:00
parent 257e2db651
commit f4f29b8520
10 changed files with 81 additions and 38 deletions

View File

@@ -14,7 +14,10 @@
</template>
<script>
import { setupLocalPersistence } from "~/newstore/localpersistence"
import {
setupLocalPersistence,
getLocalConfig,
} from "~/newstore/localpersistence"
import { performMigrations } from "~/helpers/migrations"
import { initUserInfo } from "~/helpers/teams/BackendUserInfo"
import { registerApolloAuthUpdate } from "~/helpers/apollo"
@@ -24,7 +27,7 @@ export default {
beforeMount() {
registerApolloAuthUpdate()
const color = localStorage.getItem("THEME_COLOR") || "green"
const color = getLocalConfig("THEME_COLOR") || "green"
document.documentElement.setAttribute("data-accent", color)
},
async mounted() {

View File

@@ -39,9 +39,6 @@ export default {
},
}
},
beforeMount() {
initializeFirebase()
},
computed: {
statusCode() {
return (this.error && this.error.statusCode) || 500
@@ -50,6 +47,9 @@ export default {
return this.error.message || this.$t("something_went_wrong")
},
},
beforeMount() {
initializeFirebase()
},
methods: {
reloadApplication() {