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.
prod
FjellOverflow 5 months ago committed by GitHub
parent cd45d5a5b5
commit 3ef8b785c3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -55,6 +55,10 @@ const CollectionView = (props: Props) => {
navigateTo(`/shortcut/${shortcut.id}`);
};
const handleOpenAllShortcutsButtonClick = () => {
shortcuts.forEach((shortcut: Shortcut) => window.open(`/s/${shortcut.name}`));
};
return (
<>
<div className={classNames("w-full flex flex-col justify-start items-start border rounded-lg hover:shadow dark:border-zinc-800")}>
@ -74,6 +78,9 @@ const CollectionView = (props: Props) => {
<Link className="w-full text-gray-400 cursor-pointer hover:text-gray-500" to={`/c/${collection.name}`} target="_blank">
<Icon.Share className="w-4 h-auto" />
</Link>
<button className="w-full text-gray-400 cursor-pointer hover:text-gray-500" onClick={() => handleOpenAllShortcutsButtonClick()}>
<Icon.ArrowUpRight className="w-4 h-auto" />
</button>
{showAdminActions && (
<Dropdown
trigger={

Loading…
Cancel
Save