mirror of
https://github.com/mickael-kerjean/filestash
synced 2025-12-06 08:22:24 +01:00
fix (tagging): tagging UX
This commit is contained in:
parent
cead2ef558
commit
1a97bbf431
2 changed files with 6 additions and 2 deletions
|
|
@ -134,6 +134,9 @@ body.touch-no .component_filemanager_shell .component_sidebar h3 img:hover {
|
|||
color: #f2f2f2;
|
||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
.dark-mode .component_filemanager_shell .component_sidebar [data-bind="taglist"] a[aria-selected="true"] {
|
||||
background: var(--border);
|
||||
}
|
||||
.component_filemanager_shell .component_sidebar [data-bind="taglist"] a[aria-selected="true"] svg {
|
||||
opacity: 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -277,6 +277,7 @@ async function ctrlTagPane(render) {
|
|||
`);
|
||||
render($page);
|
||||
|
||||
const path = getCurrentPath("(/view/|/files/)");
|
||||
effect(rxjs.merge(
|
||||
rxjs.of(tagcache).pipe(rxjs.filter((cache) => cache)),
|
||||
ajax({
|
||||
|
|
@ -285,7 +286,7 @@ async function ctrlTagPane(render) {
|
|||
responseType: "json",
|
||||
body: JSON.stringify({
|
||||
"tags": [],
|
||||
"path": getCurrentPath("(/view/|/files/)"),
|
||||
path,
|
||||
}),
|
||||
}).pipe(
|
||||
rxjs.map(({ responseJSON }) =>
|
||||
|
|
@ -316,7 +317,7 @@ async function ctrlTagPane(render) {
|
|||
`);
|
||||
const url = new URL(location.href);
|
||||
if (url.searchParams.getAll("tag").indexOf(name) === -1) {
|
||||
$tag.setAttribute("href", forwardURLParams(getCurrentPath() + "?tag=" + name, ["share", "tag"]));
|
||||
$tag.setAttribute("href", forwardURLParams(toHref("/files" + path.replace(new RegExp("[^\/]+$"), "") + "?tag=" + name), ["share", "tag"]));
|
||||
} else {
|
||||
url.searchParams.delete("tag", name);
|
||||
$tag.setAttribute("href", url.toString());
|
||||
|
|
|
|||
Loading…
Reference in a new issue