Skip to content

Commit c840d37

Browse files
committed
init runtime.public ;; cleared up misc errors
1 parent 7d9fb27 commit c840d37

File tree

10 files changed

+16
-14
lines changed

10 files changed

+16
-14
lines changed

client/components/app/ConfigSideNav.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
<div class="w-44 h-12 px-4 border-t bg-bg border-black border-opacity-20 fixed left-0 flex flex-col justify-center" :class="wrapperClass" :style="{ bottom: streamLibraryItem ? '160px' : '0px' }">
1717
<div class="flex items-center justify-between">
18-
<button type="button" class="underline font-mono text-sm" @click="clickChangelog">v{{ $config.version }}</button>
18+
<button type="button" class="underline font-mono text-sm" @click="clickChangelog">v{{ $config.public.version }}</button>
1919

2020
<p class="text-xs text-gray-300 italic">{{ Source }}</p>
2121
</div>
22-
<a v-if="hasUpdate" :href="githubTagUrl" target="_blank" class="text-warning text-xs">Latest: {{ $config.version }}</a>
22+
<a v-if="hasUpdate" :href="githubTagUrl" target="_blank" class="text-warning text-xs">Latest: {{ $config.public.version }}</a>
2323
</div>
2424
</div>
2525
</template>

client/components/app/SideRail.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
</div>
117117

118118
<div class="w-full h-12 px-1 py-2 border-t border-black/20 bg-bg absolute left-0" :style="{ bottom: streamLibraryItem ? '224px' : '65px' }">
119-
<p class="underline font-mono text-xs text-center text-gray-300 leading-3 mb-1" @click="clickChangelog">v{{ $config.version }}</p>
119+
<p class="underline font-mono text-xs text-center text-gray-300 leading-3 mb-1" @click="clickChangelog">v{{ $config.public.version }}</p>
120120
<a v-if="hasUpdate" :href="githubTagUrl" target="_blank" class="text-warning text-xxs text-center block leading-3">Update</a>
121121
<p v-else class="text-xxs text-gray-400 leading-3 text-center italic">{{ Source }}</p>
122122
</div>

client/components/covers/AuthorImage.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
if (!this.imagePath) return null
5959
if (process.env.NODE_ENV !== 'production') {
6060
// Testing
61-
return `http://localhost:3333${this.$config.routerBasePath}/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}`
61+
return `http://localhost:3333${this.$config.public.routerBasePath}/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}`
6262
}
6363
return `/api/authors/${this.authorId}/image?token=${this.userToken}&ts=${this.updatedAt}`
6464
}

client/components/modals/player/QueueItemRow.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default {
5555
return this.item.coverPath
5656
},
5757
coverUrl() {
58-
if (!this.coverPath) return `${this.$config.routerBasePath}/book_placeholder.jpg`
58+
if (!this.coverPath) return `${this.$config.public.routerBasePath}/book_placeholder.jpg`
5959
return this.$store.getters['globals/getLibraryItemCoverSrcById'](this.libraryItemId)
6060
},
6161
bookCoverAspectRatio() {
@@ -99,4 +99,4 @@ export default {
9999
.queue-item-row-content {
100100
max-width: calc(100% - 48px - 128px);
101101
}
102-
</style>
102+
</style>

client/components/modals/rssfeed/OpenCloseModal.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ export default {
139139
slug: this.newFeedSlug,
140140
metadataDetails: this.metadataDetails
141141
}
142-
if (this.$isDev) payload.serverAddress = `http://localhost:3333${this.$config.routerBasePath}`
142+
if (this.$isDev) payload.serverAddress = `http://localhost:3333${this.$config.public.routerBasePath}`
143143
144144
console.log('Payload', payload)
145145
this.$axios

client/nuxt.config.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ export default defineNuxtConfig({
1212
},
1313
telemetry: false,
1414

15-
publicRuntimeConfig: {
16-
version: pkg.version,
17-
routerBasePath: process.env.ROUTER_BASE_PATH || ''
15+
runtimeConfig: {
16+
public: {
17+
version: pkg.version,
18+
routerBasePath: process.env.ROUTER_BASE_PATH || ''
19+
}
1820
},
1921

2022
// Global page headers: https://go.nuxtjs.dev/config-head

client/pages/audiobook/_id/chapters.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ export default {
415415
const audioEl = this.audioEl || document.createElement('audio')
416416
var src = audioTrack.contentUrl + `?token=${this.userToken}`
417417
if (this.$isDev) {
418-
src = `http://localhost:3333${this.$config.routerBasePath}${src}`
418+
src = `http://localhost:3333${this.$config.public.routerBasePath}${src}`
419419
}
420420
421421
audioEl.src = src

client/pages/config/rss-feeds.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ export default {
125125
return this.$strings.LabelUnknown
126126
},
127127
coverUrl(feed) {
128-
if (!feed.coverPath) return `${this.$config.routerBasePath}/Logo.png`
128+
if (!feed.coverPath) return `${this.$config.public.routerBasePath}/Logo.png`
129129
return `${feed.feedUrl}/cover`
130130
},
131131
async loadFeeds() {

client/pages/share/_slug.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default {
5959
return this.mediaItemShare.playbackSession
6060
},
6161
coverUrl() {
62-
if (!this.playbackSession.coverPath) return `${this.$config.routerBasePath}/book_placeholder.jpg`
62+
if (!this.playbackSession.coverPath) return `${this.$config.public.routerBasePath}/book_placeholder.jpg`
6363
if (process.env.NODE_ENV === 'development') {
6464
return `http://localhost:3333/public/share/${this.mediaItemShare.slug}/cover`
6565
}

client/plugins/init.client.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,5 +181,5 @@ export default ({ app, store }, inject) => {
181181
inject('eventBus', new Vue())
182182
inject('isDev', process.env.NODE_ENV !== 'production')
183183

184-
store.commit('setRouterBasePath', app.$config.routerBasePath)
184+
store.commit('setRouterBasePath', app.$config.public.routerBasePath)
185185
}

0 commit comments

Comments
 (0)