diff --git a/client/components/app/ConfigSideNav.vue b/client/components/app/ConfigSideNav.vue index adc99e5ae5..9efa5b07be 100644 --- a/client/components/app/ConfigSideNav.vue +++ b/client/components/app/ConfigSideNav.vue @@ -15,11 +15,11 @@
- +

{{ Source }}

- Latest: {{ $config.version }} + Latest: {{ $config.public.version }}
diff --git a/client/components/app/SideRail.vue b/client/components/app/SideRail.vue index dbbc4d2666..58a133f3ce 100644 --- a/client/components/app/SideRail.vue +++ b/client/components/app/SideRail.vue @@ -116,7 +116,7 @@
-

v{{ $config.version }}

+

v{{ $config.public.version }}

Update

{{ Source }}

diff --git a/client/components/covers/AuthorImage.vue b/client/components/covers/AuthorImage.vue index b4fb3ccaea..37d67ee74e 100644 --- a/client/components/covers/AuthorImage.vue +++ b/client/components/covers/AuthorImage.vue @@ -58,7 +58,7 @@ export default { if (!this.imagePath) return null if (process.env.NODE_ENV !== 'production') { // Testing - return `http://localhost:3333${this.$config.routerBasePath}/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}` + return `http://localhost:3333${this.$config.public.routerBasePath}/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}` } return `/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}` } diff --git a/client/components/modals/player/QueueItemRow.vue b/client/components/modals/player/QueueItemRow.vue index 31f49aa9c7..a067075cc0 100644 --- a/client/components/modals/player/QueueItemRow.vue +++ b/client/components/modals/player/QueueItemRow.vue @@ -55,7 +55,7 @@ export default { return this.item.coverPath }, coverUrl() { - if (!this.coverPath) return `${this.$config.routerBasePath}/book_placeholder.jpg` + if (!this.coverPath) return `${this.$config.public.routerBasePath}/book_placeholder.jpg` return this.$store.getters['globals/getLibraryItemCoverSrcById'](this.libraryItemId) }, bookCoverAspectRatio() { @@ -99,4 +99,4 @@ export default { .queue-item-row-content { max-width: calc(100% - 48px - 128px); } - \ No newline at end of file + diff --git a/client/components/modals/rssfeed/OpenCloseModal.vue b/client/components/modals/rssfeed/OpenCloseModal.vue index f15a8e8edd..e9d20dd53c 100644 --- a/client/components/modals/rssfeed/OpenCloseModal.vue +++ b/client/components/modals/rssfeed/OpenCloseModal.vue @@ -139,7 +139,7 @@ export default { slug: this.newFeedSlug, metadataDetails: this.metadataDetails } - if (this.$isDev) payload.serverAddress = `http://localhost:3333${this.$config.routerBasePath}` + if (this.$isDev) payload.serverAddress = `http://localhost:3333${this.$config.public.routerBasePath}` console.log('Payload', payload) this.$axios diff --git a/client/nuxt.config.js b/client/nuxt.config.js index f4dbb917a8..838b82bfdf 100644 --- a/client/nuxt.config.js +++ b/client/nuxt.config.js @@ -12,9 +12,11 @@ export default defineNuxtConfig({ }, telemetry: false, - publicRuntimeConfig: { - version: pkg.version, - routerBasePath: process.env.ROUTER_BASE_PATH || '' + runtimeConfig: { + public: { + version: pkg.version, + routerBasePath: process.env.ROUTER_BASE_PATH || '' + } }, // Global page headers: https://go.nuxtjs.dev/config-head diff --git a/client/pages/audiobook/_id/chapters.vue b/client/pages/audiobook/_id/chapters.vue index 3448479b9e..f33458d9e5 100644 --- a/client/pages/audiobook/_id/chapters.vue +++ b/client/pages/audiobook/_id/chapters.vue @@ -415,7 +415,7 @@ export default { const audioEl = this.audioEl || document.createElement('audio') var src = audioTrack.contentUrl + `?token=${this.userToken}` if (this.$isDev) { - src = `http://localhost:3333${this.$config.routerBasePath}${src}` + src = `http://localhost:3333${this.$config.public.routerBasePath}${src}` } audioEl.src = src diff --git a/client/pages/config/rss-feeds.vue b/client/pages/config/rss-feeds.vue index 68117a859c..7375e30e31 100644 --- a/client/pages/config/rss-feeds.vue +++ b/client/pages/config/rss-feeds.vue @@ -125,7 +125,7 @@ export default { return this.$strings.LabelUnknown }, coverUrl(feed) { - if (!feed.coverPath) return `${this.$config.routerBasePath}/Logo.png` + if (!feed.coverPath) return `${this.$config.public.routerBasePath}/Logo.png` return `${feed.feedUrl}/cover` }, async loadFeeds() { diff --git a/client/pages/share/_slug.vue b/client/pages/share/_slug.vue index 384a951391..8c342af01e 100644 --- a/client/pages/share/_slug.vue +++ b/client/pages/share/_slug.vue @@ -59,7 +59,7 @@ export default { return this.mediaItemShare.playbackSession }, coverUrl() { - if (!this.playbackSession.coverPath) return `${this.$config.routerBasePath}/book_placeholder.jpg` + if (!this.playbackSession.coverPath) return `${this.$config.public.routerBasePath}/book_placeholder.jpg` if (process.env.NODE_ENV === 'development') { return `http://localhost:3333/public/share/${this.mediaItemShare.slug}/cover` } diff --git a/client/plugins/init.client.js b/client/plugins/init.client.js index 984ec9d0d7..74673a698f 100644 --- a/client/plugins/init.client.js +++ b/client/plugins/init.client.js @@ -181,5 +181,5 @@ export default ({ app, store }, inject) => { inject('eventBus', new Vue()) inject('isDev', process.env.NODE_ENV !== 'production') - store.commit('setRouterBasePath', app.$config.routerBasePath) + store.commit('setRouterBasePath', app.$config.public.routerBasePath) }