added easy list button to tag view

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2025-11-28 14:03:58 +01:00
parent b0550db5c2
commit 60c447a967
3 changed files with 11 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
<script>
import {onMount} from 'svelte';
import { useTinyRouter } from 'svelte-tiny-router';
import { api } from '../../urls.svelte.js';
import { error, yikes } from '../../warn.svelte';
@@ -8,6 +9,7 @@
import Reference from './Reference.svelte';
let { tag } = $props();
let router = useTinyRouter();
let uses = $state(null);
async function loadUses(){
@@ -21,11 +23,17 @@
}
}
function goEasy(){
router.navigate(`/tags/easylist/${tag}`);
}
onMount(loadUses);
</script>
<fieldset>
<legend>{t('tag_uses',{tag:tag})}</legend>
<legend>
{t('tag_uses',{tag:tag})}
<button onclick={goEasy}>{t('easy_list')}</button>
</legend>
{#if uses}
{#each Object.entries(uses) as [module,ids]}
<h2>{t(module.endsWith('s') ? module : `${module}s`)}</h2>

View File

@@ -79,6 +79,7 @@
"due_date": "Fälligkeitsdatum",
"duration": "Dauer",
"easy_list": "Easy List",
"edit": "Bearbeiten",
"edit_object" : "{object} bearbeiten",
"editing": "Nutzer {0} bearbeiten",

View File

@@ -79,6 +79,7 @@
"drag_n_drop": "drag & drop",
"duration": "duration",
"easy_list": "Easy List",
"edit": "edit",
"edit_object" : "edit {object}",
"editing": "edit user {0}",