feat(ui): hide management controls for system collections
System collections (Not Started, Continue Reading, etc.) compute their contents dynamically from reading_progress, so manual add/remove has no effect. Hide the search bar, Remove Selected button, Add Books button, per-card checkboxes, and Remove buttons when the collection is system, making the page visually read-only. - Add IsSystem bool to CollectionData, populated from the database is_system_collection flag. - Add data-is-system to #collection-data so the JS renderer can also conditionally omit controls on library switch. - Wrap toolbar controls, book picker modal, card checkboxes, and remove buttons in if !collection.IsSystem in the template.
This commit is contained in:
@@ -631,6 +631,7 @@ func registerFrontendRoutes(cfg *Config) {
|
||||
Description: collection.Description.String,
|
||||
Color: collection.Color.String,
|
||||
Icon: collection.Icon.String,
|
||||
IsSystem: collection.IsSystemCollection.Bool,
|
||||
}
|
||||
|
||||
var buf bytes.Buffer
|
||||
|
||||
Reference in New Issue
Block a user