fix logo & fallbackimages reload
This commit is contained in:
@@ -16,6 +16,7 @@ v-container
|
|||||||
:label="$t('admin.hide_calendar')")
|
:label="$t('admin.hide_calendar')")
|
||||||
|
|
||||||
v-card-title {{$t('admin.default_images')}}
|
v-card-title {{$t('admin.default_images')}}
|
||||||
|
v-card-subtitle(v-html="$t('admin.default_images_help')")
|
||||||
v-card-text
|
v-card-text
|
||||||
v-row
|
v-row
|
||||||
v-col(cols='4')
|
v-col(cols='4')
|
||||||
@@ -109,12 +110,13 @@ import { mdiDeleteForever, mdiRestore, mdiPlus, mdiChevronUp } from '@mdi/js'
|
|||||||
export default {
|
export default {
|
||||||
name: 'Theme',
|
name: 'Theme',
|
||||||
data () {
|
data () {
|
||||||
|
const t = new Date().getMilliseconds()
|
||||||
return {
|
return {
|
||||||
mdiDeleteForever, mdiRestore, mdiPlus, mdiChevronUp,
|
mdiDeleteForever, mdiRestore, mdiPlus, mdiChevronUp,
|
||||||
valid: false,
|
valid: false,
|
||||||
logoKey: 0,
|
logoKey: t,
|
||||||
fallbackImageKey: 0,
|
fallbackImageKey: t,
|
||||||
headerImageKey: 0,
|
headerImageKey: t,
|
||||||
link: { href: '', label: '' },
|
link: { href: '', label: '' },
|
||||||
linkModal: false
|
linkModal: false
|
||||||
// menu: [false, false, false, false]
|
// menu: [false, false, false, false]
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ module.exports = {
|
|||||||
|
|
||||||
router.use('/fallbackimage.png', (req, res, next) => {
|
router.use('/fallbackimage.png', (req, res, next) => {
|
||||||
const fallbackImagePath = settingsController.settings.fallback_image || './static/noimg.svg'
|
const fallbackImagePath = settingsController.settings.fallback_image || './static/noimg.svg'
|
||||||
return express.static(fallbackImagePath, { maxAge: '1d' })(req, res, next)
|
return express.static(fallbackImagePath)(req, res, next)
|
||||||
})
|
})
|
||||||
|
|
||||||
router.use('/headerimage.png', (req, res, next) => {
|
router.use('/headerimage.png', (req, res, next) => {
|
||||||
@@ -130,12 +130,12 @@ module.exports = {
|
|||||||
|
|
||||||
router.use('/logo.png', (req, res, next) => {
|
router.use('/logo.png', (req, res, next) => {
|
||||||
const logoPath = settingsController.settings.logo || './static/gancio'
|
const logoPath = settingsController.settings.logo || './static/gancio'
|
||||||
return express.static(logoPath + '.png', {maxAge: '1d'})(req, res, next)
|
return express.static(logoPath + '.png')(req, res, next)
|
||||||
})
|
})
|
||||||
|
|
||||||
router.use('/favicon.ico', (req, res, next) => {
|
router.use('/favicon.ico', (req, res, next) => {
|
||||||
const faviconPath = res.locals.settings.logo ? res.locals.settings.logo + '.png' : './assets/favicon.ico'
|
const faviconPath = res.locals.settings.logo ? res.locals.settings.logo + '.png' : './assets/favicon.ico'
|
||||||
return express.static(faviconPath, {maxAge: '1d'})(req, res, next)
|
return express.static(faviconPath)(req, res, next)
|
||||||
})
|
})
|
||||||
|
|
||||||
return router
|
return router
|
||||||
|
|||||||
Reference in New Issue
Block a user