1
0
Fork 0

Add auth home.

This commit is contained in:
Kitteh 2021-05-18 11:42:11 +01:00
parent ec3ebe3356
commit b66da7bd9d
4 changed files with 24 additions and 2 deletions

View file

@ -31,6 +31,7 @@ import { AccessHomePage } from "./pages/Access/AccessHome";
/* eslint-disable */
import { PageType } from "z-pagerouter";
import { AuthHomePage } from "./pages/Access/Auth/AuthHome";
/* eslint-enable */
type pagesList = {
@ -41,6 +42,7 @@ export const allPages: pagesList = {
HOME: new HomePage(),
SECRETS_HOME: new SecretsHomePage(),
ACCESS_HOME: new AccessHomePage(),
AUTH_HOME: new AuthHomePage(),
ME: new MePage(),
TOTP: new TOTPViewPage(),
NEW_TOTP: new NewTOTPPage(),

View file

@ -29,8 +29,7 @@ export class AccessHomePage extends Page {
description: i18next.t("access_auth_methods_description"),
icon: "sign-in",
onclick: async () => {
setErrorText(i18next.t("not_implemented"));
//await this.router.changePage("SECRETS_HOME");
await this.router.changePage("AUTH_HOME");
},
}),
Tile({

View file

@ -0,0 +1,18 @@
import { Page } from "../../../types/Page";
import i18next from "i18next";
import { setErrorText } from "../../../pageUtils";
export class AuthHomePage extends Page {
constructor() {
super();
}
async goBack(): Promise<void> {
await this.router.changePage("ACCESS_HOME");
}
async render(): Promise<void> {
setErrorText(i18next.t("not_implemented"));
}
get name(): string {
return i18next.t("auth_home_title");
}
}

View file

@ -217,4 +217,7 @@ module.exports = {
access_groups_description: "View and manage groups of entities.",
access_leases_title: "Leases",
access_leases_description: "View and manage the leases of entities.",
// Auth Home Page
auth_home_title: "Auth",
};