update packages

This commit is contained in:
2024-04-20 14:11:41 +08:00
parent 2e66c457cc
commit b656057dfe
8 changed files with 769 additions and 764 deletions

View File

@@ -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()

View File

@@ -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

View File

@@ -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: '是否现在刷新?',

View File

@@ -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,

View File

@@ -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,