From ec8d0a280640e9e1722bc55f2ab609061a5a39a6 Mon Sep 17 00:00:00 2001 From: Jake Mannens Date: Wed, 30 Aug 2023 01:12:27 +1000 Subject: Made tag names in TagDefinitions clickable --- Pages/Component/MediaTagTable.razor | 2 +- Pages/Component/MediaTagTable.razor.css | 8 ------- Pages/TagDefinitions.razor | 37 ++++++++++++++++++++++++++------- wwwroot/styles/data-table.css | 2 +- wwwroot/styles/global.css | 13 ++++++++++++ 5 files changed, 44 insertions(+), 18 deletions(-) diff --git a/Pages/Component/MediaTagTable.razor b/Pages/Component/MediaTagTable.razor index dedf865..e367f7f 100644 --- a/Pages/Component/MediaTagTable.razor +++ b/Pages/Component/MediaTagTable.razor @@ -19,7 +19,7 @@ } - + @if(e.isImplicit) { @e.tagDef.Name } else { diff --git a/Pages/Component/MediaTagTable.razor.css b/Pages/Component/MediaTagTable.razor.css index 3b5cffe..dcf5e09 100644 --- a/Pages/Component/MediaTagTable.razor.css +++ b/Pages/Component/MediaTagTable.razor.css @@ -1,11 +1,3 @@ td { font-size: 8pt; } - -td:nth-child(2) a { - color: #fff; -} - -td:nth-child(2) a:hover { - color: #999; -} diff --git a/Pages/TagDefinitions.razor b/Pages/TagDefinitions.razor index fad1450..f5339e7 100644 --- a/Pages/TagDefinitions.razor +++ b/Pages/TagDefinitions.razor @@ -9,10 +9,10 @@ - + - + @foreach(var ns in tagNamespaces) { @@ -25,17 +25,32 @@ @foreach(var tagDef in tagDefinitions.Where(td => td.Namespace == ns)) { - + -
@tagDef.Alias@tagDef.Name + + @tagDef.Name + + - @(string.Join(", ", tagDef.ImplicitTags + @{ + var implicitTags = tagDef.ImplicitTags + .Where(td => td.Source == TagSource.UserTag); + foreach(var tag in implicitTags) { + + @tag.Name + + if(tag != implicitTags.Last()) + @(", ") + } + } + +@* @(string.Join(", ", tagDef.ImplicitTags .Where(it => it.Source == TagSource.UserTag) .Select(it => it.Name) .Order())) - +*@ - Search + PromptToEdit(tagDef))>Edit PromptToDelete(tagDef))> Delete @@ -97,7 +112,8 @@ OnSubmit=SetImplicitTags @ref=implicitTagDialog /> - @code { +@code { + private TabContainer tabContainer; private Dialog createTagDialog; private Dialog deleteTagDialog; private Dialog editTagDialog; @@ -146,6 +162,11 @@ .ToArray(); } + private void PromptToCreate() { + var curTitle = tabContainer.ActivePane?.Title; + tagNamespace = curTitle == "Default" ? null : curTitle; + createTagDialog.Show(); + } private void CreateTagDefinition() { if(string.IsNullOrEmpty(tagNamespace)) diff --git a/wwwroot/styles/data-table.css b/wwwroot/styles/data-table.css index 6256fc7..994d625 100644 --- a/wwwroot/styles/data-table.css +++ b/wwwroot/styles/data-table.css @@ -13,7 +13,7 @@ table.data-table > tr > td { } table.data-table > tr:nth-child(2n) { - background: rgba(255, 255, 255, 0.2); + background: rgba(255, 255, 255, 0.1); } table.data-table > tr > td:not(:last-child) { diff --git a/wwwroot/styles/global.css b/wwwroot/styles/global.css index de0a0ac..c0dbe3f 100644 --- a/wwwroot/styles/global.css +++ b/wwwroot/styles/global.css @@ -46,6 +46,19 @@ a:hover { filter: brightness(1.5); } +a::selection { + background: var(--col-accent-pri); + color: #fff; +} + +a.nondecorated { + color: #fff; +} + +a.nondecorated:hover { + color: #999; +} + button, input[type=submit] { color: white; background: var(--col-button-pri); -- cgit v1.3