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
@@ -0,0 +1,36 @@
|
||||
import type { ScopeTarget } from "#lib/api/types.js";
|
||||
|
||||
function createPolicyUi() {
|
||||
let open = $state(false);
|
||||
let target = $state<ScopeTarget | null>(null);
|
||||
let title = $state("");
|
||||
let revision = $state(0);
|
||||
|
||||
return {
|
||||
edit(next: ScopeTarget, name: string) {
|
||||
target = next;
|
||||
title = name;
|
||||
open = true;
|
||||
},
|
||||
get open() {
|
||||
return open;
|
||||
},
|
||||
set open(value: boolean) {
|
||||
open = value;
|
||||
},
|
||||
get revision() {
|
||||
return revision;
|
||||
},
|
||||
get target() {
|
||||
return target;
|
||||
},
|
||||
get title() {
|
||||
return title;
|
||||
},
|
||||
touch() {
|
||||
revision += 1;
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
export const policyUi = createPolicyUi();
|
||||
Reference in new issue
Block a user