svelte state_referenced_locally warning fixes

- change to derived where possible
- suppress warning elsewhere
- discussion here: sveltejs/svelte/issues/17289
This commit is contained in:
Christoph Kluge
2026-01-15 18:17:45 +01:00
parent cd3d133f0d
commit faacf3f343
41 changed files with 167 additions and 127 deletions

View File

@@ -53,7 +53,9 @@
const views = [
{
title: "My Jobs",
// svelte-ignore state_referenced_locally
requiredRole: roles.user,
// svelte-ignore state_referenced_locally
href: `/monitoring/user/${username}`,
icon: "bar-chart-line",
perCluster: false,
@@ -61,7 +63,9 @@
menu: "none",
},
{
// svelte-ignore state_referenced_locally
title: jobsTitle.get(authlevel),
// svelte-ignore state_referenced_locally
requiredRole: roles.user,
href: `/monitoring/jobs/`,
icon: "card-list",
@@ -71,6 +75,7 @@
},
{
title: "Tags",
// svelte-ignore state_referenced_locally
requiredRole: roles.user,
href: "/monitoring/tags/",
icon: "tags",
@@ -79,7 +84,9 @@
menu: "Jobs",
},
{
// svelte-ignore state_referenced_locally
title: usersTitle.get(authlevel),
// svelte-ignore state_referenced_locally
requiredRole: roles.manager,
href: "/monitoring/users/",
icon: "people",
@@ -88,7 +95,9 @@
menu: "Groups",
},
{
// svelte-ignore state_referenced_locally
title: projectsTitle.get(authlevel),
// svelte-ignore state_referenced_locally
requiredRole: roles.manager,
href: "/monitoring/projects/",
icon: "journals",
@@ -98,6 +107,7 @@
},
{
title: "Nodes",
// svelte-ignore state_referenced_locally
requiredRole: roles.support,
href: "/monitoring/systems/",
icon: "hdd-rack",
@@ -107,6 +117,7 @@
},
{
title: "Analysis",
// svelte-ignore state_referenced_locally
requiredRole: roles.support,
href: "/monitoring/analysis/",
icon: "graph-up",
@@ -116,6 +127,7 @@
},
{
title: "Status",
// svelte-ignore state_referenced_locally
requiredRole: roles.admin,
href: "/monitoring/status/",
icon: "clipboard-data",