diff --git a/src/allPages.ts b/src/allPages.ts index 27d1994..969a6ff 100644 --- a/src/allPages.ts +++ b/src/allPages.ts @@ -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(), diff --git a/src/pages/Access/AccessHome.ts b/src/pages/Access/AccessHome.ts index 398ff0c..a63bc24 100644 --- a/src/pages/Access/AccessHome.ts +++ b/src/pages/Access/AccessHome.ts @@ -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({ diff --git a/src/pages/Access/Auth/AuthHome.ts b/src/pages/Access/Auth/AuthHome.ts new file mode 100644 index 0000000..21a3305 --- /dev/null +++ b/src/pages/Access/Auth/AuthHome.ts @@ -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 { + await this.router.changePage("ACCESS_HOME"); + } + async render(): Promise { + setErrorText(i18next.t("not_implemented")); + } + get name(): string { + return i18next.t("auth_home_title"); + } +} diff --git a/src/translations/en.js b/src/translations/en.js index 9123856..fbbf4ff 100644 --- a/src/translations/en.js +++ b/src/translations/en.js @@ -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", };