diff --git a/frontend/public/config.json b/frontend/public/config.json
index deb53e23c..e5b707031 100644
--- a/frontend/public/config.json
+++ b/frontend/public/config.json
@@ -4,5 +4,6 @@
"OAUTH_AUTHORITY_URL": "https://localhost:8000/api/o",
"OAUTH_CLIENT_ID": "LVQbfIIX3khWR3nDvix1u9yEGHZUxcx53bhJ7FlD",
"OAUTH_REDIRECT_URI": "/login/logged",
- "OAUTH_POST_REDIRECT_URI": "/"
+ "OAUTH_POST_REDIRECT_URI": "/",
+ "MENU_LOGO_PATH": "src/assets/Modoboa_RVB-BLANC-SANS.png"
}
diff --git a/frontend/src/components/shared/NavBar.vue b/frontend/src/components/shared/NavBar.vue
index 2999ca27b..a238a9f0c 100644
--- a/frontend/src/components/shared/NavBar.vue
+++ b/frontend/src/components/shared/NavBar.vue
@@ -8,7 +8,7 @@
>
import { useRouter } from 'vue-router'
import { ref, computed, onMounted } from 'vue'
+import { useGlobalConfig } from '@/main'
import { useGlobalStore, useAuthStore, useLayoutStore } from '@/stores'
import constants from '@/constants.json'
@@ -116,6 +117,7 @@ const globalStore = useGlobalStore()
const authStore = useAuthStore()
const layoutStore = useLayoutStore()
const router = useRouter()
+const globalConfig = useGlobalConfig()
const rail = ref(false)
const drawer = ref(true)
diff --git a/modoboa/core/management/commands/load_initial_data.py b/modoboa/core/management/commands/load_initial_data.py
index e6f605ee9..d5984fa5a 100644
--- a/modoboa/core/management/commands/load_initial_data.py
+++ b/modoboa/core/management/commands/load_initial_data.py
@@ -150,6 +150,10 @@ class Command(BaseCommand):
os.path.dirname(__file__), "../../../frontend_dist/"
)
frontend_target_dir = f"{settings.BASE_DIR}/frontend"
+ if hasattr(settings, "MODOBOA_CUSTOM_LOGO"):
+ logo_path = settings.MODOBOA_CUSTOM_LOGO
+ else:
+ logo_path = f"{frontend_target_dir}/assets/Modoboa_RVB-BLANC-SANS.png"
if os.path.isdir(base_frontend_dir):
shutil.rmtree(frontend_target_dir, ignore_errors=True)
os.makedirs(frontend_target_dir, exist_ok=True)
@@ -164,10 +168,12 @@ class Command(BaseCommand):
fp.write(
f"""{{
"API_BASE_URL": "{base_uri}/api/v2",
+ "API_DOC_URL": "{base_uri}/api/schema-v2/swagger/",
"OAUTH_AUTHORITY_URL": "{base_uri}/api/o",
"OAUTH_CLIENT_ID": "{client_id}",
"OAUTH_REDIRECT_URI": "{redirect_uri}",
- "OAUTH_POST_REDIRECT_URI": "{base_uri}"
+ "OAUTH_POST_REDIRECT_URI": "{base_uri}",
+ "MENU_LOGO_PATH": "{logo_path}"
}}
"""
)