update alert

This commit is contained in:
2023-12-24 00:00:00 +08:00
parent 1305e62277
commit 8419a18b22
12 changed files with 1221 additions and 1092 deletions

View File

@@ -32,8 +32,5 @@ jobs:
- name: Check Yarn Version
run: yarn --version
- name: Install dependencies
run: yarn install
- name: Build the project
run: yarn build

View File

@@ -194,6 +194,7 @@ export interface SongsInfo {
updateTime: number
//paidSong: boolean
options?: SongRequestOption
cover?: string
}
export interface SongRequestOption {
needJianzhang: boolean

View File

@@ -4,7 +4,7 @@ import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
import { useLocalStorage } from '@vueuse/core'
import { FormInst, FormItemInst, FormItemRule, FormRules, NAlert, NButton, NCard, NCountdown, NDivider, NForm, NFormItem, NInput, NSpace, NTabPane, NTabs, useMessage } from 'naive-ui'
import { ref } from 'vue'
import { onUnmounted, ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
interface RegisterModel {
@@ -179,6 +179,10 @@ function onForgetPasswordClick() {
selectedTab.value = 'forget'
}, 50)
}
onUnmounted(() => {
turnstile.value?.remove()
})
</script>
<template>

View File

@@ -31,6 +31,7 @@ export const QUEUE_API_URL = { toString: () => `${BASE_API()}queue/` }
export const EVENT_API_URL = { toString: () => `${BASE_API()}event/` }
export const LIVE_API_URL = { toString: () => `${BASE_API()}live/` }
export const FEEDBACK_API_URL = { toString: () => `${BASE_API()}feedback/` }
export const MUSIC_REQUEST_API_URL = { toString: () => `${BASE_API()}vtsuru/` }
export const VTSURU_API_URL = { toString: () => `${BASE_API()}vtsuru/` }
export const ScheduleTemplateMap = {

View File

@@ -211,7 +211,7 @@ const menuOptions = [
},
() =>
h('div', {}, [
'当浏览器在后台运行时, 定时器和 Websocket 连接将受到严格限制, 这会导致弹幕接收功能无法正常工作 (详见',
' 当浏览器在后台运行时, 定时器和 Websocket 连接将受到严格限制, 这会导致弹幕接收功能无法正常工作 (详见',
h(
NButton,
{
@@ -238,7 +238,34 @@ const menuOptions = [
},
() => 'VtsuruEventFetcher',
),
', 否则请在使用功能时尽量保持网页在前台运行',
', 否则请在使用功能时尽量保持网页在前台运行, 同时关闭浏览器的 页面休眠/内存节省 功能',
h('br'),
'Chrome: ',
h(
NButton,
{
type: 'info',
text: true,
size: 'small',
tag: 'a',
href: 'https://support.google.com/chrome/answer/12929150?hl=zh-Hans#zippy=%2C%E5%BC%80%E5%90%AF%E6%88%96%E5%85%B3%E9%97%AD%E7%9C%81%E5%86%85%E5%AD%98%E6%A8%A1%E5%BC%8F%2C%E8%AE%A9%E7%89%B9%E5%AE%9A%E7%BD%91%E7%AB%99%E4%BF%9D%E6%8C%81%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81',
target: '_blank',
},
() => '让特定网站保持活动状态',
),
', Edge: ',
h(
NButton,
{
type: 'info',
text: true,
size: 'small',
tag: 'a',
href: 'https://support.microsoft.com/zh-cn/topic/%E4%BA%86%E8%A7%A3-microsoft-edge-%E4%B8%AD%E7%9A%84%E6%80%A7%E8%83%BD%E5%8A%9F%E8%83%BD-7b36f363-2119-448a-8de6-375cfd88ab25',
target: '_blank',
},
() => '永远不想进入睡眠状态的网站',
),
]),
),
},

View File

@@ -4,7 +4,7 @@ import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import VideoCollectInfoCard from '@/components/VideoCollectInfoCard.vue'
import { TURNSTILE_KEY, VIDEO_COLLECT_API_URL } from '@/data/constants'
import { NAlert, NButton, NCard, NDivider, NInput, NInputNumber, NLayoutContent, NResult, NSpace, NText, useMessage } from 'naive-ui'
import { ref } from 'vue'
import { onUnmounted, ref } from 'vue'
import { useRoute } from 'vue-router'
import VueTurnstile from 'vue-turnstile'
@@ -63,6 +63,9 @@ async function add() {
turnstile.value?.reset()
})
}
onUnmounted(() => {
turnstile.value?.remove()
})
</script>
<template>

View File

@@ -7,7 +7,7 @@ import { ACCOUNT_API_URL, TURNSTILE_KEY } from '@/data/constants'
import { Question24Regular } from '@vicons/fluent'
import { useLocalStorage } from '@vueuse/core'
import { NAlert, NButton, NCard, NCountdown, NDivider, NEllipsis, NIcon, NInput, NInputGroup, NModal, NPopconfirm, NSpace, NTag, NText, NTime, NTooltip, useMessage } from 'naive-ui'
import { ref } from 'vue'
import { onUnmounted, ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
import SettingsManageView from './SettingsManageView.vue'
@@ -193,6 +193,9 @@ async function ChangeBili() {
isLoading.value = false
})
}
onUnmounted(() => {
turnstile.value?.remove()
})
</script>
<template>

View File

@@ -33,7 +33,7 @@ import {
useMessage,
useNotification,
} from 'naive-ui'
import { computed, h, ref } from 'vue'
import { computed, h, onUnmounted, ref } from 'vue'
import VueTurnstile from 'vue-turnstile'
interface TempLotteryResponseModel {
@@ -310,6 +310,10 @@ function getLevelColor(level: number) {
}
}
}
onUnmounted(() => {
turnstile.value?.remove()
})
</script>
<template>

View File

@@ -233,6 +233,7 @@ async function addSongs(songsShoudAdd: SongsInfo[], from: SongFrom) {
Author: s.author,
Url: s.url,
Description: s.description,
Cover: s.cover,
})),
)
}

File diff suppressed because it is too large Load Diff

View File

@@ -63,7 +63,7 @@ type SpeechInfo = {
const accountInfo = useAccount()
const message = useMessage()
const route = useRoute()
const settings = useStorage<SpeechSettings>('Setting.Speech.Settings', {
const settings = useStorage<SpeechSettings>('Setting.Speech', {
speechInfo: {
volume: 1,
pitch: 1,
@@ -464,6 +464,7 @@ onUnmounted(() => {
<template>
<NAlert v-if="!speechSynthesisInfo || !speechSynthesisInfo.speechSynthesis" type="error"> 你的浏览器不支持语音功能 </NAlert>
<template v-else>
<NSpace vertical>
<NAlert type="info">
建议在 Edge 浏览器使用
<NTooltip>
@@ -474,6 +475,30 @@ onUnmounted(() => {
</NTooltip>
系列语音, 效果要好很多
</NAlert>
<NAlert type="info" closeable>
当在后台运行时请关闭浏览器的 页面休眠/内存节省功能. Chrome:
<NButton
tag="a"
type="info"
href="https://support.google.com/chrome/answer/12929150?hl=zh-Hans#zippy=%2C%E5%BC%80%E5%90%AF%E6%88%96%E5%85%B3%E9%97%AD%E7%9C%81%E5%86%85%E5%AD%98%E6%A8%A1%E5%BC%8F%2C%E8%AE%A9%E7%89%B9%E5%AE%9A%E7%BD%91%E7%AB%99%E4%BF%9D%E6%8C%81%E6%B4%BB%E5%8A%A8%E7%8A%B6%E6%80%81"
target="_blank"
text
>
让特定网站保持活动状态
</NButton>
Edge:
<NButton
tag="a"
type="info"
href="https://support.microsoft.com/zh-cn/topic/%E4%BA%86%E8%A7%A3-microsoft-edge-%E4%B8%AD%E7%9A%84%E6%80%A7%E8%83%BD%E5%8A%9F%E8%83%BD-7b36f363-2119-448a-8de6-375cfd88ab25"
target="_blank"
text
>
永远不想进入睡眠状态的网站
</NButton>
</NAlert>
</NSpace>
<br />
<NSpace>
<NButton @click="canSpeech ? stopSpeech() : startSpeech()" :type="canSpeech ? 'error' : 'primary'" data-umami-event="Use TTS" :data-umami-event-uid="accountInfo?.id">

File diff suppressed because it is too large Load Diff