fix: prefix locales path with assetBase so fetch resolves correctly
This commit is contained in:
@@ -181,8 +181,12 @@ export const useGameStore = defineStore('game', () => {
|
||||
visitedSceneIds.value = new Set(visitedSceneIds.value)
|
||||
}
|
||||
|
||||
function setStoryLocales(locales: LocalesConfig | undefined) {
|
||||
if (locales) storyLocales.value = locales
|
||||
function setStoryLocales(locales: LocalesConfig | undefined, assetBase?: string) {
|
||||
if (locales) {
|
||||
const base = (assetBase || '')
|
||||
const p = locales.path.startsWith('/') || locales.path.startsWith('http') ? locales.path : base + locales.path
|
||||
storyLocales.value = { ...locales, path: p }
|
||||
}
|
||||
}
|
||||
|
||||
function setSubFontSize(v: number) { subFontSize.value = v; localStorage.setItem('subFontSize', String(v)) }
|
||||
|
||||
Reference in New Issue
Block a user