feat(frontend): capture policy shows what each rule changes, rule card opens from folder and chat menus and can trash downloaded files, trash is paged
This commit is contained in:
1 parent
f646f29ff9
commit
cb01d7dff8
16 files changed
+1536
-369
No files matched your search
@@ -1,5 +1,8 @@
|
||||
<script lang="ts">
|
||||
import ContextMenu from "#lib/components/ui/ContextMenu.svelte";
|
||||
import ContextMenuItem from "#lib/components/ui/ContextMenuItem.svelte";
|
||||
import { folders } from "#lib/stores/folders.svelte.js";
|
||||
import { policyUi } from "#lib/stores/policy.svelte.js";
|
||||
|
||||
interface Tab {
|
||||
id: number | null;
|
||||
@@ -21,6 +24,12 @@
|
||||
)
|
||||
);
|
||||
|
||||
function editPolicy(tab: Tab) {
|
||||
if (tab.id !== null) {
|
||||
policyUi.edit({ folderId: tab.id }, tab.title);
|
||||
}
|
||||
}
|
||||
|
||||
let containerEl = $state<HTMLDivElement>();
|
||||
let indicatorEl = $state<HTMLDivElement>();
|
||||
let clipPath = $state("");
|
||||
@@ -64,9 +73,31 @@
|
||||
|
||||
<div class="container" bind:this={containerEl} class:ready={clipPath !== ""}>
|
||||
{#each tabs as tab (tab.id)}
|
||||
<button class="tab" onclick={() => folders.select(tab.id)} type="button">
|
||||
{tab.title}
|
||||
</button>
|
||||
{#if tab.id === null}
|
||||
<button class="tab" onclick={() => folders.select(tab.id)} type="button">
|
||||
{tab.title}
|
||||
</button>
|
||||
{:else}
|
||||
<ContextMenu>
|
||||
{#snippet children({
|
||||
props,
|
||||
})}
|
||||
<button
|
||||
{...props}
|
||||
class="tab"
|
||||
onclick={() => folders.select(tab.id)}
|
||||
type="button"
|
||||
>
|
||||
{tab.title}
|
||||
</button>
|
||||
{/snippet}
|
||||
{#snippet menu()}
|
||||
<ContextMenuItem icon="settings" onselect={() => editPolicy(tab)}>
|
||||
Политика захвата
|
||||
</ContextMenuItem>
|
||||
{/snippet}
|
||||
</ContextMenu>
|
||||
{/if}
|
||||
{/each}
|
||||
|
||||
<div
|
||||
|
||||
Reference in new issue
Block a user