feat(error): add link to website

This commit is contained in:
Axel Cocat 2022-02-27 18:15:10 +01:00
parent 56c0fed144
commit 94aec140a8
4 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,7 @@
{ {
"aowowUrl": "https://wotlkdb.com", "aowowUrl": "https://wotlkdb.com",
"websiteUrl": "https://mywebsite.com",
"websiteName": "My Website",
"loadDbcs": true, "loadDbcs": true,
"hideGameMasters": true, "hideGameMasters": true,
"realms": [ "realms": [

View file

@ -75,6 +75,8 @@ export class Armory {
this.logger.info("Starting server..."); this.logger.info("Starting server...");
app.locals.aowow = this.config.aowowUrl; app.locals.aowow = this.config.aowowUrl;
app.locals.websiteUrl = this.config.websiteUrl;
app.locals.websiteName = this.config.websiteName;
app.engine(".html", handlebarsEngine({ app.engine(".html", handlebarsEngine({
extname: "html", extname: "html",
partialsDir: path.join(process.cwd(), "static", "partials"), partialsDir: path.join(process.cwd(), "static", "partials"),

View file

@ -20,6 +20,8 @@ export interface IRealmConfig {
export class Config { export class Config {
public aowowUrl: string; public aowowUrl: string;
public websiteUrl: string;
public websiteName: string;
public loadDbcs: boolean; public loadDbcs: boolean;
public hideGameMasters: boolean; public hideGameMasters: boolean;
public realms: IRealmConfig[]; public realms: IRealmConfig[];

View file

@ -10,7 +10,7 @@
<br> <br>
<a class="button is-info" href="/">Back to Armory</a> <a class="button is-info" href="/">Back to Armory</a>
<a class="button is-info">Homepage</a> <a class="button is-info" href="{{websiteUrl}}" target="_parent">{{websiteName}} Homepage</a>
</div> </div>
</div> </div>
</div> </div>