home: changed links, no need to be logged in anymore

This commit is contained in:
AdrienLSH
2024-05-14 16:23:33 +02:00
parent 3d9e0208a2
commit e376cde2d9
5 changed files with 19 additions and 30 deletions

View File

@ -1,20 +1,17 @@
import { lang } from "../index.js";
import AbstractAuthenticatedView from "./abstracts/AbstractAuthenticatedView.js";
import AbstractView from './abstracts/AbstractView.js'
export default class extends AbstractAuthenticatedView {
constructor(params) {
super(params, 'homeWindowTitle');
this.redirect_url = "/login";
export default class extends AbstractView {
constructor(params) {
super(params, 'homeWindowTitle');
}
async getHtml() {
return /* HTML */ `
async getHtml() {
return /* HTML */ `
<h1>${lang.get('homeTitle', 'Home')}</h1>
<a href="/matchmaking" data-link>${lang.get('homeOnline', 'Play online')}</a>
<a href="/games/pong/offline" data-link>${lang.get('homeOffline', 'Play offline')}</a>
<a href="/games/tictactoe/offline" data-link>${lang.get('ticTacToe')}</a>
<a href="/settings" data-link>${lang.get('homeSettings', 'Settings')}</a>
<a href="/logout" data-link>${lang.get('homeLogout', 'Logout')}</a>
`;
}
<a href="/matchmaking" data-link>${lang.get('homeOnline')}</a>
<a href="/games/pong/offline" data-link>${lang.get('homePongOffline')}</a>
<a href="/games/tictactoe/offline" data-link>${lang.get('homeTicTacToeOffline')}</a>
`;
}
}