added easy list button to tag view
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -79,6 +79,7 @@
|
||||
"due_date": "Fälligkeitsdatum",
|
||||
"duration": "Dauer",
|
||||
|
||||
"easy_list": "Easy List",
|
||||
"edit": "Bearbeiten",
|
||||
"edit_object" : "{object} bearbeiten",
|
||||
"editing": "Nutzer {0} bearbeiten",
|
||||
|
||||
@@ -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}",
|
||||
|
||||
Reference in New Issue
Block a user