refactor: remove unused add-menu components

Three dropdown menu components are not imported anywhere: an add-function menu in the admin area, an AI menu in notes and an add-tool menu in the workspace. Each was replaced by a different control that is in use today.

This removes around 180 lines. Three English translation keys lose their last consumer with them and are left in place, since regenerating the locale catalogues does not belong in this change.
This commit is contained in:
Classic298 2026-08-20 22:06:59 +02:00
parent 8a42aa53e8
commit bc6c56b388
3 changed files with 0 additions and 183 deletions

View file

@ -1,62 +0,0 @@
<script lang="ts">
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Pencil from '$lib/components/icons/Pencil.svelte';
import Link from '$lib/components/icons/Link.svelte';
const i18n = getContext('i18n');
export let createHandler: Function;
export let importFromLinkHandler: Function;
export let onClose: Function = () => {};
let show = false;
</script>
<Dropdown
bind:show
sideOffset={6}
onOpenChange={(state) => {
if (state === false) {
onClose();
}
}}
>
<Tooltip content={$i18n.t('Create')}>
<slot />
</Tooltip>
<div slot="content">
<DropdownMenu className="min-w-[11.875rem]">
<button
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[0.8125rem] cursor-pointer hover:bg-gray-50/40 dark:hover:bg-gray-800/40"
on:click={async () => {
createHandler();
show = false;
}}
>
<div class="self-center">
<Pencil className="size-3.5" />
</div>
<div class=" self-center truncate">{$i18n.t('New Function')}</div>
</button>
<button
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl px-2 text-[0.8125rem] cursor-pointer hover:bg-gray-50/40 dark:hover:bg-gray-800/40"
on:click={async () => {
importFromLinkHandler();
show = false;
}}
>
<div class="self-center">
<Link className="size-3.5" />
</div>
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
</button>
</DropdownMenu>
</div>
</Dropdown>

View file

@ -1,59 +0,0 @@
<script lang="ts">
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Sparkles from '../icons/Sparkles.svelte';
import ChatBubbleOval from '../icons/ChatBubbleOval.svelte';
const i18n = getContext('i18n');
export let show = false;
export let className = 'max-w-[10.625rem]';
export let onEdit = () => {};
export let onChat = () => {};
export let onChange = () => {};
</script>
<Dropdown
bind:show
align="end"
sideOffset={8}
onOpenChange={(state) => {
onChange(state);
}}
>
<slot />
<div slot="content">
<DropdownMenu className="min-w-[10.625rem] ">
<button
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] transition hover:text-gray-900 dark:hover:text-gray-100"
on:click={async () => {
onEdit();
show = false;
}}
>
<div class="self-center">
<Sparkles className="size-3.5" strokeWidth="2" />
</div>
<div class=" self-center truncate">{$i18n.t('Enhance')}</div>
</button>
<button
class="flex h-[1.6875rem] w-full items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] transition hover:text-gray-900 dark:hover:text-gray-100"
on:click={() => {
onChat();
show = false;
}}
>
<div class="self-center">
<ChatBubbleOval className="size-3.5" strokeWidth="2" />
</div>
<div class=" self-center truncate">{$i18n.t('Chat')}</div>
</button>
</DropdownMenu>
</div>
</Dropdown>

View file

@ -1,62 +0,0 @@
<script lang="ts">
import { getContext } from 'svelte';
import Dropdown from '$lib/components/common/Dropdown.svelte';
import DropdownMenu from '$lib/components/common/DropdownMenu.svelte';
import Tooltip from '$lib/components/common/Tooltip.svelte';
import Pencil from '$lib/components/icons/Pencil.svelte';
import Link from '$lib/components/icons/Link.svelte';
const i18n = getContext('i18n');
export let createHandler: Function;
export let importFromLinkHandler: Function;
export let onClose: Function = () => {};
let show = false;
</script>
<Dropdown
bind:show
sideOffset={6}
onOpenChange={(state) => {
if (state === false) {
onClose();
}
}}
>
<Tooltip content={$i18n.t('Create')}>
<slot />
</Tooltip>
<div slot="content">
<DropdownMenu className="min-w-[11.875rem]">
<button
class="flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] hover:text-gray-900 dark:hover:text-gray-100"
on:click={async () => {
createHandler();
show = false;
}}
>
<div class="self-center">
<Pencil className="size-3.5" />
</div>
<div class=" self-center truncate">{$i18n.t('New Tool')}</div>
</button>
<button
class="flex h-[1.6875rem] w-full cursor-pointer items-center gap-2 rounded-xl bg-transparent px-2 text-[0.8125rem] hover:text-gray-900 dark:hover:text-gray-100"
on:click={async () => {
importFromLinkHandler();
show = false;
}}
>
<div class="self-center">
<Link className="size-3.5" />
</div>
<div class=" self-center truncate">{$i18n.t('Import From Link')}</div>
</button>
</DropdownMenu>
</div>
</Dropdown>