diff --git a/api/org/list.go b/api/org/list.go
index 033579b..76e6ddb 100644
--- a/api/org/list.go
+++ b/api/org/list.go
@@ -13,7 +13,7 @@ import (
type ListRequest struct {
Page int `json:"page" src:"query" default:"1"`
PageSize int `json:"page_size" src:"query" default:"20"`
- Keyword string `json:"keyword" src:"query"`
+ Keyword string `json:"keyword" src:"query" default:""`
}
type ListResponse struct {
diff --git a/ui/env.js b/ui/env.js
index c0add29..51d44bd 100644
--- a/ui/env.js
+++ b/ui/env.js
@@ -28,7 +28,7 @@ export default async ($env) => {
try {
await vbase.refresh();
} catch (e) {
- vbase.logout(to.fullPath);
+ vbase.logout('/login?redirect=' + encodeURIComponent(to.fullPath));
return false;
}
}
@@ -37,7 +37,7 @@ export default async ($env) => {
try {
await vbase.fetchUser();
} catch (e) {
- vbase.logout(to.fullPath);
+ vbase.logout('/login?redirect=' + encodeURIComponent(to.fullPath));
return false;
}
}
@@ -50,11 +50,6 @@ export default async ($env) => {
return false;
}
}
- } else if (isGuest) {
- if (!vbase.isExpired()) {
- next('/');
- return false;
- }
}
next();
diff --git a/ui/layout/default.html b/ui/layout/default.html
index e6ebb58..8803cc6 100644
--- a/ui/layout/default.html
+++ b/ui/layout/default.html
@@ -157,12 +157,12 @@
// Define Menu Items
menuItems = [
- {label: $t('nav.dashboard'), icon: "", path: "/"},
- {label: $t('nav.org'), icon: "", path: "/org"},
- {label: $t('nav.profile'), icon: "", path: "/profile"},
+ {label: () => $t('nav.dashboard'), icon: "", path: "/"},
+ {label: () => $t('nav.org'), icon: "", path: "/org"},
+ {label: () => $t('nav.profile'), icon: "", path: "/profile"},
// Admin only items would be filtered here ideally
- {label: $t('nav.users'), icon: "", path: "/users"},
- {label: $t('nav.oauth'), icon: "", path: "/oauth/apps"},
+ {label: () => $t('nav.users'), icon: "", path: "/users"},
+ {label: () => $t('nav.oauth'), icon: "", path: "/oauth/apps"},
];
currentRouteName = "";
@@ -186,34 +186,12 @@
};