mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-20 06:08:35 +02:00
Added possibility to customize HTML page title in frontend app
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
import { useAuthStore } from '@/stores'
|
||||
import { useGlobalConfig } from '@/main'
|
||||
import constants from '@/constants.json'
|
||||
|
||||
const routes = [
|
||||
@@ -440,6 +441,11 @@ const router = createRouter({
|
||||
})
|
||||
|
||||
router.beforeEach(async (to, from, next) => {
|
||||
const config = useGlobalConfig()
|
||||
|
||||
document.title = config.HTML_PAGE_TITLE
|
||||
? config.HTML_PAGE_TITLE
|
||||
: 'Welcome to Modoboa'
|
||||
if (to.meta.requiresAuth !== undefined) {
|
||||
const previousPage = window.location.href
|
||||
sessionStorage.setItem('previousPage', previousPage)
|
||||
|
||||
Reference in New Issue
Block a user