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;
|
color: #f2f2f2;
|
||||||
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
|
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 {
|
.component_filemanager_shell .component_sidebar [data-bind="taglist"] a[aria-selected="true"] svg {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -277,6 +277,7 @@ async function ctrlTagPane(render) {
|
||||||
`);
|
`);
|
||||||
render($page);
|
render($page);
|
||||||
|
|
||||||
|
const path = getCurrentPath("(/view/|/files/)");
|
||||||
effect(rxjs.merge(
|
effect(rxjs.merge(
|
||||||
rxjs.of(tagcache).pipe(rxjs.filter((cache) => cache)),
|
rxjs.of(tagcache).pipe(rxjs.filter((cache) => cache)),
|
||||||
ajax({
|
ajax({
|
||||||
|
|
@ -285,7 +286,7 @@ async function ctrlTagPane(render) {
|
||||||
responseType: "json",
|
responseType: "json",
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"path": getCurrentPath("(/view/|/files/)"),
|
path,
|
||||||
}),
|
}),
|
||||||
}).pipe(
|
}).pipe(
|
||||||
rxjs.map(({ responseJSON }) =>
|
rxjs.map(({ responseJSON }) =>
|
||||||
|
|
@ -316,7 +317,7 @@ async function ctrlTagPane(render) {
|
||||||
`);
|
`);
|
||||||
const url = new URL(location.href);
|
const url = new URL(location.href);
|
||||||
if (url.searchParams.getAll("tag").indexOf(name) === -1) {
|
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 {
|
} else {
|
||||||
url.searchParams.delete("tag", name);
|
url.searchParams.delete("tag", name);
|
||||||
$tag.setAttribute("href", url.toString());
|
$tag.setAttribute("href", url.toString());
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue