Allow logo and accentColor to be set in config/runtimeConfig

This commit is contained in:
N-Pex 2023-04-26 11:39:32 +02:00
parent 6cd47a88c0
commit 61720b8440
9 changed files with 71 additions and 27 deletions

View file

@ -4,7 +4,7 @@
<v-container fluid class="text-center mt-8">
<v-row align="center" justify="center">
<v-col class="text-center" cols="auto">
<v-img contain src="@/assets/logo.svg" width="64" height="64" />
<v-img contain :src="logotype" width="64" height="64" />
</v-col>
</v-row>
</v-container>
@ -42,12 +42,13 @@
<script>
import RoomList from "../components/RoomList";
import YouAre from "../components/YouAre.vue";
import logoMixin from "../components/logoMixin";
export default {
components: {
RoomList,
YouAre,
},
mixins: [logoMixin],
computed: {
loading() {
return !this.$matrix.ready;

View file

@ -123,7 +123,7 @@
<div class="d-flex justify-center align-center mt-9">
<div class="mr-2">
<img src="@/assets/logo.svg" width="32" height="32" contain class="d-inline" />
<img :src="logotype" width="32" height="32" contain class="d-inline" />
</div>
<div>
<strong>{{ $t("project.name") }}</strong>
@ -138,12 +138,12 @@ import util from "../plugins/utils";
import InteractiveAuth from './InteractiveAuth.vue';
import LanguageMixin from "./languageMixin";
import rememberMeMixin from "./rememberMeMixin";
import logoMixin from "./logoMixin";
import SelectLanguageDialog from "./SelectLanguageDialog.vue";
export default {
name: "Join",
mixins: [LanguageMixin, rememberMeMixin],
mixins: [LanguageMixin, rememberMeMixin, logoMixin],
components: {
SelectLanguageDialog,
InteractiveAuth

View file

@ -5,7 +5,7 @@
<v-row no-gutters>
<v-col>
<v-img
src="@/assets/logo.svg"
:src="logotype"
width="32"
height="32"
contain
@ -106,10 +106,11 @@ import User from "../models/user";
import util from "../plugins/utils";
import rememberMeMixin from "./rememberMeMixin";
import * as sdk from "matrix-js-sdk";
import logoMixin from "./logoMixin";
export default {
name: "Login",
mixins:[rememberMeMixin],
mixins:[rememberMeMixin, logoMixin],
data() {
return {
user: new User(this.$config.defaultServer, "", ""),

View file

@ -0,0 +1,10 @@
export default {
computed: {
logotype() {
if (this.$config.logo) {
return this.$config.logo;
}
return require("@/assets/logo.svg");
}
}
}