feat(web): album list options (#3667)

* Album view option for cover or list view

* Dropdown can now receive list of icons to display with selected option

* Formatting

* Use table element with formatting similar to other pages

* Make table rows clickable with hover styling

* Also make row navigateable using keyboard without mouse

* Formatting

* Define DropdownOption interface

* Album view mode type definition for typescript support in if statements

* format

* fix typing

---------

Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
Kevin 2023-08-17 15:46:39 +02:00 committed by GitHub
parent d1e74a28d9
commit ce84f9c755
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 87 additions and 11 deletions

View file

@ -41,8 +41,15 @@ export const isShowDetail = persisted<boolean>('info-opened', false, {});
export interface AlbumViewSettings {
sortBy: string;
view: string;
}
export enum AlbumViewMode {
Cover = 'Cover',
List = 'List',
}
export const albumViewSettings = persisted<AlbumViewSettings>('album-view-settings', {
sortBy: 'Most recent photo',
view: AlbumViewMode.Cover,
});