mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2026-03-01 05:29:41 +00:00
UI: Add View All buttons to Home shelves and update AGENTS.md
This commit is contained in:
parent
44c25e61a3
commit
2369e19fe7
3 changed files with 45 additions and 3 deletions
|
|
@ -212,16 +212,17 @@ Each new feature or major change should be documented in an artifact specificati
|
|||
### Organization
|
||||
|
||||
- **Location**: All artifact specifications are stored in the `artifacts/` directory.
|
||||
- **Dated Folders**: Specifications should be placed in a subfolder named by the current date (e.g., `artifacts/YYYY-MM-DD/`).
|
||||
- **Dated Folders**: Specifications **MUST** be placed in a subfolder named by the current date (e.g., `artifacts/YYYY-MM-DD/`).
|
||||
- **CRITICAL**: Do **NOT** create specification files directly in the `artifacts/` root. Always use the dated folder.
|
||||
- **Filename**: Use descriptive names for the specification files (e.g., `move-to-library-specification.md`).
|
||||
|
||||
### Managing Folders
|
||||
|
||||
A `Makefile` is provided in the `artifacts/` directory to quickly set up the folder for the current day:
|
||||
A `Makefile` is provided in the `artifacts/` directory to quickly set up the folder for the current day. **AI Assistants should always run this command first** if the today folder does not exist:
|
||||
|
||||
```bash
|
||||
cd artifacts
|
||||
make # Runs the 'today' target to create the dated folder
|
||||
make # Runs the 'today' target to create the dated folder (e.g. artifacts/2026-02-17)
|
||||
```
|
||||
|
||||
### Purpose
|
||||
|
|
|
|||
21
artifacts/2026-02-17/ui_enhancements.md
Normal file
21
artifacts/2026-02-17/ui_enhancements.md
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
# UI Enhancements
|
||||
|
||||
## 1. Home View Header Shortcuts
|
||||
|
||||
Add navigation buttons next to specific shelf headlines on the Home view that link to the full library pages with appropriate sorting.
|
||||
|
||||
### Shelves and Targets
|
||||
|
||||
| Shelf ID | Headline | Target Page | Sort Criteria |
|
||||
| :--- | :--- | :--- | :--- |
|
||||
| `recently-added` | Recently Added | `/library/:id/bookshelf` | `addedAt` Descending |
|
||||
| `recent-series` | Recent Series | `/library/:id/bookshelf/series` | `addedAt` Descending |
|
||||
| `newest-authors` | Newest Authors | `/library/:id/bookshelf/authors` | `addedAt` Descending |
|
||||
|
||||
### Implementation Details
|
||||
|
||||
- **Component**: `client/components/app/BookShelfRow.vue`
|
||||
- **Trigger**: New button next to the `h2` title in the `categoryPlacard`.
|
||||
- **Action**:
|
||||
1. Update Vuex store settings for the specific sort (e.g., `orderBy` for library, `seriesSortBy` for series, `authorSortBy` for authors).
|
||||
2. Navigate to the target page.
|
||||
|
|
@ -38,6 +38,11 @@
|
|||
<div class="relative text-center categoryPlacard transform z-30 top-0 left-4e md:left-8e w-44e rounded-md">
|
||||
<div class="w-full h-full shinyBlack flex items-center justify-center rounded-xs border" :style="{ padding: `0em 0.5em` }">
|
||||
<h2 :style="{ fontSize: 0.9 + 'em' }">{{ $strings[shelf.labelStringKey] }}</h2>
|
||||
<ui-tooltip v-if="isLinkableShelf" :text="$strings.ButtonViewAll" direction="top" class="ml-2">
|
||||
<button class="flex items-center justify-center hover:text-yellow-400 opacity-60 hover:opacity-100 transition-opacity" @click.stop="goToShelfFullPage">
|
||||
<span class="material-symbols text-base">arrow_forward</span>
|
||||
</button>
|
||||
</ui-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -84,9 +89,24 @@ export default {
|
|||
},
|
||||
isSelectionMode() {
|
||||
return this.$store.getters['globals/getIsBatchSelectingMediaItems']
|
||||
},
|
||||
isLinkableShelf() {
|
||||
return ['recently-added', 'recent-series', 'newest-authors'].includes(this.shelf.id)
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goToShelfFullPage() {
|
||||
if (this.shelf.id === 'recently-added') {
|
||||
this.$store.dispatch('user/updateUserSettings', { orderBy: 'addedAt', orderDesc: true })
|
||||
this.$router.push(`/library/${this.currentLibraryId}/bookshelf`)
|
||||
} else if (this.shelf.id === 'recent-series') {
|
||||
this.$store.dispatch('user/updateUserSettings', { seriesSortBy: 'addedAt', seriesSortDesc: true })
|
||||
this.$router.push(`/library/${this.currentLibraryId}/bookshelf/series`)
|
||||
} else if (this.shelf.id === 'newest-authors') {
|
||||
this.$store.dispatch('user/updateUserSettings', { authorSortBy: 'addedAt', authorSortDesc: true })
|
||||
this.$router.push(`/library/${this.currentLibraryId}/bookshelf/authors`)
|
||||
}
|
||||
},
|
||||
clearSelectedEntities() {
|
||||
this.updateSelectionMode(false)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue