cleanup & debug
This commit is contained in:
parent
ed9e9a3877
commit
e0d9a71322
4 changed files with 6 additions and 4 deletions
|
|
@ -174,7 +174,6 @@ const setSettings = async ({ apiConfig, staticConfig, store }) => {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
console.log(config)
|
|
||||||
|
|
||||||
const copyInstancePrefOption = (path) => {
|
const copyInstancePrefOption = (path) => {
|
||||||
if (get(config, path) !== undefined) {
|
if (get(config, path) !== undefined) {
|
||||||
|
|
@ -473,7 +472,7 @@ const setConfig = async ({ store }) => {
|
||||||
const checkOAuthToken = async ({ store }) => {
|
const checkOAuthToken = async ({ store }) => {
|
||||||
const oauth = useOAuthStore()
|
const oauth = useOAuthStore()
|
||||||
if (oauth.userToken) {
|
if (oauth.userToken) {
|
||||||
return store.dispatch('loginUser', oauth.getUserToken)
|
return store.dispatch('loginUser', oauth.userToken)
|
||||||
}
|
}
|
||||||
return Promise.resolve()
|
return Promise.resolve()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,8 @@ import apiService, {
|
||||||
import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js'
|
import notificationsFetcher from '../notifications_fetcher/notifications_fetcher.service.js'
|
||||||
import timelineFetcher from '../timeline_fetcher/timeline_fetcher.service.js'
|
import timelineFetcher from '../timeline_fetcher/timeline_fetcher.service.js'
|
||||||
|
|
||||||
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
||||||
const backendInteractorService = (credentials) => ({
|
const backendInteractorService = (credentials) => ({
|
||||||
startFetchingTimeline({
|
startFetchingTimeline({
|
||||||
timeline,
|
timeline,
|
||||||
|
|
@ -55,7 +57,7 @@ const backendInteractorService = (credentials) => ({
|
||||||
},
|
},
|
||||||
|
|
||||||
startUserSocket({ store }) {
|
startUserSocket({ store }) {
|
||||||
const serv = store.rootState.instance.server.replace('http', 'ws')
|
const serv = useInstanceStore().server.replace('http', 'ws')
|
||||||
const url = getMastodonSocketURI({}, serv)
|
const url = getMastodonSocketURI({}, serv)
|
||||||
return ProcessedWS({ url, id: 'Unified', credentials })
|
return ProcessedWS({ url, id: 'Unified', credentials })
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@ export const useI18nStore = defineStore('i18n', {
|
||||||
const value =
|
const value =
|
||||||
originalValue || useSyncConfigStore().mergedConfig.interfaceLanguage
|
originalValue || useSyncConfigStore().mergedConfig.interfaceLanguage
|
||||||
|
|
||||||
console.log(useSyncConfigStore().mergedConfig)
|
|
||||||
messages.setLanguage(this.i18n, value)
|
messages.setLanguage(this.i18n, value)
|
||||||
useEmojiStore().loadUnicodeEmojiData(value)
|
useEmojiStore().loadUnicodeEmojiData(value)
|
||||||
Cookies.set(
|
Cookies.set(
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ import { storage } from 'src/lib/storage.js'
|
||||||
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
import { parseNotification } from 'src/services/entity_normalizer/entity_normalizer.service.js'
|
||||||
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
import { prepareNotificationObject } from 'src/services/notification_utils/notification_utils.js'
|
||||||
import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js'
|
import { cacheKey, emojiCacheKey, shouldCache } from 'src/services/sw/sw.js'
|
||||||
|
import { useInstanceStore } from 'src/stores/instance.js'
|
||||||
|
|
||||||
// Collects all messages for service workers
|
// Collects all messages for service workers
|
||||||
// Needed because service workers cannot use dynamic imports
|
// Needed because service workers cannot use dynamic imports
|
||||||
|
|
@ -38,6 +39,7 @@ function getWindowClients() {
|
||||||
const setSettings = async () => {
|
const setSettings = async () => {
|
||||||
const vuexState = await storage.getItem('vuex-lz')
|
const vuexState = await storage.getItem('vuex-lz')
|
||||||
const locale = useSyncConfigStore().mergedConfig.interfaceLanguage || 'en'
|
const locale = useSyncConfigStore().mergedConfig.interfaceLanguage || 'en'
|
||||||
|
console.log('LOCALE', locale)
|
||||||
i18n.locale = locale
|
i18n.locale = locale
|
||||||
const notificationsNativeArray = Object.entries(
|
const notificationsNativeArray = Object.entries(
|
||||||
vuexState.config.notificationNative,
|
vuexState.config.notificationNative,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue