Use custom logo also in webmail

fix #3648
This commit is contained in:
Antoine Nguyen
2025-08-19 12:15:35 +02:00
parent 6cc9579b70
commit 83d416730f
4 changed files with 46 additions and 29 deletions
+2 -11
View File
@@ -93,7 +93,7 @@
<script setup>
import { useRouter } from 'vue-router'
import { ref, computed, onMounted } from 'vue'
import { useGlobalConfig } from '@/main'
import { useLogos } from '@/composables/logos'
import { useGlobalStore, useAuthStore, useLayoutStore } from '@/stores'
import constants from '@/constants.json'
@@ -117,7 +117,7 @@ const globalStore = useGlobalStore()
const authStore = useAuthStore()
const layoutStore = useLayoutStore()
const router = useRouter()
const globalConfig = useGlobalConfig()
const { menuLogoPath } = useLogos()
const rail = ref(false)
const drawer = ref(true)
@@ -131,15 +131,6 @@ const displayInformationBell = computed(
globalStore.notifications.length !== 0
)
const menuLogoPath = computed(() => {
if (globalConfig.MENU_LOGO_PATH) {
return globalConfig.MENU_LOGO_PATH
}
const imgUrl = new URL('@/assets/Modoboa_RVB-BLANC-SANS.png', import.meta.url)
.href
return imgUrl
})
function displayMenuItem(item) {
if (isAuthenticated.value) {
const condition =
+8 -13
View File
@@ -7,7 +7,11 @@
>
<ConfirmDialog ref="confirm" />
<v-stepper-header class="align-center px-10">
<v-img :src="logoPath" max-width="190" class="hidden-sm-and-down" />
<v-img
:src="creationFormLogoPath"
max-width="190"
class="hidden-sm-and-down"
/>
<v-stepper-item
v-for="(step, index) in steps"
:key="step.name"
@@ -101,13 +105,13 @@
<script setup lang="js">
import ConfirmDialog from './ConfirmDialog'
import CreationSummary from './CreationSummary.vue'
import { computed, ref } from 'vue'
import { ref } from 'vue'
import { useGettext } from 'vue3-gettext'
import { useDisplay } from 'vuetify'
import { useGlobalConfig } from '@/main'
import { useLogos } from '@/composables/logos'
const { smAndDown } = useDisplay()
const globalConfig = useGlobalConfig()
const { creationFormLogoPath } = useLogos()
const props = defineProps({
title: { type: String, default: '' },
@@ -122,15 +126,6 @@ const currentStep = ref(1)
const working = ref(false)
const confirm = ref()
const logoPath = computed(() => {
if (globalConfig.CREATION_FORM_LOGO_PATH) {
return globalConfig.CREATION_FORM_LOGO_PATH
}
const imgUrl = new URL('@/assets/Modoboa_RVB-BLEU-SANS.png', import.meta.url)
.href
return imgUrl
})
const emit = defineEmits(['close', 'create', 'validationError'])
const { $gettext } = useGettext()
+33
View File
@@ -0,0 +1,33 @@
import { computed } from 'vue'
import { useGlobalConfig } from '@/main'
export function useLogos() {
const globalConfig = useGlobalConfig()
const menuLogoPath = computed(() => {
if (globalConfig.MENU_LOGO_PATH) {
return globalConfig.MENU_LOGO_PATH
}
const imgUrl = new URL(
'@/assets/Modoboa_RVB-BLANC-SANS.png',
import.meta.url
).href
return imgUrl
})
const creationFormLogoPath = computed(() => {
if (globalConfig.CREATION_FORM_LOGO_PATH) {
return globalConfig.CREATION_FORM_LOGO_PATH
}
const imgUrl = new URL(
'@/assets/Modoboa_RVB-BLEU-SANS.png',
import.meta.url
).href
return imgUrl
})
return {
menuLogoPath,
creationFormLogoPath,
}
}
@@ -10,11 +10,7 @@
>
<template #prepend>
<div class="d-flex align-center">
<v-img
src="@/assets/Modoboa_RVB-BLANC-SANS.png"
max-width="190"
class="logo"
/>
<v-img :src="menuLogoPath" max-width="190" class="logo" />
<v-btn
:icon="rail ? 'mdi-chevron-right' : 'mdi-chevron-left'"
variant="text"
@@ -99,6 +95,7 @@ import { computed, ref, watch } from 'vue'
import { useRoute, useRouter } from 'vue-router'
import { useGettext } from 'vue3-gettext'
import { useBusStore } from '@/stores'
import { useLogos } from '@/composables/logos'
import ConfirmDialog from '@/components/tools/ConfirmDialog.vue'
import ConnectedLayout from '@/layouts/connected/ConnectedLayout.vue'
import MailboxForm from '@/components/webmail/MailboxForm.vue'
@@ -109,6 +106,7 @@ const { $gettext } = useGettext()
const route = useRoute()
const router = useRouter()
const busStore = useBusStore()
const { menuLogoPath } = useLogos()
const confirm = ref()
const drawer = ref(true)