fix: layout preview not working with a non-default baseurl
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
307969ffe5
commit
395dd6cf9b
1 changed files with 5 additions and 3 deletions
|
@ -34,7 +34,8 @@
|
||||||
<span class="theme-title" :style="{color:`${layout.complementaryColor}`}">
|
<span class="theme-title" :style="{color:`${layout.complementaryColor}`}">
|
||||||
{{ layout.displayName }}
|
{{ layout.displayName }}
|
||||||
</span>
|
</span>
|
||||||
<NuxtImg class="layout-preview" :src="layout.previewImageUrl"></NuxtImg>
|
<!-- this breaks if it's a nuxtimg, i don't know why -->
|
||||||
|
<img class="layout-preview" :src="layout.previewImageUrl"></img>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -60,8 +61,8 @@ import { settingSave, settingsLoad } from '#imports';
|
||||||
|
|
||||||
const runtimeConfig = useRuntimeConfig()
|
const runtimeConfig = useRuntimeConfig()
|
||||||
const baseURL = runtimeConfig.app.baseURL;
|
const baseURL = runtimeConfig.app.baseURL;
|
||||||
const styleFolder = `${baseURL}themes/style`
|
const styleFolder = `${baseURL}/themes/style`
|
||||||
const layoutFolder = `${baseURL}themes/layout`
|
const layoutFolder = `${baseURL}/themes/layout`
|
||||||
|
|
||||||
const timeFormatTextStrings = ["Auto", "12-Hour", "24-Hour"]
|
const timeFormatTextStrings = ["Auto", "12-Hour", "24-Hour"]
|
||||||
|
|
||||||
|
@ -115,6 +116,7 @@ async function parseTheme(url: string): Promise<Theme | void> {
|
||||||
break
|
break
|
||||||
case "previewImageUrl":
|
case "previewImageUrl":
|
||||||
previewImageUrl = `${layoutFolder}/${lineArray[1].trim()}`
|
previewImageUrl = `${layoutFolder}/${lineArray[1].trim()}`
|
||||||
|
console.log(previewImageUrl)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue