From 878027b9ad7767e072884f2d100be0c8472c8f48 Mon Sep 17 00:00:00 2001 From: Hans-Joachim Michl Date: Sun, 8 Mar 2026 23:15:09 +0100 Subject: [PATCH] headscale api changes tags in node object for version 0.28 (#216) --- src/lib/common/classes.ts | 4 +--- src/lib/common/searching.svelte | 2 +- src/lib/devices/DeviceCard/DeviceTags.svelte | 6 ++++-- src/lib/devices/DeviceCard/DeviceTags/NewDeviceTag.svelte | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/lib/common/classes.ts b/src/lib/common/classes.ts index d66c622..e4b61f6 100644 --- a/src/lib/common/classes.ts +++ b/src/lib/common/classes.ts @@ -4,9 +4,7 @@ export class Device { public givenName: string = ''; public lastSeen: string = ''; public ipAddresses: string[] = []; - public forcedTags: string[] = []; - public validTags: string[] = []; - public invalidTags: string[] = []; + public tags: string[] = []; public approvedRoutes: string[] = []; public availableRoutes: string[] = []; public subnetRoutes: string[] = []; diff --git a/src/lib/common/searching.svelte b/src/lib/common/searching.svelte index 68ab937..2eb884c 100644 --- a/src/lib/common/searching.svelte +++ b/src/lib/common/searching.svelte @@ -23,7 +23,7 @@ // only run if we have search contents set if (get(deviceSearchStore)) { let searcher = new Fuse(get(deviceStore), { - keys: ['id', 'givenName', 'name', 'forcedTags', 'validTags', 'user.name'] + keys: ['id', 'givenName', 'name', 'tags', 'user.name'] }); // search using the searchstore term, and take the resultant array contents and set it to userFilterStore diff --git a/src/lib/devices/DeviceCard/DeviceTags.svelte b/src/lib/devices/DeviceCard/DeviceTags.svelte index 6a7f5d8..34059d2 100644 --- a/src/lib/devices/DeviceCard/DeviceTags.svelte +++ b/src/lib/devices/DeviceCard/DeviceTags.svelte @@ -6,7 +6,7 @@ export let device = new Device(); function updateTagsAction(tag: String) { - let tagList = device.forcedTags; + let tagList = device.tags; // remove tag we're trying to remove tagList = tagList.filter(element => element !== tag); @@ -18,12 +18,14 @@ $alertStore = error; }); } + +
- {#each device.forcedTags as tag} + {#each device.tags as tag} {tag.replace("tag:","")}