mirror of
https://github.com/outline/outline.git
synced 2026-11-28 00:09:58 +03:00
Revoking a share link now operates on every active share, so it can be performed from the bulk selection toolbar as well as the row menu. The copy link and go to source actions read their share from the action context too, and hide when a multi-selection is active. Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
24 lines
622 B
TypeScript
24 lines
622 B
TypeScript
import { useMemo } from "react";
|
|
import { ActionSeparator } from "~/actions";
|
|
import {
|
|
copyShareUrl,
|
|
goToShareSource,
|
|
revokeShare,
|
|
} from "~/actions/definitions/shares";
|
|
import { useMenuAction } from "~/hooks/useMenuAction";
|
|
|
|
/**
|
|
* Hook that constructs the action menu for share management operations. The
|
|
* share is read from the active models in the action context.
|
|
*
|
|
* @returns action with children for use in menus.
|
|
*/
|
|
export function useShareMenuActions() {
|
|
const actions = useMemo(
|
|
() => [copyShareUrl, goToShareSource, ActionSeparator, revokeShare],
|
|
[]
|
|
);
|
|
|
|
return useMenuAction(actions);
|
|
}
|