feat: use blue favicon for dev/preview mode
This commit is contained in:
parent
834eca2ad2
commit
d0ec3676b8
9
app.vue
9
app.vue
|
@ -1,12 +1,13 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { APP_NAME } from './constants'
|
import { APP_NAME } from './constants'
|
||||||
|
|
||||||
|
const isDev = process.dev
|
||||||
|
const isPreview = window.location.hostname.includes('deploy-preview')
|
||||||
|
|
||||||
useHead({
|
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: [
|
link: [
|
||||||
{
|
{ rel: 'icon', type: 'image/svg+png', href: isDev || isPreview ? '/favicon-dev.png' : '/favicon.png' },
|
||||||
rel: 'icon', type: 'image/svg+png', href: '/favicon.png',
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<script setup>
|
<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>
|
</script>
|
||||||
|
|
||||||
<template>
|
<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