@@ -118,6 +135,7 @@ onUnmounted(() => {
box-sizing: border-box;
transition: all 0.3s ease;
}
+
.question-display-content {
border-radius: 10px;
display: flex;
@@ -127,6 +145,7 @@ onUnmounted(() => {
padding: 24px;
overflow: auto;
}
+
.question-display-user-name {
text-align: center;
margin: 5px;
@@ -134,9 +153,11 @@ onUnmounted(() => {
text-overflow: ellipsis;
white-space: nowrap;
}
+
.question-display-text {
min-height: 50px;
}
+
.question-display-image {
max-width: 40%;
max-height: 40%;
@@ -172,7 +193,7 @@ onUnmounted(() => {
diff --git a/src/views/manage/VideoCollectDetailView.vue b/src/views/manage/VideoCollectDetailView.vue
index ffe9541..0137fae 100644
--- a/src/views/manage/VideoCollectDetailView.vue
+++ b/src/views/manage/VideoCollectDetailView.vue
@@ -10,7 +10,7 @@ import {
} from '@/api/api-models'
import { QueryGetAPI, QueryPostAPI } from '@/api/query'
import VideoCollectInfoCard from '@/components/VideoCollectInfoCard.vue'
-import { VIDEO_COLLECT_API_URL } from '@/data/constants'
+import { CURRENT_HOST, VIDEO_COLLECT_API_URL } from '@/data/constants'
import router from '@/router'
import { Clock24Filled, Person24Filled } from '@vicons/fluent'
import { useWindowSize } from '@vueuse/core'
@@ -148,74 +148,74 @@ const gridRender = (type: 'padding' | 'reject' | 'accept') => {
return videos.length == 0
? h(NEmpty)
: h(NGrid, { cols: '1 500:2 700:3 900:4 1200:5 ', xGap: '12', yGap: '12', responsive: 'self' }, () =>
- videos?.map((v) =>
- h(NGridItem, () =>
- h(
- NCard,
- { style: 'height: 330px;', embedded: true, size: 'small' },
- {
- cover: () =>
- h('div', { style: 'position: relative;height: 150px;' }, [
- h('img', {
- src: v.video.cover.replace('http://', 'https://'),
- referrerpolicy: 'no-referrer',
- style: 'max-height: 100%; object-fit: contain;cursor: pointer',
- onClick: () => window.open('https://www.bilibili.com/video/' + v.info.bvid, '_blank'),
- }),
- h(
- NSpace,
- {
- style: { position: 'relative', bottom: '20px', background: '#00000073' },
- justify: 'space-around',
- },
- () => [
- h('span', [
- h(NIcon, { component: Clock24Filled, color: 'lightgrey' }),
- h(NText, { style: 'color: lightgrey;size:small;' }, () => formatSeconds(v.video.length)),
- ]),
- h('span', [
- h(NIcon, { component: Person24Filled, color: 'lightgrey' }),
- h(NText, { style: 'color: lightgrey;size:small;' }, () => v.video.ownerName),
- ]),
- ],
- ),
- ]),
- header: () =>
+ videos?.map((v) =>
+ h(NGridItem, () =>
+ h(
+ NCard,
+ { style: 'height: 330px;', embedded: true, size: 'small' },
+ {
+ cover: () =>
+ h('div', { style: 'position: relative;height: 150px;' }, [
+ h('img', {
+ src: v.video.cover.replace('http://', 'https://'),
+ referrerpolicy: 'no-referrer',
+ style: 'max-height: 100%; object-fit: contain;cursor: pointer',
+ onClick: () => window.open('https://www.bilibili.com/video/' + v.info.bvid, '_blank'),
+ }),
h(
- NButton,
+ NSpace,
{
- style: 'width: 100%;',
- text: true,
- onClick: () => window.open('https://www.bilibili.com/video/' + v.info.bvid, '_blank'),
+ style: { position: 'relative', bottom: '20px', background: '#00000073' },
+ justify: 'space-around',
},
- () =>
- h(
- NEllipsis,
- { style: 'max-width: 100%;' },
- {
- default: () => v.video.title,
- tooltip: () => h('div', { style: 'max-width: 300px' }, v.video.title),
- },
- ),
- ),
- default: () =>
- h(NScrollbar, { style: 'height: 65px;' }, () =>
- h(NCard, { contentStyle: 'padding: 5px;' }, () =>
- v.info.senders.map((s) => [
- h('div', { style: 'font-size: 12px;' }, [
- h('div', `推荐人: ${s.sender ?? '未填写'} [${s.senderId ?? '未填写'}]`),
- h('div', `推荐理由: ${s.description ?? '未填写'}`),
- ]),
- h(NSpace, { style: 'margin: 0;' }),
+ () => [
+ h('span', [
+ h(NIcon, { component: Clock24Filled, color: 'lightgrey' }),
+ h(NText, { style: 'color: lightgrey;size:small;' }, () => formatSeconds(v.video.length)),
]),
- ),
+ h('span', [
+ h(NIcon, { component: Person24Filled, color: 'lightgrey' }),
+ h(NText, { style: 'color: lightgrey;size:small;' }, () => v.video.ownerName),
+ ]),
+ ],
),
- footer: () => footer(v.info),
- },
- ),
+ ]),
+ header: () =>
+ h(
+ NButton,
+ {
+ style: 'width: 100%;',
+ text: true,
+ onClick: () => window.open('https://www.bilibili.com/video/' + v.info.bvid, '_blank'),
+ },
+ () =>
+ h(
+ NEllipsis,
+ { style: 'max-width: 100%;' },
+ {
+ default: () => v.video.title,
+ tooltip: () => h('div', { style: 'max-width: 300px' }, v.video.title),
+ },
+ ),
+ ),
+ default: () =>
+ h(NScrollbar, { style: 'height: 65px;' }, () =>
+ h(NCard, { contentStyle: 'padding: 5px;' }, () =>
+ v.info.senders.map((s) => [
+ h('div', { style: 'font-size: 12px;' }, [
+ h('div', `推荐人: ${s.sender ?? '未填写'} [${s.senderId ?? '未填写'}]`),
+ h('div', `推荐理由: ${s.description ?? '未填写'}`),
+ ]),
+ h(NSpace, { style: 'margin: 0;' }),
+ ]),
+ ),
+ ),
+ footer: () => footer(v.info),
+ },
),
),
- )
+ ),
+ )
}
const paddingButtonGroup = (v: VideoInfo) =>
h(NSpace, { size: 'small', justify: 'space-around' }, () => [
@@ -395,10 +395,8 @@ onActivated(async () => {
{{ videoDetail.table.isFinish ? '开启表' : '关闭表' }}
-
+
结果表
@@ -447,14 +445,9 @@ onActivated(async () => {
-
-
+
+
保存二维码
@@ -469,20 +462,12 @@ onActivated(async () => {
-
+
-
+
最低为一小时
diff --git a/src/views/obs/DanmujiOBS.vue b/src/views/obs/DanmujiOBS.vue
index 42828f8..dc6c171 100644
--- a/src/views/obs/DanmujiOBS.vue
+++ b/src/views/obs/DanmujiOBS.vue
@@ -76,7 +76,7 @@ const defaultConfig: DanmujiConfig = {
} as DanmujiConfig
let textEmoticons: { keyword: string, url: string }[] = []
const config = ref(JSON.parse(JSON.stringify(defaultConfig)))
-const rtc = useWebRTC().Init('slave')
+const rtc = await useWebRTC().Init('slave')
const emoticonsTrie = computed(() => {
let res = new trie.Trie()
diff --git a/src/views/obs/MusicRequestOBS.vue b/src/views/obs/MusicRequestOBS.vue
index 9401de1..935878e 100644
--- a/src/views/obs/MusicRequestOBS.vue
+++ b/src/views/obs/MusicRequestOBS.vue
@@ -23,7 +23,7 @@ const route = useRoute()
const currentId = computed(() => {
return props.id ?? route.query.id
})
-const rtc = useWebRTC().Init('slave')
+const rtc = await useWebRTC().Init('slave')
const listContainerRef = ref()
const footerRef = ref()
diff --git a/src/views/obs/QuestionDisplayOBS.vue b/src/views/obs/QuestionDisplayOBS.vue
index 7eb03db..15049b8 100644
--- a/src/views/obs/QuestionDisplayOBS.vue
+++ b/src/views/obs/QuestionDisplayOBS.vue
@@ -9,11 +9,13 @@ import { useWebRTC } from '@/store/useRTC'
const hash = ref('')
const token = useRouteQuery('token')
-const rtc = useWebRTC().Init('slave')
+const rtc = await useWebRTC().Init('slave')
const question = ref()
const setting = ref({} as Setting_QuestionDisplay)
+const cardRef = ref()
+
async function checkIfChanged() {
try {
const data = await QueryGetAPI(QUESTION_API_URL + 'get-hash', {
@@ -45,6 +47,9 @@ async function getQuestionAndSetting() {
console.log(err)
}
}
+function handleScroll(value: { clientHeight: number, scrollHeight: number, scrollTop: number }) {
+ cardRef.value?.setScroll(value)
+}
const visiable = ref(true)
const active = ref(true)
@@ -66,12 +71,16 @@ onMounted(() => {
active.value = a
}
}
+
+ rtc?.on('function.question.sync-scroll', handleScroll)
})
onUnmounted(() => {
clearInterval(timer)
+
+ rtc?.off('function.question.sync-scroll', handleScroll)
})
-
+
diff --git a/src/views/obs/QueueOBS.vue b/src/views/obs/QueueOBS.vue
index fb873fd..4318880 100644
--- a/src/views/obs/QueueOBS.vue
+++ b/src/views/obs/QueueOBS.vue
@@ -29,7 +29,7 @@ const route = useRoute()
const currentId = computed(() => {
return props.id ?? route.query.id
})
-const rtc = useWebRTC().Init('slave')
+const rtc = await useWebRTC().Init('slave')
const listContainerRef = ref()
const footerRef = ref()
diff --git a/src/views/open_live/LiveRequest.vue b/src/views/open_live/LiveRequest.vue
index a782d7c..f4f3ff1 100644
--- a/src/views/open_live/LiveRequest.vue
+++ b/src/views/open_live/LiveRequest.vue
@@ -15,7 +15,7 @@ import {
import { QueryGetAPI, QueryPostAPI, QueryPostAPIWithParams } from '@/api/query'
import SongPlayer from '@/components/SongPlayer.vue'
import { RoomAuthInfo } from '@/data/DanmakuClient'
-import { SONG_REQUEST_API_URL } from '@/data/constants'
+import { CURRENT_HOST, SONG_REQUEST_API_URL } from '@/data/constants'
import { useDanmakuClient } from '@/store/useDanmakuClient'
import {
Checkmark12Regular,
@@ -633,24 +633,24 @@ const columns = [
() => [
data.status == SongRequestStatus.Finish || data.status == SongRequestStatus.Cancel
? h(NTooltip, null, {
- trigger: () =>
- h(
- NButton,
- {
- size: 'small',
- type: 'info',
- circle: true,
- loading: isLoading.value,
- onClick: () => {
- updateSongStatus(data, SongRequestStatus.Waiting)
- },
+ trigger: () =>
+ h(
+ NButton,
+ {
+ size: 'small',
+ type: 'info',
+ circle: true,
+ loading: isLoading.value,
+ onClick: () => {
+ updateSongStatus(data, SongRequestStatus.Waiting)
},
- {
- icon: () => h(NIcon, { component: ReloadCircleSharp }),
- },
- ),
- default: () => '重新放回等待列表',
- })
+ },
+ {
+ icon: () => h(NIcon, { component: ReloadCircleSharp }),
+ },
+ ),
+ default: () => '重新放回等待列表',
+ })
: undefined,
h(
NPopconfirm,
@@ -731,7 +731,7 @@ async function updateActive() {
message.error('无法获取点播队列: ' + data.message)
return []
}
- } catch (err) {}
+ } catch (err) { }
}
function blockUser(item: SongRequestInfo) {
if (item.from != SongRequestFrom.Danmaku) {
@@ -793,15 +793,11 @@ onUnmounted(() => {
-
+
启用弹幕点播功能
-
+
@@ -812,11 +808,7 @@ onUnmounted(() => {
则其需要保持此页面开启才能点播, 也不要同时开多个页面, 会导致点播重复 !(部署了则不影响)
-
+
前往登录或注册
@@ -832,11 +824,8 @@ onUnmounted(() => {
-
+
@@ -861,12 +850,8 @@ onUnmounted(() => {
添加
-
+
加入时间优先
付费价格优先
舰长优先 (按等级)
@@ -893,17 +878,13 @@ onUnmounted(() => {
-
+
+ :style="`border-radius: 4px; background-color: ${song.status == SongRequestStatus.Singing ? '#75c37f' : '#577fb8'}; width: 10px; height: 20px`">
+