Skip to content

Commit

Permalink
Merge branch 'advplyr:master' into bookshelf-refactor-2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikiher authored Jun 25, 2024
2 parents 2819317 + 04a6564 commit 9bf4bd9
Show file tree
Hide file tree
Showing 97 changed files with 10,432 additions and 3,294 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/i18n-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ jobs:
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: "20"
node-version: '20'

# The only argument is the `directory`, which is where the i18n files are
# stored.
- name: Run Update JSON Files action
uses: audiobookshelf/audiobookshelf-i18n-updater@v1.2.0
uses: audiobookshelf/audiobookshelf-i18n-updater@v1.3.0
with:
directory: "client/strings/" # Adjust the directory path as needed
directory: 'client/strings/' # Adjust the directory path as needed
30 changes: 30 additions & 0 deletions .github/workflows/lint-openapi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: API linting

# Run on pull requests or pushes when there is a change to the OpenAPI file
on:
push:
paths:
- docs/
pull_request:
paths:
- docs/

jobs:
build:
runs-on: ubuntu-latest
steps:
# Check out the repository
- name: Checkout
uses: actions/checkout@v4
# Set up node to run the javascript
- name: Set up node
uses: actions/setup-node@v4
# Install Redocly CLI
- name: Install Redocly CLI
run: npm install -g @redocly/cli@latest
# Perform linting for exploded spec
- name: Run linting for exploded spec
run: redocly lint docs/root.yaml --format=github-actions
# Perform linting for bundled spec
- name: Run linting for bundled spec
run: redocly lint docs/openapi.json --format=github-actions
2 changes: 1 addition & 1 deletion client/components/app/BookShelfCategorized.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
</div>
<div v-else-if="loaded && !shelves.length && search" class="w-full h-40 flex items-center justify-center">
<p class="text-center text-xl py-4">No results for query</p>
<p class="text-center text-xl py-4">{{ $strings.MessageBookshelfNoResultsForQuery }}</p>
</div>
<!-- Alternate plain view -->
<div v-else-if="isAlternativeBookshelfView" class="w-full mb-24e">
Expand Down
16 changes: 7 additions & 9 deletions client/components/app/MediaPlayerContainer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,21 @@
<covers-book-cover expand-on-click :library-item="streamLibraryItem" :width="bookCoverWidth" :book-cover-aspect-ratio="coverAspectRatio" />
</div>
<div class="flex items-start mb-6 lg:mb-0" :class="playerHandler.isVideo ? 'ml-4 pl-96' : isSquareCover ? 'pl-18 sm:pl-24' : 'pl-12 sm:pl-16'">
<div class="min-w-0">
<div class="min-w-0 w-full">
<div class="flex items-center">
<nuxt-link :to="`/item/${streamLibraryItem.id}`" class="hover:underline cursor-pointer text-sm sm:text-lg block truncate">
{{ title }}
</nuxt-link>
<widgets-explicit-indicator v-if="isExplicit" />
</div>
<div v-if="!playerHandler.isVideo" class="text-gray-400 flex items-center">
<div v-if="!playerHandler.isVideo" class="text-gray-400 flex items-center w-1/2 sm:w-4/5 lg:w-2/5">
<span class="material-icons text-sm">person</span>
<div class="flex items-center">
<div v-if="podcastAuthor" class="pl-1 sm:pl-1.5 text-xs sm:text-base">{{ podcastAuthor }}</div>
<div v-else-if="musicArtists" class="pl-1 sm:pl-1.5 text-xs sm:text-base">{{ musicArtists }}</div>
<div v-else-if="authors.length" class="pl-1 sm:pl-1.5 text-xs sm:text-base">
<nuxt-link v-for="(author, index) in authors" :key="index" :to="`/author/${author.id}`" class="hover:underline">{{ author.name }}<span v-if="index < authors.length - 1">,&nbsp;</span></nuxt-link>
</div>
<div v-else class="text-xs sm:text-base cursor-pointer pl-1 sm:pl-1.5">{{ $strings.LabelUnknown }}</div>
<div v-if="podcastAuthor" class="pl-1 sm:pl-1.5 text-xs sm:text-base">{{ podcastAuthor }}</div>
<div v-else-if="musicArtists" class="pl-1 sm:pl-1.5 text-xs sm:text-base">{{ musicArtists }}</div>
<div v-else-if="authors.length" class="pl-1 sm:pl-1.5 text-xs sm:text-base truncate">
<nuxt-link v-for="(author, index) in authors" :key="index" :to="`/author/${author.id}`" class="hover:underline">{{ author.name }}<span v-if="index < authors.length - 1">,&nbsp;</span></nuxt-link>
</div>
<div v-else class="text-xs sm:text-base cursor-pointer pl-1 sm:pl-1.5">{{ $strings.LabelUnknown }}</div>
</div>

<div class="text-gray-400 flex items-center">
Expand Down
31 changes: 28 additions & 3 deletions client/components/controls/LibraryFilterSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,12 @@
<span class="material-icons text-2xl">arrow_left</span>
</div>
<div class="flex items-center justify-between">
<span class="font-normal block truncate">Back</span>
<span class="font-normal block truncate">{{ $strings.ButtonBack }}</span>
</div>
</li>
<li v-if="!sublistItems.length" class="text-gray-400 select-none relative px-2" role="option">
<div class="flex items-center justify-center">
<span class="font-normal block truncate py-2">No {{ sublist }}</span>
<span class="font-normal block truncate py-2">{{ $getString('LabelLibraryFilterSublistEmpty', [selectedSublistText]) }}</span>
</div>
</li>
<template v-for="item in sublistItems">
Expand Down Expand Up @@ -106,31 +106,37 @@ export default {
},
{
text: this.$strings.LabelGenre,
textPlural: this.$strings.LabelGenres,
value: 'genres',
sublist: true
},
{
text: this.$strings.LabelTag,
textPlural: this.$strings.LabelTags,
value: 'tags',
sublist: true
},
{
text: this.$strings.LabelAuthor,
textPlural: this.$strings.LabelAuthors,
value: 'authors',
sublist: true
},
{
text: this.$strings.LabelNarrator,
textPlural: this.$strings.LabelNarrators,
value: 'narrators',
sublist: true
},
{
text: this.$strings.LabelPublisher,
textPlural: this.$strings.LabelPublishers,
value: 'publishers',
sublist: true
},
{
text: this.$strings.LabelLanguage,
textPlural: this.$strings.LabelLanguages,
value: 'languages',
sublist: true
},
Expand All @@ -149,36 +155,43 @@ export default {
},
{
text: this.$strings.LabelGenre,
textPlural: this.$strings.LabelGenres,
value: 'genres',
sublist: true
},
{
text: this.$strings.LabelTag,
textPlural: this.$strings.LabelTags,
value: 'tags',
sublist: true
},
{
text: this.$strings.LabelSeries,
textPlural: this.$strings.LabelSeries,
value: 'series',
sublist: true
},
{
text: this.$strings.LabelAuthor,
textPlural: this.$strings.LabelAuthors,
value: 'authors',
sublist: true
},
{
text: this.$strings.LabelNarrator,
textPlural: this.$strings.LabelNarrators,
value: 'narrators',
sublist: true
},
{
text: this.$strings.LabelPublisher,
textPlural: this.$strings.LabelPublishers,
value: 'publishers',
sublist: true
},
{
text: this.$strings.LabelLanguage,
textPlural: this.$strings.LabelLanguages,
value: 'languages',
sublist: true
},
Expand Down Expand Up @@ -227,16 +240,19 @@ export default {
},
{
text: this.$strings.LabelGenre,
textPlural: this.$strings.LabelGenres,
value: 'genres',
sublist: true
},
{
text: this.$strings.LabelTag,
textPlural: this.$strings.LabelTags,
value: 'tags',
sublist: true
},
{
text: this.$strings.LabelLanguage,
textPlural: this.$strings.LabelLanguages,
value: 'languages',
sublist: true
},
Expand All @@ -255,11 +271,13 @@ export default {
},
{
text: this.$strings.LabelGenre,
textPlural: this.$strings.LabelGenres,
value: 'genres',
sublist: true
},
{
text: this.$strings.LabelTag,
textPlural: this.$strings.LabelTags,
value: 'tags',
sublist: true
},
Expand All @@ -279,6 +297,13 @@ export default {
selectedItemSublist() {
return this.selected?.includes('.') ? this.selected.split('.')[0] : null
},
selectedSublistText() {
if (!this.sublist) {
return ''
}
const sublistItem = this.selectItems.find((i) => i.value === this.sublist)
return sublistItem?.textPlural || sublistItem?.text || ''
},
selectedText() {
if (!this.selected) return ''
const parts = this.selected.split('.')
Expand Down Expand Up @@ -505,4 +530,4 @@ export default {
.libraryFilterMenu {
max-height: calc(100vh - 125px);
}
</style>
</style>
Loading

0 comments on commit 9bf4bd9

Please sign in to comment.