mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Dashboard styling; don't allow login if you have no guild perms; allow logging out
This commit is contained in:
parent
a517ca3906
commit
0f724fc9bd
9 changed files with 132 additions and 35 deletions
|
@ -15,8 +15,17 @@ export const authGuard: NavigationGuard = async (to, from, next) => {
|
|||
};
|
||||
|
||||
export const loginCallbackGuard: NavigationGuard = async (to, from, next) => {
|
||||
await RootStore.dispatch("auth/setApiKey", to.query.apiKey);
|
||||
next("/dashboard");
|
||||
if (to.query.apiKey) {
|
||||
await RootStore.dispatch("auth/setApiKey", to.query.apiKey);
|
||||
next("/dashboard");
|
||||
} else {
|
||||
next({
|
||||
path: "/",
|
||||
query: {
|
||||
error: "noaccess",
|
||||
},
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const authRedirectGuard: NavigationGuard = async (to, form, next) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue