mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: enhance song management and notification features
- Updated SongList.vue to enable default sorting with a boolean flag. - Modified TempComponent.vue to include useNotification for better user feedback. - Refined useLiveRequest.ts to enforce type safety on song request settings. - Adjusted RTCClient.ts to improve event handling and connection logic. - Enhanced useVTsuruHub.ts to ensure SignalR connection is awaited during initialization. - Improved ManageLayout.vue by reorganizing menu options for better user experience. - Added folder scanning functionality in SongListManageView.vue for importing songs from local directories. - Implemented OBS notification system in various OBS-related components for real-time updates. - Removed outdated documentation files related to local question saving functionality. - Introduced a new store useOBSNotification.ts to manage OBS notifications effectively.
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import type {
|
||||
DanmakuUserInfo,
|
||||
EventModel,
|
||||
Setting_LiveRequest,
|
||||
SongRequestInfo,
|
||||
SongsInfo,
|
||||
} from '@/api/api-models'
|
||||
@@ -69,7 +70,7 @@ export const useLiveRequest = defineStore('songRequest', () => {
|
||||
return true
|
||||
})
|
||||
|
||||
const settings = accountInfo.value?.settings?.songRequest || {}
|
||||
const settings: Setting_LiveRequest = accountInfo.value?.settings?.songRequest
|
||||
|
||||
switch (settings.sortType) {
|
||||
case QueueSortType.TimeFirst: {
|
||||
@@ -154,7 +155,7 @@ export const useLiveRequest = defineStore('songRequest', () => {
|
||||
`[SONG-REQUEST] 收到 [${danmaku.uname}] 的点播${danmaku.type == EventDataTypes.SC ? 'SC' : '弹幕'}: ${danmaku.msg}`,
|
||||
)
|
||||
|
||||
const settings = accountInfo.value?.settings?.songRequest || {}
|
||||
const settings: Setting_LiveRequest = accountInfo.value?.settings?.songRequest
|
||||
|
||||
if (settings.enableOnStreaming && accountInfo.value?.streamerInfo?.isStreaming != true) {
|
||||
window.$notification.info({
|
||||
@@ -436,7 +437,7 @@ export const useLiveRequest = defineStore('songRequest', () => {
|
||||
}
|
||||
|
||||
function onGetSC(danmaku: EventModel) {
|
||||
const settings = accountInfo.value?.settings?.songRequest || {}
|
||||
const settings = accountInfo.value?.settings?.songRequest
|
||||
|
||||
if (settings.allowSC && checkMessage(danmaku.msg)) {
|
||||
addSong(danmaku)
|
||||
|
||||
Reference in New Issue
Block a user