web/admin: default to users path in sidebar link
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
5f4812e1d0
commit
2a2ae4bc4f
|
@ -123,7 +123,8 @@ export class SidebarItem extends LitElement {
|
|||
return false;
|
||||
}
|
||||
if (this.path) {
|
||||
if (new RegExp(`^${this.path}$`).exec(path)) {
|
||||
const ourPath = this.path.split(";")[0];
|
||||
if (new RegExp(`^${ourPath}$`).exec(path)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -267,7 +267,11 @@ export class AdminInterface extends LitElement {
|
|||
<ak-sidebar-item>
|
||||
<span slot="label">${t`Directory`}</span>
|
||||
<ak-sidebar-item
|
||||
path="/identity/users"
|
||||
path=${`/identity/users;${encodeURIComponent(
|
||||
JSON.stringify({
|
||||
path: "users",
|
||||
}),
|
||||
)}`}
|
||||
.activeWhen=${[`^/identity/users/(?<id>${ID_REGEX})$`]}
|
||||
>
|
||||
<span slot="label">${t`Users`}</span>
|
||||
|
|
Reference in New Issue