mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2025-01-22 00:07:52 +01:00
Add: publish date of current version to modal
This commit is contained in:
parent
92aae736c4
commit
3764ef14a9
@ -121,7 +121,7 @@
|
|||||||
<p v-else class="text-xxs text-gray-400 leading-3 text-center italic">{{ Source }}</p>
|
<p v-else class="text-xxs text-gray-400 leading-3 text-center italic">{{ Source }}</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<modals-changelog-view-modal v-model="showChangelogModal" :changelog="currentVersionChangelog" :currentVersion="$config.version" />
|
<modals-changelog-view-modal v-model="showChangelogModal" :changelog="currentVersionChangelog" :currentVersion="$config.version" :currentPubDate="currentVersionPubDate" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -152,6 +152,9 @@ export default {
|
|||||||
paramId() {
|
paramId() {
|
||||||
return this.$route.params ? this.$route.params.id || '' : ''
|
return this.$route.params ? this.$route.params.id || '' : ''
|
||||||
},
|
},
|
||||||
|
dateFormat() {
|
||||||
|
return this.$store.state.serverSettings.dateFormat
|
||||||
|
},
|
||||||
currentLibraryId() {
|
currentLibraryId() {
|
||||||
return this.$store.state.libraries.currentLibraryId
|
return this.$store.state.libraries.currentLibraryId
|
||||||
},
|
},
|
||||||
@ -222,6 +225,9 @@ export default {
|
|||||||
currentVersionChangelog() {
|
currentVersionChangelog() {
|
||||||
return this.versionData.currentVersionChangelog || 'No Changelog Available'
|
return this.versionData.currentVersionChangelog || 'No Changelog Available'
|
||||||
},
|
},
|
||||||
|
currentVersionPubDate() {
|
||||||
|
return `${this.$formatDate(this.versionData.currentVersionPubDate, this.dateFormat)}` || 'Unknown release date'
|
||||||
|
},
|
||||||
streamLibraryItem() {
|
streamLibraryItem() {
|
||||||
return this.$store.state.streamLibraryItem
|
return this.$store.state.streamLibraryItem
|
||||||
},
|
},
|
||||||
@ -245,4 +251,4 @@ export default {
|
|||||||
#siderail-buttons-container.player-open {
|
#siderail-buttons-container.player-open {
|
||||||
max-height: calc(100vh - 64px - 48px - 160px);
|
max-height: calc(100vh - 64px - 48px - 160px);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<div class="px-8 py-6 w-full rounded-lg bg-bg shadow-lg border border-black-300 relative overflow-y-scroll" style="max-height: 80vh">
|
<div class="px-8 py-6 w-full rounded-lg bg-bg shadow-lg border border-black-300 relative overflow-y-scroll" style="max-height: 80vh">
|
||||||
<p class="text-xl font-bold pb-4">Changelog v{{ currentVersionNumber }}</p>
|
<p class="text-xl font-bold pb-4">Changelog v{{ currentVersionNumber }} ({{ currentVersionPubDate }})</p>
|
||||||
<div class="custom-text" v-html="compiledMarkedown" />
|
<div class="custom-text" v-html="compiledMarkedown" />
|
||||||
</div>
|
</div>
|
||||||
</modals-modal>
|
</modals-modal>
|
||||||
@ -19,6 +19,7 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
value: Boolean,
|
value: Boolean,
|
||||||
changelog: String,
|
changelog: String,
|
||||||
|
currentPubDate: String,
|
||||||
currentVersion: String
|
currentVersion: String
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@ -43,6 +44,9 @@ export default {
|
|||||||
compiledMarkedown() {
|
compiledMarkedown() {
|
||||||
return marked.parse(this.changelog, { gfm: true, breaks: true })
|
return marked.parse(this.changelog, { gfm: true, breaks: true })
|
||||||
},
|
},
|
||||||
|
currentVersionPubDate() {
|
||||||
|
return this.currentPubDate
|
||||||
|
},
|
||||||
currentVersionNumber() {
|
currentVersionNumber() {
|
||||||
return this.currentVersion
|
return this.currentVersion
|
||||||
}
|
}
|
||||||
@ -57,7 +61,7 @@ export default {
|
|||||||
<style scoped>
|
<style scoped>
|
||||||
/*
|
/*
|
||||||
1. we need to manually define styles to apply to the parsed markdown elements,
|
1. we need to manually define styles to apply to the parsed markdown elements,
|
||||||
since we don't have access to the actual elements in this component
|
since we don't have access to the actual elements in this component
|
||||||
|
|
||||||
2. v-deep allows these to take effect on the content passed in to the v-html in the div above
|
2. v-deep allows these to take effect on the content passed in to the v-html in the div above
|
||||||
*/
|
*/
|
||||||
@ -70,4 +74,4 @@ since we don't have access to the actual elements in this component
|
|||||||
.custom-text ::v-deep > ul {
|
.custom-text ::v-deep > ul {
|
||||||
@apply list-disc list-inside pb-4;
|
@apply list-disc list-inside pb-4;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
Loading…
Reference in New Issue
Block a user