mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
update ver
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,6 +1,7 @@
|
||||
.DS_Store
|
||||
node_modules
|
||||
/dist
|
||||
.yarn
|
||||
|
||||
|
||||
# local env files
|
||||
|
||||
3
.yarnrc.yml
Normal file
3
.yarnrc.yml
Normal file
@@ -0,0 +1,3 @@
|
||||
nodeLinker: node-modules
|
||||
|
||||
yarnPath: .yarn/releases/yarn-4.0.2.cjs
|
||||
38
package.json
38
package.json
@@ -3,23 +3,22 @@
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"prebuild": "node gen-version.js",
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"lint": "vite lint"
|
||||
},
|
||||
"dependencies": {
|
||||
"@types/node": "^20.10.5",
|
||||
"@typescript-eslint/eslint-plugin": "^6.14.0",
|
||||
"@typescript-eslint/eslint-plugin": "^6.15.0",
|
||||
"@vicons/fluent": "^0.12.0",
|
||||
"@vitejs/plugin-vue": "^4.2.3",
|
||||
"@vueuse/core": "^10.1.2",
|
||||
"@vueuse/router": "^10.1.2",
|
||||
"date-fns": "^2.30.0",
|
||||
"@vitejs/plugin-vue": "^4.5.2",
|
||||
"@vueuse/core": "^10.7.0",
|
||||
"@vueuse/router": "^10.7.0",
|
||||
"date-fns": "^3.0.5",
|
||||
"easy-speech": "^2.2.0",
|
||||
"echarts": "^5.4.3",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-prettier": "^5.0.1",
|
||||
"eslint-plugin-prettier": "^5.1.1",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"file-saver": "^2.0.5",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
@@ -31,27 +30,28 @@
|
||||
"queue-typescript": "^1.0.1",
|
||||
"vite": "^5.0.10",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue": "^3.3.12",
|
||||
"vue": "^3.3.13",
|
||||
"vue-echarts": "^6.6.5",
|
||||
"vue-request": "^2.0.3",
|
||||
"vue-router": "4",
|
||||
"vue-request": "^2.0.4",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue-turnstile": "^1.0.6",
|
||||
"vue3-aplayer": "^1.7.3",
|
||||
"vue3-marquee": "^4.1.0",
|
||||
"vueuc": "^0.4.51",
|
||||
"worker-timers": "^7.0.78"
|
||||
"vueuc": "^0.4.56",
|
||||
"worker-timers": "^7.0.80"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/eslint-parser": "^7.21.3",
|
||||
"@typescript-eslint/parser": "^6.14.0",
|
||||
"@babel/eslint-parser": "^7.23.3",
|
||||
"@typescript-eslint/parser": "^6.15.0",
|
||||
"@vicons/ionicons5": "^0.12.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"@vue/eslint-config-typescript": "^12.0.0",
|
||||
"eslint": "^8.39.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-vue": "^9.11.0",
|
||||
"naive-ui": "^2.34.3",
|
||||
"eslint-plugin-vue": "^9.19.2",
|
||||
"naive-ui": "^2.36.0",
|
||||
"stylus": "^0.62.0",
|
||||
"typescript": "~5.3.3"
|
||||
}
|
||||
"typescript": "^5.3.3"
|
||||
},
|
||||
"packageManager": "yarn@4.0.2"
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
// vite.config.ts
|
||||
import { defineConfig } from 'vite'
|
||||
import vue from '@vitejs/plugin-vue'
|
||||
import path from 'path'
|
||||
import svgLoader from 'vite-svg-loader'
|
||||
import vue from '@vitejs/plugin-vue';
|
||||
import vueJsx from '@vitejs/plugin-vue-jsx';
|
||||
import path from 'path';
|
||||
import { defineConfig } from 'vite';
|
||||
import svgLoader from 'vite-svg-loader';
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [vue({
|
||||
|
||||
Reference in New Issue
Block a user