mirror of
https://github.com/immich-app/immich.git
synced 2025-07-09 03:04:16 -04:00
fix(web): the selected tab on the sidebar was not always shown as selected (#9084)
fix(web): the selected tab on the sidebar was not always shown as selected. Used regex to get necessary portion for comparison
This commit is contained in:
parent
912d0c4d74
commit
40899f6137
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
let showMoreInformation = false;
|
let showMoreInformation = false;
|
||||||
$: routePath = resolveRoute(routeId, {});
|
$: routePath = resolveRoute(routeId, {});
|
||||||
$: isSelected = $page.route.id === routeId;
|
$: isSelected = ($page.route.id?.match(/^\/(admin|\(user\))\/[^/]*/) || [])[0] === routeId;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<a
|
<a
|
||||||
@ -24,7 +24,7 @@
|
|||||||
aria-current={isSelected ? 'page' : undefined}
|
aria-current={isSelected ? 'page' : undefined}
|
||||||
class="flex w-full place-items-center justify-between gap-4 rounded-r-full py-3 transition-[padding] delay-100 duration-100 hover:cursor-pointer hover:bg-immich-gray hover:text-immich-primary dark:text-immich-dark-fg dark:hover:bg-immich-dark-gray dark:hover:text-immich-dark-primary
|
class="flex w-full place-items-center justify-between gap-4 rounded-r-full py-3 transition-[padding] delay-100 duration-100 hover:cursor-pointer hover:bg-immich-gray hover:text-immich-primary dark:text-immich-dark-fg dark:hover:bg-immich-dark-gray dark:hover:text-immich-dark-primary
|
||||||
{isSelected
|
{isSelected
|
||||||
? 'bg-immich-primary/10 text-immich-primary hover:bg-immich-primary/25 dark:bg-immich-dark-primary/10 dark:text-immich-dark-primary'
|
? 'bg-immich-primary/10 text-immich-primary hover:bg-immich-primary/10 dark:bg-immich-dark-primary/10 dark:text-immich-dark-primary'
|
||||||
: ''}
|
: ''}
|
||||||
pl-5 group-hover:sm:px-5 md:px-5
|
pl-5 group-hover:sm:px-5 md:px-5
|
||||||
"
|
"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user