1
0
Fork 0

Update packages.

This commit is contained in:
Kitteh 2021-05-30 09:11:01 +01:00
parent 19c366b3a5
commit 6bb672182a
4 changed files with 22 additions and 19 deletions

View file

@ -1,12 +1,12 @@
{
"devDependencies": {
"@babel/core": "^7.14.3",
"@babel/eslint-parser": "^7.14.3",
"@babel/eslint-parser": "^7.14.4",
"@babel/plugin-proposal-class-properties": "^7.13.0",
"@babel/plugin-proposal-decorators": "^7.14.2",
"@babel/plugin-proposal-object-rest-spread": "^7.14.2",
"@babel/plugin-proposal-object-rest-spread": "^7.14.4",
"@babel/plugin-transform-runtime": "^7.14.3",
"@babel/preset-env": "^7.14.2",
"@babel/preset-env": "^7.14.4",
"@types/file-saver": "^2.0.2",
"@types/prismjs": "^1.16.5",
"@types/uikit": "^3.3.1",
@ -15,18 +15,18 @@
"babel-loader": "^8.2.2",
"clipboard": "^2.0.8",
"codejar": "^3.4.0",
"core-js": "^3.13.0",
"core-js": "^3.13.1",
"css-loader": "^5.2.6",
"date-fns": "^2.21.3",
"date-fns": "^2.22.1",
"eslint": "^7.27.0",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.23.3",
"eslint-plugin-import": "^2.23.4",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-sort-imports-es6-autofix": "^0.6.0",
"file-saver": "^2.0.5",
"git-revision-webpack-plugin": "^5.0.0",
"html-webpack-plugin": "^5.3.1",
"i18next": "^20.3.0",
"i18next": "^20.3.1",
"mini-css-extract-plugin": "^1.6.0",
"node-sass": "^6.0.0",
"normalize.css": "^8.0.1",
@ -37,11 +37,11 @@
"raw-loader": "^4.0.2",
"sass-loader": "^11.1.1",
"ts-loader": "^9.2.2",
"typescript": "^4.2.4",
"typescript": "^4.3.2",
"uikit": "^3.6.22",
"webpack": "^5.37.1",
"webpack": "^5.38.1",
"webpack-cli": "^4.7.0",
"webpack-dev-server": "^3.11.2",
"z-pagerouter": "^1.0.2"
"z-pagerouter": "^1.0.5"
}
}

View file

@ -107,6 +107,7 @@ class PageList {
constructor(pages: pagesList) {
this.pages = pages;
}
private pages: pagesList;
async getPageIDs(): Promise<string[]> {

View file

@ -46,12 +46,14 @@ async function onLoad(): Promise<void> {
document.body,
);
const pageRouter = new PageRouter(
pageList,
pageState,
document.getElementById("pageContent"),
document.getElementById("pageTitle"),
);
const pageRouter = new PageRouter({
pageList: pageList,
state: pageState,
pageTitleElement: document.querySelector("#pageTitle"),
pageContentElement: document.querySelector("#pageContent"),
resetElementContent: !true,
});
reloadNavBar(pageRouter);

View file

@ -45,7 +45,7 @@ export class TokenLoginForm extends Component<{ page: Page }, unknown> {
await page.router.changePage("HOME");
} catch (e: unknown) {
const error = e as Error;
document.getElementById("tokenInput").classList.add("uk-form-danger");
document.querySelector("#tokenInput").classList.add("uk-form-danger");
if (error.message == "permission denied") {
setErrorText(i18next.t("log_in_token_login_error"));
} else {
@ -104,8 +104,8 @@ export class UsernameLoginForm extends Component<{ page: Page }, unknown> {
await page.router.changePage("HOME");
} catch (e: unknown) {
const error = e as Error;
document.getElementById("usernameInput").classList.add("uk-form-danger");
document.getElementById("passwordInput").classList.add("uk-form-danger");
document.querySelector("#usernameInput").classList.add("uk-form-danger");
document.querySelector("#passwordInput").classList.add("uk-form-danger");
setErrorText(error.message);
}
}