mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
update packages
This commit is contained in:
61
eslint.config.cjs
Normal file
61
eslint.config.cjs
Normal file
@@ -0,0 +1,61 @@
|
||||
// eslint.config.js
|
||||
module.exports = [
|
||||
{
|
||||
name: 'base',
|
||||
root: true,
|
||||
env: {
|
||||
node: true,
|
||||
},
|
||||
languageOptions: {
|
||||
ecmaVersion: 'latest',
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module', // Assumed based on the usage of TypeScript and modules
|
||||
},
|
||||
globals: {}, // Define any global variables if needed
|
||||
linterOptions: {
|
||||
reportUnusedDisableDirectives: 'error', // Adjust based on preference
|
||||
},
|
||||
plugins: {
|
||||
vue: require('eslint-plugin-vue'),
|
||||
'@typescript-eslint': require('@typescript-eslint/eslint-plugin'),
|
||||
prettier: require('eslint-plugin-prettier'),
|
||||
oxlint: require('eslint-plugin-oxlint'),
|
||||
},
|
||||
settings: {}, // Add shared settings here if necessary
|
||||
ignores: [
|
||||
// Patterns for files to ignore, adjust as necessary
|
||||
],
|
||||
files: ['**/*.js', '**/*.jsx'],
|
||||
rules: {
|
||||
'no-console': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'no-debugger': process.env.NODE_ENV === 'production' ? 'warn' : 'off',
|
||||
'vue/component-name-in-template-casing': ['error', 'PascalCase'],
|
||||
'vue/no-mutating-props': 'off',
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
'@typescript-eslint/no-var-requires': 'warn',
|
||||
},
|
||||
extends: [
|
||||
'@vue/typescript/recommended',
|
||||
'plugin:vue/vue3-essential',
|
||||
'prettier',
|
||||
'@vue/eslint-config-typescript',
|
||||
'plugin:oxlint/recommended',
|
||||
],
|
||||
},
|
||||
{
|
||||
name: 'TypeScript',
|
||||
files: ['**/*.ts', '**/*.tsx'],
|
||||
languageOptions: {
|
||||
parser: '@typescript-eslint/parser',
|
||||
sourceType: 'module', // Explicitly defined for TypeScript files
|
||||
},
|
||||
rules: {
|
||||
// TypeScript specific rules overwrites or additions
|
||||
'@typescript-eslint/no-explicit-any': 'off',
|
||||
},
|
||||
extends: [
|
||||
'@vue/typescript/recommended',
|
||||
// TypeScript specific extended configurations...
|
||||
],
|
||||
},
|
||||
]
|
||||
44
package.json
44
package.json
@@ -11,22 +11,22 @@
|
||||
"dependencies": {
|
||||
"@microsoft/signalr": "^8.0.0",
|
||||
"@microsoft/signalr-protocol-msgpack": "^8.0.0",
|
||||
"@types/node": "^20.11.19",
|
||||
"@typescript-eslint/eslint-plugin": "^7.0.1",
|
||||
"@types/node": "^20.12.7",
|
||||
"@typescript-eslint/eslint-plugin": "^7.7.0",
|
||||
"@vicons/fluent": "^0.12.0",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
"@vueuse/core": "^10.7.2",
|
||||
"@vueuse/router": "^10.7.2",
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@vueuse/router": "^10.9.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.12",
|
||||
"date-fns": "^3.3.1",
|
||||
"date-fns": "^3.6.0",
|
||||
"easy-speech": "^2.3.1",
|
||||
"echarts": "^5.5.0",
|
||||
"eslint": "^8.56.0",
|
||||
"eslint": "^9.1.0",
|
||||
"eslint-plugin-import": "^2.29.1",
|
||||
"eslint-plugin-oxlint": "^0.2.3",
|
||||
"eslint-plugin-oxlint": "^0.2.9",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"fast-xml-parser": "^4.3.4",
|
||||
"fast-xml-parser": "^4.3.6",
|
||||
"file-saver": "^2.0.5",
|
||||
"grapheme-splitter": "^1.0.4",
|
||||
"html2canvas": "^1.4.1",
|
||||
@@ -37,35 +37,35 @@
|
||||
"prettier": "^3.2.5",
|
||||
"qrcode.vue": "^3.4.1",
|
||||
"queue-typescript": "^1.0.1",
|
||||
"unplugin-vue-markdown": "^0.26.0",
|
||||
"unplugin-vue-markdown": "^0.26.2",
|
||||
"uuid": "^9.0.1",
|
||||
"vite": "^5.1.3",
|
||||
"vite": "^5.2.9",
|
||||
"vite-svg-loader": "^5.1.0",
|
||||
"vue": "^3.4.19",
|
||||
"vue-echarts": "^6.6.8",
|
||||
"vue": "^3.4.23",
|
||||
"vue-echarts": "^6.6.9",
|
||||
"vue-request": "^2.0.4",
|
||||
"vue-router": "^4.2.5",
|
||||
"vue-router": "^4.3.2",
|
||||
"vue-turnstile": "^1.0.8",
|
||||
"vue3-aplayer": "^1.7.3",
|
||||
"vue3-marquee": "^4.2.0",
|
||||
"vueuc": "^0.4.58",
|
||||
"worker-timers": "^7.1.2",
|
||||
"worker-timers": "^7.1.7",
|
||||
"xlsx": "^0.18.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@eslint/eslintrc": "^3.0.1",
|
||||
"@types/eslint": "^8.56.2",
|
||||
"@eslint/eslintrc": "^3.0.2",
|
||||
"@types/eslint": "^8.56.10",
|
||||
"@types/obs-studio": "^2.17.2",
|
||||
"@types/uuid": "^9.0.8",
|
||||
"@typescript-eslint/parser": "^7.0.1",
|
||||
"@typescript-eslint/parser": "^7.7.0",
|
||||
"@vicons/ionicons5": "^0.12.0",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"@vue/eslint-config-typescript": "^12.0.0",
|
||||
"@vue/eslint-config-typescript": "^13.0.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-vue": "^9.21.1",
|
||||
"naive-ui": "^2.37.3",
|
||||
"stylus": "^0.62.0",
|
||||
"typescript": "^5.3.3"
|
||||
"eslint-plugin-vue": "^9.25.0",
|
||||
"naive-ui": "^2.38.1",
|
||||
"stylus": "^0.63.0",
|
||||
"typescript": "^5.4.5"
|
||||
},
|
||||
"packageManager": "yarn@4.0.2"
|
||||
}
|
||||
|
||||
@@ -9,6 +9,7 @@ import { useRoute } from 'vue-router'
|
||||
|
||||
export const ACCOUNT = ref<AccountInfo>({} as AccountInfo)
|
||||
export const isLoadingAccount = ref(true)
|
||||
const route = useRoute()
|
||||
|
||||
const { message } = createDiscreteApi(['message'])
|
||||
const cookie = useLocalStorage('JWT_Token', '')
|
||||
@@ -46,7 +47,6 @@ export async function GetSelfAccount() {
|
||||
}
|
||||
export function UpdateAccountLoop() {
|
||||
setInterval(() => {
|
||||
const route = useRoute()
|
||||
if (ACCOUNT.value && route?.name != 'question-display') {
|
||||
// 防止在问题详情页刷新
|
||||
GetSelfAccount()
|
||||
|
||||
@@ -472,6 +472,7 @@ export interface SongRequestInfo {
|
||||
export interface DanmakuUserInfo {
|
||||
name: string
|
||||
uid: number
|
||||
oid: string
|
||||
guard_level: number
|
||||
fans_medal_level: number
|
||||
fans_medal_name: string
|
||||
|
||||
@@ -9,7 +9,6 @@ import { GetSelfAccount, UpdateAccountLoop, useAccount } from './api/account'
|
||||
import { GetNotifactions } from './data/notifactions'
|
||||
import router from './router'
|
||||
import { useAuthStore } from './store/useAuthStore'
|
||||
import { useRoute } from 'vue-router'
|
||||
|
||||
const pinia = createPinia()
|
||||
|
||||
@@ -50,8 +49,10 @@ QueryGetAPI<string>(BASE_API_URL + 'vtsuru/version')
|
||||
localStorage.setItem('Version', currentVersion)
|
||||
console.log('[vtsuru] 发现新版本: ' + currentVersion)
|
||||
|
||||
//@ts-expect-error 这里获取不了
|
||||
if (!window.obsstudio) {
|
||||
const url = new URL(window.location.href)
|
||||
const path = url.pathname
|
||||
|
||||
if (!path.startsWith('/obs')) {
|
||||
const n = notification.info({
|
||||
title: '发现新的版本更新',
|
||||
content: '是否现在刷新?',
|
||||
|
||||
@@ -287,6 +287,7 @@ async function addSong(danmaku: EventModel) {
|
||||
user: {
|
||||
name: danmaku.name,
|
||||
uid: danmaku.uid,
|
||||
oid: danmaku.open_id,
|
||||
fans_medal_level: danmaku.fans_medal_level,
|
||||
fans_medal_name: danmaku.fans_medal_name,
|
||||
fans_medal_wearing_status: danmaku.fans_medal_wearing_status,
|
||||
|
||||
@@ -156,10 +156,10 @@ const queue = computed(() => {
|
||||
: q?.user?.name.toLowerCase() == filterName.value.toLowerCase()),
|
||||
)
|
||||
.Where((q) => (q?.status ?? QueueStatus.Cancel) < QueueStatus.Finish)
|
||||
.OrderByDescending((q) => q.from == QueueFrom.Manual)
|
||||
//.OrderByDescending((q) => q.from == QueueFrom.Manual)
|
||||
switch (settings.value.sortType) {
|
||||
case QueueSortType.TimeFirst: {
|
||||
list = list.ThenBy((q) => q.createAt)
|
||||
list = list.OrderBy((q) => q.createAt)
|
||||
break
|
||||
}
|
||||
case QueueSortType.GuardFirst: {
|
||||
@@ -169,16 +169,18 @@ const queue = computed(() => {
|
||||
break
|
||||
}
|
||||
case QueueSortType.PaymentFist: {
|
||||
list = list.OrderByDescending((q) => q.giftPrice ?? 0).ThenBy((q) => q.createAt)
|
||||
list = list.OrderByDescending((q) => q.giftPrice).ThenBy((q) => q.createAt)
|
||||
break
|
||||
}
|
||||
case QueueSortType.FansMedalFirst: {
|
||||
list = list.OrderByDescending((q) => q.user?.fans_medal_level ?? 0).ThenBy((q) => q.createAt)
|
||||
list = list.OrderByDescending(q => q.user?.fans_medal_wearing_status ? 1 : 0).ThenByDescending((q) => q.user?.fans_medal_level ?? 0).ThenBy((q) => q.createAt)
|
||||
break
|
||||
}
|
||||
}
|
||||
if (configCanEdit.value ? settings.value.isReverse : isReverse.value) {
|
||||
list = list.Reverse()
|
||||
}
|
||||
list = list.OrderByDescending((q) => (q.status == QueueStatus.Progressing ? 1 : 0))
|
||||
list = list.ThenByDescending((q) => (q.status == QueueStatus.Progressing ? 1 : 0))
|
||||
return list.ToArray()
|
||||
})
|
||||
const historySongs = computed(() => {
|
||||
@@ -267,6 +269,7 @@ async function add(danmaku: EventModel) {
|
||||
user: {
|
||||
name: danmaku.name,
|
||||
uid: danmaku.uid,
|
||||
oid: danmaku.open_id,
|
||||
fans_medal_level: danmaku.fans_medal_level,
|
||||
fans_medal_name: danmaku.fans_medal_name,
|
||||
fans_medal_wearing_status: danmaku.fans_medal_wearing_status,
|
||||
|
||||
Reference in New Issue
Block a user