diff --git a/.env.example b/.env.example index c6c9449..c600f23 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ ACORE_ARMORY_AOWOW_URL="https://wotlkdb.com" ACORE_ARMORY_WEBSITE_URL="https://mywebsite.com" ACORE_ARMORY_WEBSITE_NAME="My Website" +ACORE_ARMORY_WEBSITE_ROOT="" ACORE_ARMORY_IFRAME_MODE__ENABLED=0 ACORE_ARMORY_IFRAME_MODE__URL="https://mywebsite.com/armory" ACORE_ARMORY_LOAD_DBCS=1 diff --git a/config.default.json b/config.default.json index d8dfecc..f05a2cf 100644 --- a/config.default.json +++ b/config.default.json @@ -2,6 +2,7 @@ "aowowUrl": "https://wotlkdb.com", "websiteUrl": "https://mywebsite.com", "websiteName": "My Website", + "websiteRoot": "", "iframeMode": { "enabled": false, "url": "https://mywebsite.com/armory" diff --git a/package-lock.json b/package-lock.json index 61d1ea0..f1eaaf4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "azerothcore-armory", - "version": "0.12.0", + "version": "0.13.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "azerothcore-armory", - "version": "0.12.0", + "version": "0.13.0", "license": "MIT", "dependencies": { "@supercharge/promise-pool": "^2.1.0", diff --git a/package.json b/package.json index 759f051..fbfd622 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "azerothcore-armory", - "version": "0.12.0", + "version": "0.13.0", "description": "", "scripts": { "build": "tsc -p tsconfig.json", diff --git a/src/armory/Armory.ts b/src/armory/Armory.ts index 7b9437b..2fbaf0a 100644 --- a/src/armory/Armory.ts +++ b/src/armory/Armory.ts @@ -78,10 +78,19 @@ export class Armory { this.logger.info("Starting server..."); - app.locals.aowow = this.config.aowowUrl; - app.locals.websiteUrl = this.config.websiteUrl; - app.locals.websiteName = this.config.websiteName; - app.locals.iframeMode = this.config.iframeMode; + const locals = { + aowow: this.config.aowowUrl, + websiteUrl: this.config.websiteUrl, + websiteName: this.config.websiteName, + websiteRoot: this.config.websiteRoot, + iframeMode: this.config.iframeMode, + }; + for (const key in locals) { + if (locals.hasOwnProperty(key)) { + app.locals[key] = locals[key]; + } + } + app.locals.locals = locals; app.engine(".hbs", handlebarsEngine({ extname: "hbs", diff --git a/src/armory/Config.ts b/src/armory/Config.ts index cca3e95..3a9427f 100644 --- a/src/armory/Config.ts +++ b/src/armory/Config.ts @@ -27,6 +27,7 @@ export class Config { public aowowUrl: string; public websiteUrl: string; public websiteName: string; + public websiteRoot: string; public iframeMode: IIframeModeConfig; public loadDbcs: boolean; public hideGameMasters: boolean; diff --git a/static/character-achievements.hbs b/static/character-achievements.hbs index 783fcd4..78975ab 100644 --- a/static/character-achievements.hbs +++ b/static/character-achievements.hbs @@ -1,4 +1,13 @@ - + + {{> icons }} @@ -8,7 +17,7 @@
+
+
{{else}}
-
+
{{/eq}}
+
Alliance
+
Horde