Skip to content

Commit

Permalink
Merge pull request #42 from tkzt/main
Browse files Browse the repository at this point in the history
feat(app): dynamic page title according to settings
  • Loading branch information
tkzt authored Jan 1, 2025
2 parents e614fed + bb520ad commit 5f4cd4d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/fine-weather-gallery.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>一些晴朗的日子</title>
<title>...</title>
</head>

<body>
Expand Down
9 changes: 5 additions & 4 deletions app/src/views/FineWeather.vue
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
import {
onMounted, reactive, ref, watchEffect,
} from 'vue'
import { useDark, useEventListener } from '@vueuse/core'
import { useDark, useEventListener, useTitle } from '@vueuse/core'
import ImageCard from '@/components/ImageCard.vue'
import ImageDetail from '@/components/ImageDetail.vue'
Expand Down Expand Up @@ -140,9 +140,9 @@ const imageDetails = reactive({
})
const images = ref([])
const fwMeta = reactive({
title: DEFAULT_TITLE,
intro: DEFAULT_INTRO,
noImageTip: DEFAULT_NO_IMAGE_TIP
title: '',
intro: '',
noImageTip: ''
})
function jumpTo(url) {
Expand Down Expand Up @@ -201,6 +201,7 @@ async function loadMore() {
}
onMounted(() => {
useTitle(() => fwMeta.title)
useEventListener(document, 'keydown', keypressListener)
loadMore()
isReady.value = true
Expand Down

0 comments on commit 5f4cd4d

Please sign in to comment.