From cb3248117f08b5daba85a4d1f36634d7fb88f3fa Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Thu, 5 Dec 2024 15:35:31 -0800
Subject: [PATCH] Enhancement: icons-only bookmarks style (#4384)
---
docs/configs/settings.md | 16 ++++++++++++
src/components/bookmarks/group.jsx | 10 ++++++--
src/components/bookmarks/item.jsx | 39 +++++++++++++++++++++---------
src/components/bookmarks/list.jsx | 22 +++++++++++------
src/pages/index.jsx | 3 +++
5 files changed, 69 insertions(+), 21 deletions(-)
diff --git a/docs/configs/settings.md b/docs/configs/settings.md
index 7e1815bb1..5fe30874f 100644
--- a/docs/configs/settings.md
+++ b/docs/configs/settings.md
@@ -118,6 +118,22 @@ As an example, this would produce the following layout:
+### Icons-Only Layout
+
+You can also specify the an icon-only layout for bookmarks, either like so:
+
+```yaml
+layout:
+ Media:
+ iconsOnly: true
+```
+
+or globally:
+
+```yaml
+bookmarksStyle: icons
+```
+
### Sorting
Service groups and bookmark groups can be mixed in order, **but should use different group names**. If you do not specify any bookmark groups they will all show at the bottom of the page.
diff --git a/src/components/bookmarks/group.jsx b/src/components/bookmarks/group.jsx
index 3a9f8323a..9deb1b6a2 100644
--- a/src/components/bookmarks/group.jsx
+++ b/src/components/bookmarks/group.jsx
@@ -7,7 +7,13 @@ import ErrorBoundary from "components/errorboundry";
import List from "components/bookmarks/list";
import ResolvedIcon from "components/resolvedicon";
-export default function BookmarksGroup({ bookmarks, layout, disableCollapse, groupsInitiallyCollapsed }) {
+export default function BookmarksGroup({
+ bookmarks,
+ layout,
+ disableCollapse,
+ groupsInitiallyCollapsed,
+ bookmarksStyle,
+}) {
const panel = useRef();
useEffect(() => {
@@ -64,7 +70,7 @@ export default function BookmarksGroup({ bookmarks, layout, disableCollapse, gro
>
+