From 3ef8b785c3918f66c8cf107ddd0869913d85f5c4 Mon Sep 17 00:00:00 2001 From: FjellOverflow Date: Fri, 10 May 2024 01:20:39 +0300 Subject: [PATCH] feat: add open-all-shortcuts button to collection (#117) In /collection view, next to "Share" button, adds an "ArrowUpRight" button that opens all shortcuts in collection on click. --- frontend/web/src/components/CollectionView.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/frontend/web/src/components/CollectionView.tsx b/frontend/web/src/components/CollectionView.tsx index 6c27fd7..c6cce5a 100644 --- a/frontend/web/src/components/CollectionView.tsx +++ b/frontend/web/src/components/CollectionView.tsx @@ -55,6 +55,10 @@ const CollectionView = (props: Props) => { navigateTo(`/shortcut/${shortcut.id}`); }; + const handleOpenAllShortcutsButtonClick = () => { + shortcuts.forEach((shortcut: Shortcut) => window.open(`/s/${shortcut.name}`)); + }; + return ( <>
@@ -74,6 +78,9 @@ const CollectionView = (props: Props) => { + {showAdminActions && (