mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
queue add danmaku content
This commit is contained in:
@@ -30,6 +30,7 @@ import {
|
||||
import { computed, h, onMounted, ref } from 'vue'
|
||||
import PointUserDetailCard from './PointUserDetailCard.vue'
|
||||
import { Info24Filled } from '@vicons/fluent'
|
||||
import { objectsToCSV } from '@/Utils'
|
||||
|
||||
const props = defineProps<{
|
||||
goods: ResponsePointGoodModel[]
|
||||
|
||||
@@ -17,6 +17,7 @@ import { useRoute } from 'vue-router'
|
||||
import { Vue3Marquee } from 'vue3-marquee'
|
||||
import { NCard, NDivider, NEmpty, NSpace, NText, useMessage } from 'naive-ui'
|
||||
import { List } from 'linqts'
|
||||
import { isSameDay } from 'date-fns'
|
||||
|
||||
const props = defineProps<{
|
||||
id?: number
|
||||
@@ -63,7 +64,10 @@ const activeItems = computed(() => {
|
||||
break
|
||||
}
|
||||
case QueueSortType.FansMedalFirst: {
|
||||
list = list.OrderByDescending(q => q.user?.fans_medal_wearing_status ? 1 : 0).ThenByDescending((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
|
||||
}
|
||||
}
|
||||
@@ -198,7 +202,7 @@ onUnmounted(() => {
|
||||
</p>
|
||||
</span>
|
||||
|
||||
<NDivider v-if="isMoreThanContainer" class="queue-footer-divider" style="margin: 10px 0 10px 0" />
|
||||
<NDivider v-if="isMoreThanContainer" class="queue-footer-divider" style="margin: 10px 0 10px 0" />
|
||||
</Vue3Marquee>
|
||||
</template>
|
||||
<div v-else style="position: relative; top: 20%">
|
||||
|
||||
@@ -156,7 +156,7 @@ 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.OrderBy((q) => q.createAt)
|
||||
@@ -173,7 +173,10 @@ const queue = computed(() => {
|
||||
break
|
||||
}
|
||||
case QueueSortType.FansMedalFirst: {
|
||||
list = list.OrderByDescending(q => q.user?.fans_medal_wearing_status ? 1 : 0).ThenByDescending((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
|
||||
}
|
||||
}
|
||||
@@ -909,6 +912,22 @@ onUnmounted(() => {
|
||||
</template>
|
||||
<NTime :time="queueData.createAt" />
|
||||
</NTooltip>
|
||||
|
||||
<NTooltip v-if="queueData.content" content-style="margin: 0">
|
||||
<template #trigger>
|
||||
<NText strong style="font-size: 18px">
|
||||
<NIcon :component="Info24Filled" />
|
||||
</NText>
|
||||
</template>
|
||||
<NCard size="small" :bordered="false">
|
||||
<template #header>
|
||||
<span style="font-size: small; color: gray;">
|
||||
{{ '来自' + (queueData?.from == QueueFrom.Gift ? '礼物' : '弹幕') + ': ' }}
|
||||
</span>
|
||||
</template>
|
||||
{{ queueData?.content }}
|
||||
</NCard>
|
||||
</NTooltip>
|
||||
</NSpace>
|
||||
<NSpace justify="end" align="center">
|
||||
<NTooltip>
|
||||
|
||||
Reference in New Issue
Block a user