mirror of
https://github.com/outline/outline.git
synced 2026-12-06 11:12:32 +03:00
* feat: Dismissable invite and import links in sidebar Adds a dismissable "Import docs" link to the sidebar for new workspaces and allows the existing invite link to be hidden with a cross on hover, persisted locally. Also moves "Empty trash" into an overflow menu on the trash page. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> * fix: Hide dropdown menu trigger when no items are visible Adds a lightweight visibility resolver so DropdownMenu renders nothing when none of its actions apply, avoiding an overflow trigger that opens an empty menu — for example "Empty trash" for non-admins. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
23 lines
751 B
TypeScript
23 lines
751 B
TypeScript
import { observer } from "mobx-react";
|
|
import { useMemo } from "react";
|
|
import { useTranslation } from "react-i18next";
|
|
import { DropdownMenu } from "~/components/Menu/DropdownMenu";
|
|
import { OverflowMenuButton } from "~/components/Menu/OverflowMenuButton";
|
|
import { permanentlyDeleteDocumentsInTrash } from "~/actions/definitions/documents";
|
|
import { useMenuAction } from "~/hooks/useMenuAction";
|
|
|
|
function TrashMenu() {
|
|
const { t } = useTranslation();
|
|
|
|
const actions = useMemo(() => [permanentlyDeleteDocumentsInTrash], []);
|
|
const rootAction = useMenuAction(actions);
|
|
|
|
return (
|
|
<DropdownMenu action={rootAction} ariaLabel={t("Trash options")}>
|
|
<OverflowMenuButton />
|
|
</DropdownMenu>
|
|
);
|
|
}
|
|
|
|
export default observer(TrashMenu);
|