mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
update ver
This commit is contained in:
@@ -93,7 +93,7 @@ export function GetString(account: AccountInfo | undefined, live: ResponseLiveIn
|
||||
})
|
||||
}
|
||||
})
|
||||
function GetTime(danmaku: DanmakuModel) {
|
||||
const GetTime = (danmaku: DanmakuModel) => {
|
||||
return ((danmaku.time - live.startAt) / 1000).toFixed(3)
|
||||
}
|
||||
return builder.build(xmlJsonObj)
|
||||
|
||||
14
src/main.ts
14
src/main.ts
@@ -1,12 +1,12 @@
|
||||
import { QueryGetAPI } from '@/api/query'
|
||||
import { BASE_API, apiFail } from '@/data/constants'
|
||||
import EasySpeech from 'easy-speech'
|
||||
import { NText, createDiscreteApi } from 'naive-ui'
|
||||
import { createApp, h } from 'vue'
|
||||
import App from './App.vue'
|
||||
import router from './router'
|
||||
import { GetSelfAccount, UpdateAccountLoop } from './api/account'
|
||||
import { GetNotifactions } from './data/notifactions'
|
||||
import { NText, createDiscreteApi } from 'naive-ui'
|
||||
import EasySpeech from 'easy-speech'
|
||||
import router from './router'
|
||||
|
||||
createApp(App).use(router).mount('#app')
|
||||
|
||||
@@ -17,18 +17,18 @@ QueryGetAPI<string>(BASE_API() + 'vtsuru/version')
|
||||
if (version.code == 200) {
|
||||
currentVersion = version.data
|
||||
const savedVersion = localStorage.getItem('Version')
|
||||
localStorage.setItem('Version', currentVersion)
|
||||
|
||||
if (currentVersion && savedVersion && savedVersion !== currentVersion) {
|
||||
//alert('发现新的版本更新, 请按 Ctrl+F5 强制刷新页面')
|
||||
notification.info({
|
||||
title: '发现新的版本更新',
|
||||
content: '请按 Ctrl+F5 强制刷新页面',
|
||||
content: '将自动刷新页面',
|
||||
duration: 5000,
|
||||
meta: () => h(NText, { depth: 3 }, () => currentVersion),
|
||||
})
|
||||
location.reload()
|
||||
}
|
||||
|
||||
localStorage.setItem('Version', currentVersion)
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
@@ -40,7 +40,7 @@ QueryGetAPI<string>(BASE_API() + 'vtsuru/version')
|
||||
GetSelfAccount()
|
||||
GetNotifactions()
|
||||
UpdateAccountLoop()
|
||||
InitTTS();
|
||||
InitTTS()
|
||||
})
|
||||
function InitTTS() {
|
||||
try {
|
||||
|
||||
@@ -18,7 +18,6 @@ import {
|
||||
VideoAdd20Filled,
|
||||
} from '@vicons/fluent'
|
||||
import { AnalyticsSharp, BrowsersOutline, Chatbox, Moon, MusicalNote, Sunny } from '@vicons/ionicons5'
|
||||
import { computed } from '@vue/reactivity'
|
||||
import { useElementSize, useStorage } from '@vueuse/core'
|
||||
import {
|
||||
NAlert,
|
||||
@@ -42,7 +41,7 @@ import {
|
||||
NTooltip,
|
||||
useMessage,
|
||||
} from 'naive-ui'
|
||||
import { h, onMounted, ref } from 'vue'
|
||||
import { computed, h, onMounted, ref } from 'vue'
|
||||
import { RouterLink, useRoute } from 'vue-router'
|
||||
import DanmakuLayout from './manage/DanmakuLayout.vue'
|
||||
|
||||
|
||||
@@ -21,11 +21,14 @@ const message = useMessage()
|
||||
const resetEmailModalVisiable = ref(false)
|
||||
const resetPasswordModalVisiable = ref(false)
|
||||
const bindBiliCodeModalVisiable = ref(false)
|
||||
const resetNameModalVisiable = ref(false)
|
||||
|
||||
const newEmailAddress = ref('')
|
||||
const newEmailVerifyCode = ref('')
|
||||
const canSendEmailVerifyCode = ref(true)
|
||||
|
||||
const newName = ref('')
|
||||
|
||||
const oldPassword = ref('')
|
||||
const newPassword = ref('')
|
||||
const newPassword2 = ref('')
|
||||
@@ -107,6 +110,26 @@ async function resetPassword() {
|
||||
message.error('发生错误')
|
||||
})
|
||||
}
|
||||
async function resetName() {
|
||||
if (accountInfo.value?.name == newName.value) {
|
||||
message.error('新用户名与旧用户名一致')
|
||||
return
|
||||
}
|
||||
await QueryGetAPI(ACCOUNT_API_URL + 'verify/reset-name', { name: newName.value })
|
||||
.then(async (data) => {
|
||||
if (data.code == 200) {
|
||||
message.success('用户名已修改')
|
||||
setTimeout(() => {
|
||||
location.reload()
|
||||
}, 1000)
|
||||
} else {
|
||||
message.error(data.message)
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
message.error('发生错误')
|
||||
})
|
||||
}
|
||||
async function BindBili() {
|
||||
if (!biliCode.value) {
|
||||
message.error('身份码不能为空')
|
||||
@@ -276,6 +299,14 @@ async function ChangeBili() {
|
||||
<NButton @click="resetPassword" type="warning"> 确定修改 </NButton>
|
||||
</template>
|
||||
</NModal>
|
||||
<NModal v-model:show="resetNameModalVisiable" preset="card" title="修改用户名" style="width: 400px; max-width: 90%">
|
||||
<NSpace vertical>
|
||||
<NInput v-model:value="newName" type="password" placeholder="新用户名" />
|
||||
</NSpace>
|
||||
<template #footer>
|
||||
<NButton @click="resetName" type="warning"> 确定修改 </NButton>
|
||||
</template>
|
||||
</NModal>
|
||||
<NModal v-model:show="bindBiliCodeModalVisiable" preset="card" title="绑定/更新身份码" style="width: 400px; max-width: 90%">
|
||||
<NSpace vertical>
|
||||
<NInputGroup>
|
||||
|
||||
@@ -559,6 +559,9 @@ onMounted(async () => {
|
||||
<NPagination v-model:page="fivesingCurrentPage" :page-count="fivesingTotalPageCount" simple @update-page="getFivesingSearchList(false)" />
|
||||
</template>
|
||||
</NTabPane>
|
||||
<NTabPane name="file" tab="从文件导入">
|
||||
开发中...
|
||||
</NTabPane>
|
||||
</NTabs>
|
||||
</NSpin>
|
||||
</NModal>
|
||||
|
||||
Reference in New Issue
Block a user