forked from Mirrors/elk
feat: use blue favicon for dev/preview mode
This commit is contained in:
parent
834eca2ad2
commit
d0ec3676b8
3 changed files with 6 additions and 5 deletions
9
app.vue
9
app.vue
|
@ -1,12 +1,13 @@
|
|||
<script setup>
|
||||
import { APP_NAME } from './constants'
|
||||
|
||||
const isDev = process.dev
|
||||
const isPreview = window.location.hostname.includes('deploy-preview')
|
||||
|
||||
useHead({
|
||||
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${import.meta.env.DEV ? ' (dev)' : window.location.hostname.includes('deploy-preview') ? '(preview)' : ''}`,
|
||||
titleTemplate: title => `${title ? `${title} | ` : ''}${APP_NAME}${isDev ? ' (dev)' : isPreview ? ' (preview)' : ''}`,
|
||||
link: [
|
||||
{
|
||||
rel: 'icon', type: 'image/svg+png', href: '/favicon.png',
|
||||
},
|
||||
{ rel: 'icon', type: 'image/svg+png', href: isDev || isPreview ? '/favicon-dev.png' : '/favicon.png' },
|
||||
],
|
||||
})
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<script setup>
|
||||
const sub = import.meta.env.DEV ? 'dev' : window.location.hostname.includes('deploy-preview') ? 'preview' : 'alpha'
|
||||
const sub = process.dev ? 'dev' : window.location.hostname.includes('deploy-preview') ? 'preview' : 'alpha'
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
|
BIN
public/favicon-dev.png
Normal file
BIN
public/favicon-dev.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3 KiB |
Loading…
Reference in a new issue