Add auth home.
This commit is contained in:
parent
ec3ebe3356
commit
b66da7bd9d
|
@ -31,6 +31,7 @@ import { AccessHomePage } from "./pages/Access/AccessHome";
|
||||||
|
|
||||||
/* eslint-disable */
|
/* eslint-disable */
|
||||||
import { PageType } from "z-pagerouter";
|
import { PageType } from "z-pagerouter";
|
||||||
|
import { AuthHomePage } from "./pages/Access/Auth/AuthHome";
|
||||||
/* eslint-enable */
|
/* eslint-enable */
|
||||||
|
|
||||||
type pagesList = {
|
type pagesList = {
|
||||||
|
@ -41,6 +42,7 @@ export const allPages: pagesList = {
|
||||||
HOME: new HomePage(),
|
HOME: new HomePage(),
|
||||||
SECRETS_HOME: new SecretsHomePage(),
|
SECRETS_HOME: new SecretsHomePage(),
|
||||||
ACCESS_HOME: new AccessHomePage(),
|
ACCESS_HOME: new AccessHomePage(),
|
||||||
|
AUTH_HOME: new AuthHomePage(),
|
||||||
ME: new MePage(),
|
ME: new MePage(),
|
||||||
TOTP: new TOTPViewPage(),
|
TOTP: new TOTPViewPage(),
|
||||||
NEW_TOTP: new NewTOTPPage(),
|
NEW_TOTP: new NewTOTPPage(),
|
||||||
|
|
|
@ -29,8 +29,7 @@ export class AccessHomePage extends Page {
|
||||||
description: i18next.t("access_auth_methods_description"),
|
description: i18next.t("access_auth_methods_description"),
|
||||||
icon: "sign-in",
|
icon: "sign-in",
|
||||||
onclick: async () => {
|
onclick: async () => {
|
||||||
setErrorText(i18next.t("not_implemented"));
|
await this.router.changePage("AUTH_HOME");
|
||||||
//await this.router.changePage("SECRETS_HOME");
|
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
Tile({
|
Tile({
|
||||||
|
|
18
src/pages/Access/Auth/AuthHome.ts
Normal file
18
src/pages/Access/Auth/AuthHome.ts
Normal 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");
|
||||||
|
}
|
||||||
|
}
|
3
src/translations/en.js
vendored
3
src/translations/en.js
vendored
|
@ -217,4 +217,7 @@ module.exports = {
|
||||||
access_groups_description: "View and manage groups of entities.",
|
access_groups_description: "View and manage groups of entities.",
|
||||||
access_leases_title: "Leases",
|
access_leases_title: "Leases",
|
||||||
access_leases_description: "View and manage the leases of entities.",
|
access_leases_description: "View and manage the leases of entities.",
|
||||||
|
|
||||||
|
// Auth Home Page
|
||||||
|
auth_home_title: "Auth",
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue