mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
format code
This commit is contained in:
@@ -239,7 +239,9 @@ export default class DanmakuClient {
|
||||
}
|
||||
private sendHeartbeat() {
|
||||
if (this.client) {
|
||||
const query = this.authInfo ? QueryPostAPI<OpenLiveInfo>(OPEN_LIVE_API_URL + 'heartbeat', this.authInfo) : QueryGetAPI<OpenLiveInfo>(OPEN_LIVE_API_URL + 'heartbeat-internal')
|
||||
const query = this.authInfo
|
||||
? QueryPostAPI<OpenLiveInfo>(OPEN_LIVE_API_URL + 'heartbeat', this.authInfo)
|
||||
: QueryGetAPI<OpenLiveInfo>(OPEN_LIVE_API_URL + 'heartbeat-internal')
|
||||
query.then((data) => {
|
||||
if (data.code != 200) {
|
||||
console.error('[OPEN-LIVE] 心跳失败')
|
||||
@@ -425,7 +427,10 @@ export default class DanmakuClient {
|
||||
}
|
||||
private async getAuthInfo(): Promise<{ data: OpenLiveInfo | null; message: string }> {
|
||||
try {
|
||||
const data = await QueryPostAPI<OpenLiveInfo>(OPEN_LIVE_API_URL + 'start', this.authInfo?.Code ? this.authInfo : undefined)
|
||||
const data = await QueryPostAPI<OpenLiveInfo>(
|
||||
OPEN_LIVE_API_URL + 'start',
|
||||
this.authInfo?.Code ? this.authInfo : undefined,
|
||||
)
|
||||
if (data.code == 200) {
|
||||
console.log('[OPEN-LIVE] 已获取场次信息')
|
||||
return {
|
||||
|
||||
@@ -9,7 +9,12 @@ const builder = new XMLBuilder({
|
||||
format: true,
|
||||
})
|
||||
|
||||
export function GetString(account: AccountInfo | undefined, live: ResponseLiveInfoModel, danmakus: DanmakuModel[], type: 'json' | 'xml' | 'csv') {
|
||||
export function GetString(
|
||||
account: AccountInfo | undefined,
|
||||
live: ResponseLiveInfoModel,
|
||||
danmakus: DanmakuModel[],
|
||||
type: 'json' | 'xml' | 'csv',
|
||||
) {
|
||||
const tempDanmakus = new List(danmakus)
|
||||
.Select((d) => {
|
||||
return {
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
import EasySpeech from 'easy-speech'
|
||||
|
||||
|
||||
@@ -2,7 +2,14 @@ import { VNode } from 'vue'
|
||||
|
||||
export type TemplateConfig<T> = {
|
||||
name: string
|
||||
items: (TemplateConfigStringItem<T> | TemplateConfigNumberItem<T> | TemplateConfigStringArrayItem<T> | TemplateConfigNumberArrayItem<T> | TemplateConfigImageItem<T> | TemplateConfigRenderItem<T>)[]
|
||||
items: (
|
||||
| TemplateConfigStringItem<T>
|
||||
| TemplateConfigNumberItem<T>
|
||||
| TemplateConfigStringArrayItem<T>
|
||||
| TemplateConfigNumberArrayItem<T>
|
||||
| TemplateConfigImageItem<T>
|
||||
| TemplateConfigRenderItem<T>
|
||||
)[]
|
||||
onConfirm?: (arg0: T) => void
|
||||
}
|
||||
interface TemplateConfigBase {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -145,7 +145,7 @@ export default class ChatClientOfficialBase {
|
||||
this.sendAuth()
|
||||
this.heartbeatTimerId = setInterval(this.sendHeartbeat.bind(this), HEARTBEAT_INTERVAL)
|
||||
this.refreshReceiveTimeoutTimer()
|
||||
console.log('ws 已连接');
|
||||
console.log('ws 已连接')
|
||||
}
|
||||
|
||||
sendHeartbeat() {
|
||||
|
||||
@@ -13,7 +13,8 @@ export const IMGUR_URL = FILE_BASE_URL + '/imgur/'
|
||||
export const THINGS_URL = FILE_BASE_URL + '/things/'
|
||||
export const apiFail = ref(false)
|
||||
|
||||
export const BASE_API = () => (process.env.NODE_ENV === 'development' ? debugAPI : apiFail.value ? failoverAPI : releseAPI)
|
||||
export const BASE_API = () =>
|
||||
process.env.NODE_ENV === 'development' ? debugAPI : apiFail.value ? failoverAPI : releseAPI
|
||||
export const FETCH_API = 'https://fetch.vtsuru.live/'
|
||||
|
||||
export const TURNSTILE_KEY = '0x4AAAAAAAETUSAKbds019h0'
|
||||
@@ -40,12 +41,24 @@ export const POINT_API_URL = { toString: () => `${BASE_API()}point/` }
|
||||
export const BILI_AUTH_API_URL = { toString: () => `${BASE_API()}bili-auth/` }
|
||||
|
||||
export const ScheduleTemplateMap = {
|
||||
'': { name: '默认', compoent: defineAsyncComponent(() => import('@/views/view/scheduleTemplate/DefaultScheduleTemplate.vue')) },
|
||||
pinky: { name: '粉粉', compoent: defineAsyncComponent(() => import('@/views/view/scheduleTemplate/PinkySchedule.vue')) },
|
||||
'': {
|
||||
name: '默认',
|
||||
compoent: defineAsyncComponent(() => import('@/views/view/scheduleTemplate/DefaultScheduleTemplate.vue')),
|
||||
},
|
||||
pinky: {
|
||||
name: '粉粉',
|
||||
compoent: defineAsyncComponent(() => import('@/views/view/scheduleTemplate/PinkySchedule.vue')),
|
||||
},
|
||||
} as { [key: string]: { name: string; compoent: any } }
|
||||
export const SongListTemplateMap = {
|
||||
'': { name: '默认', compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/DefaultSongListTemplate.vue')) },
|
||||
simple: { name: '简单', compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue')) },
|
||||
'': {
|
||||
name: '默认',
|
||||
compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/DefaultSongListTemplate.vue')),
|
||||
},
|
||||
simple: {
|
||||
name: '简单',
|
||||
compoent: defineAsyncComponent(() => import('@/views/view/songListTemplate/SimpleSongListTemplate.vue')),
|
||||
},
|
||||
} as { [key: string]: { name: string; compoent: any } }
|
||||
export const IndexTemplateMap = {
|
||||
'': { name: '默认', compoent: DefaultIndexTemplateVue },
|
||||
|
||||
Reference in New Issue
Block a user