Make app title configurable

Issue #123
This commit is contained in:
N-Pex 2021-05-19 13:22:28 +02:00
parent 5276a46afa
commit 3c60ad4f14
3 changed files with 15 additions and 4 deletions

View file

@ -7,6 +7,8 @@
</template> </template>
<script> <script>
import config from "./assets/config";
export default { export default {
name: "App", name: "App",
mounted() { mounted() {
@ -31,7 +33,7 @@ export default {
return this.$store.state.auth.user; return this.$store.state.auth.user;
}, },
title() { title() {
var title = "Keanu Weblite"; var title = config.appName;
if (this.$matrix.notificationCount > 0) { if (this.$matrix.notificationCount > 0) {
title += " [" + this.$matrix.notificationCount + "]"; title += " [" + this.$matrix.notificationCount + "]";
} }

View file

@ -1,4 +1,5 @@
{ {
"appName": "Keanu Weblite",
"defaultServer": "https://neo.keanu.im", "defaultServer": "https://neo.keanu.im",
"useShortCodeStickers": false, "useShortCodeStickers": false,
"analytics": { "analytics": {

View file

@ -7,7 +7,15 @@ module.exports = {
? './' ? './'
: './', : './',
devServer: { chainWebpack: config => {
https: true config.plugin('html').tap(args => {
}, var c = require("./src/assets/config.json");
args[0].title = c.appName;
return args;
})
},
devServer: {
//https: true
},
} }