Adding views as git submodule

This commit is contained in:
Fabian Stamm 2020-03-09 18:09:30 +01:00
parent 8edfaba134
commit 78927bffe1
6 changed files with 54 additions and 2029 deletions

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "views_repo"]
path = views_repo
url = ./views_repo/

View File

@ -1,39 +1,40 @@
{
"User not found": "Benutzer nicht gefunden",
"Password or username wrong": "Passwort oder Benutzername falsch",
"Authorize %s": "Authorize %s",
"Login": "Einloggen",
"You are not logged in or your login is expired": "Du bist nicht länger angemeldet oder deine Anmeldung ist abgelaufen.",
"Username or Email": "Benutzername oder Email",
"Password": "Passwort",
"Next": "Weiter",
"Register": "Registrieren",
"Mail": "Mail",
"Repeat Password": "Passwort wiederholen",
"Username": "Benutzername",
"Name": "Name",
"Registration code": "Registrierungs Schlüssel",
"You need to select one of the options": "Du musst eine der Optionen auswälen",
"Male": "Mann",
"Female": "Frau",
"Other": "Anderes",
"Registration code required": "Registrierungs Schlüssel benötigt",
"Username required": "Benutzername benötigt",
"Name required": "Name benötigt",
"Mail required": "Mail benötigt",
"The passwords do not match": "Die Passwörter stimmen nicht überein",
"Password is required": "Password benötigt",
"Invalid registration code": "Ungültiger Registrierungs Schlüssel",
"Username taken": "Benutzername nicht verfügbar",
"Mail linked with other account": "Mail ist bereits mit einem anderen Account verbunden",
"Registration code already used": "Registrierungs Schlüssel wurde bereits verwendet",
"Administration": "Administration",
"Field {{field}} is not defined": "Feld {{field}} fehlt",
"Field {{field}} has wrong type. It should be from type {{type}}": "Feld {{field}} hat den falschen Typ. Es sollte vom Typ {{type}} sein",
"Client has no permission for acces password auth": "Dieser Client hat keine Berechtigung password auth zu benutzen",
"Invalid token": "Ungültiger Token",
"By clicking on ALLOW, you allow this app to access the requested recources.": "Wenn sie ALLOW drücken, berechtigen sie die Applikation die beantragten Resourcen zu benutzen.",
"User": "User",
"No special token": "No special token",
"Login token invalid": "Login token invalid"
{
"User not found": "Benutzer nicht gefunden",
"Password or username wrong": "Passwort oder Benutzername falsch",
"Authorize %s": "Authorize %s",
"Login": "Einloggen",
"You are not logged in or your login is expired": "Du bist nicht länger angemeldet oder deine Anmeldung ist abgelaufen.",
"Username or Email": "Benutzername oder Email",
"Password": "Passwort",
"Next": "Weiter",
"Register": "Registrieren",
"Mail": "Mail",
"Repeat Password": "Passwort wiederholen",
"Username": "Benutzername",
"Name": "Name",
"Registration code": "Registrierungs Schlüssel",
"You need to select one of the options": "Du musst eine der Optionen auswälen",
"Male": "Mann",
"Female": "Frau",
"Other": "Anderes",
"Registration code required": "Registrierungs Schlüssel benötigt",
"Username required": "Benutzername benötigt",
"Name required": "Name benötigt",
"Mail required": "Mail benötigt",
"The passwords do not match": "Die Passwörter stimmen nicht überein",
"Password is required": "Password benötigt",
"Invalid registration code": "Ungültiger Registrierungs Schlüssel",
"Username taken": "Benutzername nicht verfügbar",
"Mail linked with other account": "Mail ist bereits mit einem anderen Account verbunden",
"Registration code already used": "Registrierungs Schlüssel wurde bereits verwendet",
"Administration": "Administration",
"Field {{field}} is not defined": "Feld {{field}} fehlt",
"Field {{field}} has wrong type. It should be from type {{type}}": "Feld {{field}} hat den falschen Typ. Es sollte vom Typ {{type}} sein",
"Client has no permission for acces password auth": "Dieser Client hat keine Berechtigung password auth zu benutzen",
"Invalid token": "Ungültiger Token",
"By clicking on ALLOW, you allow this app to access the requested recources.": "Wenn sie ALLOW drücken, berechtigen sie die Applikation die beantragten Resourcen zu benutzen.",
"User": "User",
"No special token": "No special token",
"Login token invalid": "Login token invalid",
"No login token": "No login token"
}

1982
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -6,13 +6,14 @@
"license": "MIT",
"scripts": {
"start": "node lib/index.js",
"install": "cd views && npm install",
"install": "cd views && npm install && cd .. && git submodule init && git submodule update && cd views_repo && npm i ",
"build-doc": "apidoc -i src/ -p apidoc/",
"build-ts": "tsc",
"build": "tsc && cd views && npm run build && cd ..",
"build": "tsc && cd views && npm run build && cd .. && cd views_repo && npm run build",
"build-server": "tsc",
"watch-ts": "tsc -w",
"watch-views": "cd views && npm run watch",
"watch-views_repo": "cd views_repo && npm run dev",
"watch-node": "nodemon --ignore ./views lib/index.js",
"watch": "concurrently \"npm:watch-*\""
},
@ -40,7 +41,6 @@
"@hibas123/config": "^1.1.0",
"@hibas123/nodelogging": "^2.1.4",
"@hibas123/nodeloggingserver_client": "^1.1.2",
"@hibas123/openauth-views": "file:../Views",
"@hibas123/safe_mongo": "^1.6.1",
"body-parser": "^1.19.0",
"compression": "^1.7.4",
@ -61,4 +61,4 @@
"u2f": "^0.1.3",
"uuid": "^7.0.2"
}
}
}

View File

@ -1,4 +1,4 @@
import { Router, IRouter, Request } from "express"
import { Router, IRouter, Request, static as ServeStatic } from "express"
import GetLoginPage from "./login";
import GetAuthPage from "./authorize";
import promiseMiddleware from "../helper/promiseMiddleware";
@ -29,10 +29,12 @@ ViewRouter.get("/register", (req, res) => {
res.send(GetRegistrationPage(req.__));
})
ViewRouter.get("/login", (req, res) => {
res.setHeader("Cache-Control", "public, max-age=" + cacheTime);
res.send(GetLoginPage(req.__))
})
ViewRouter.use("/login", ServeStatic("./views_repo/build/login"));
// ViewRouter.use("/login", (req, res) => {
// res.setHeader("Cache-Control", "public, max-age=" + cacheTime);
// res.send(GetLoginPage(req.__))
// })
ViewRouter.get("/code", (req, res) => {
res.setHeader("Cache-Control", "no-cache");

1
views_repo Submodule

@ -0,0 +1 @@
Subproject commit 415200de4fc88a905f5865c5fb1d98832114dfad