Migrate tags view

This commit is contained in:
Christoph Kluge 2025-06-05 10:51:32 +02:00
parent 1f103e5ef5
commit 24cf5047da
2 changed files with 13 additions and 6 deletions

View File

@ -24,15 +24,22 @@
init,
} from "./generic/utils.js";
export let username;
export let isAdmin;
export let tagmap;
/* Svelte 5 Props */
let {
username,
isAdmin,
presetTagmap,
} = $props();
/* Const Init */
const {} = init();
const client = getContextClient();
let pendingChange = "none";
/* State Init */
let pendingChange = $state("none");
let tagmap = $state(presetTagmap)
/* Functions */
const removeTagMutation = ({ tagIds }) => {
return mutationStore({
client: client,
@ -96,7 +103,7 @@
<Button
size="sm"
color="danger"
on:click={() => removeTag(tag, tagType)}
onclick={() => removeTag(tag, tagType)}
>
<Icon name="x" />
</Button>

View File

@ -7,7 +7,7 @@ mount(Tags, {
props: {
username: username,
isAdmin: isAdmin,
tagmap: tagmap,
presetTagmap: tagmap,
},
context: new Map([
['cc-config', clusterCockpitConfig]