Skip to content

Commit

Permalink
feat(nuxt3): pages head
Browse files Browse the repository at this point in the history
  • Loading branch information
LarchLiu committed Feb 3, 2024
1 parent a52bede commit 8566903
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 2 deletions.
8 changes: 8 additions & 0 deletions server/nuxt3/pages/app-config.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<script setup lang="ts">
import { appName } from '~/constants'
useHead({
title: `App Config - ${appName}`,
meta: [
{ property: 'og:title', content: `App Config - ${appName}` },
],
})
</script>

<template>
Expand Down
7 changes: 7 additions & 0 deletions server/nuxt3/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,18 @@
import type { ReturnStorageData } from '@stargram/core/storage'
import { v4 as uuidv4 } from 'uuid'
import { errorMessage } from '@stargram/core/utils'
import { appName } from '~/constants'
interface QARes {
answer: string
source: string[]
}
useHead({
title: appName,
meta: [
{ property: 'og:title', content: appName },
],
})
const textInput = ref<HTMLInputElement>()
const text = ref('')
const toast = useToast()
Expand Down
8 changes: 7 additions & 1 deletion server/nuxt3/pages/self-host.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
<script setup lang="ts">
import { cryption } from '../constants/index'
import { appName, cryption } from '../constants/index'
import type { OutUserConfig, ServerConfig } from '~/composables/config'
useHead({
title: `Self Host - ${appName}`,
meta: [
{ property: 'og:title', content: `Self Host - ${appName}` },
],
})
const configStore = useConfigStore()
const { data: fetchData } = await useFetch('/api/defaultBotConfig')
const defaultBotConfig = ref<ServerConfig<OutUserConfig>>()
Expand Down
8 changes: 8 additions & 0 deletions server/nuxt3/pages/server-config.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
<script setup lang="ts">
import { appName } from '~/constants'
useHead({
title: `Server Config - ${appName}`,
meta: [
{ property: 'og:title', content: `Server Config - ${appName}` },
],
})
</script>

<template>
Expand Down
7 changes: 7 additions & 0 deletions server/nuxt3/pages/settings.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
<script setup lang="ts">
import { v4 as uuidv4 } from 'uuid'
import { appName } from '~/constants'
useHead({
title: `Settings - ${appName}`,
meta: [
{ property: 'og:title', content: `Settings - ${appName}` },
],
})
const userId = useLocalStorage('userId', '')
const { copy } = useClipboard()
const router = useRouter()
Expand Down
7 changes: 7 additions & 0 deletions server/nuxt3/pages/share-target.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
<script setup lang="ts">
import { v4 as uuidv4 } from 'uuid'
import { errorMessage } from '@stargram/core/utils'
import { appName } from '~/constants'
useHead({
title: `Share Target - ${appName}`,
meta: [
{ property: 'og:title', content: `Share Target - ${appName}` },
],
})
const textInput = ref<HTMLInputElement>()
const text = ref('')
const userId = useLocalStorage('userId', '')
Expand Down
8 changes: 7 additions & 1 deletion server/nuxt3/pages/user-config.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
<script setup lang="ts">
import { errorMessage } from '@stargram/core/utils'
import UserConfigFlow from '~/components/UserConfigFlow.vue'
import { cryption } from '~/constants'
import { appName as _appName, cryption } from '~/constants'
import type { BasicConfig, ModelsConfig, OutUserConfig, ServerConfig } from '~/composables/config'
useHead({
title: `User Config - ${_appName}`,
meta: [
{ property: 'og:title', content: `User Config - ${_appName}` },
],
})
const route = useRoute()
const toast = useToast()
const showBot = ref(false)
Expand Down

0 comments on commit 8566903

Please sign in to comment.