update build action

This commit is contained in:
2025-03-18 20:42:25 +08:00
parent eb43d88e44
commit 1b6ec67ba8
13 changed files with 155 additions and 122 deletions

View File

@@ -22,3 +22,5 @@ jobs:
run: bun install run: bun install
- name: 📦 Build - name: 📦 Build
run: bun run build run: bun run build
- name: 📦 Upload SourceMap
run: bunx @hyperdx/cli upload-sourcemaps --path dist\assets

BIN
bun.lockb

Binary file not shown.

View File

@@ -10,6 +10,7 @@
}, },
"dependencies": { "dependencies": {
"@hyperdx/browser": "^0.21.2", "@hyperdx/browser": "^0.21.2",
"@hyperdx/cli": "^0.1.0",
"@microsoft/signalr": "^8.0.7", "@microsoft/signalr": "^8.0.7",
"@microsoft/signalr-protocol-msgpack": "^8.0.7", "@microsoft/signalr-protocol-msgpack": "^8.0.7",
"@mixer/postmessage-rpc": "^1.1.4", "@mixer/postmessage-rpc": "^1.1.4",

View File

@@ -25,6 +25,7 @@ export async function QueryPostAPIWithParams<T>(
contentType?: string, contentType?: string,
headers?: [string, string][] headers?: [string, string][]
): Promise<APIRoot<T>> { ): Promise<APIRoot<T>> {
// @ts-expect-error 忽略
return await QueryPostAPIWithParamsInternal<APIRoot<T>>( return await QueryPostAPIWithParamsInternal<APIRoot<T>>(
urlString, urlString,
params, params,
@@ -40,15 +41,23 @@ async function QueryPostAPIWithParamsInternal<T>(
contentType: string = 'application/json', contentType: string = 'application/json',
headers: [string, string][] = [] headers: [string, string][] = []
) { ) {
const url = new URL(urlString) let url: URL
try {
url = new URL(urlString)
} catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e)
return {
code: 400,
message: '无效的API地址: ' + urlString,
data: {} as T
}
}
url.search = getParams(params) url.search = getParams(params)
headers ??= [] headers ??= []
let h = {} as { let h = {} as { [key: string]: string }
[key: string]: string headers.forEach((header) => {
}
headers.forEach(header => {
h[header[0]] = header[1] h[header[0]] = header[1]
}); })
if (cookie.value) h['Authorization'] = `Bearer ${cookie.value}` if (cookie.value) h['Authorization'] = `Bearer ${cookie.value}`
h['Content-Type'] = contentType h['Content-Type'] = contentType
@@ -77,6 +86,7 @@ export async function QueryGetAPI<T>(
params?: any, params?: any,
headers?: [string, string][] headers?: [string, string][]
): Promise<APIRoot<T>> { ): Promise<APIRoot<T>> {
// @ts-expect-error 忽略
return await QueryGetAPIInternal<APIRoot<T>>(urlString, params, headers) return await QueryGetAPIInternal<APIRoot<T>>(urlString, params, headers)
} }
async function QueryGetAPIInternal<T>( async function QueryGetAPIInternal<T>(
@@ -85,22 +95,27 @@ async function QueryGetAPIInternal<T>(
headers?: [string, string][] headers?: [string, string][]
) { ) {
try { try {
const url = new URL(urlString) let url: URL
try {
url = new URL(urlString)
} catch (e) {
console.error('尝试解析API地址失败: ' + urlString, e)
return {
code: 400,
message: '无效的API地址: ' + urlString,
data: {} as T
}
}
url.search = getParams(params) url.search = getParams(params)
headers ??= [] headers ??= []
let h = {} as { let h = {} as { [key: string]: string }
[key: string]: string
}
headers.forEach((header) => { headers.forEach((header) => {
h[header[0]] = header[1] h[header[0]] = header[1]
}) })
if (cookie.value) { if (cookie.value) {
h['Authorization'] = `Bearer ${cookie.value}` h['Authorization'] = `Bearer ${cookie.value}`
} }
return await QueryAPIInternal<T>(url, { return await QueryAPIInternal<T>(url, { method: 'get', headers: h })
method: 'get',
headers: h
})
} catch (err) { } catch (err) {
console.log(`url:${urlString}, error:${err}`) console.log(`url:${urlString}, error:${err}`)
throw err throw err
@@ -133,6 +148,7 @@ export async function QueryPostPaginationAPI<T>(
url: string, url: string,
body?: unknown body?: unknown
): Promise<PaginationResponse<T>> { ): Promise<PaginationResponse<T>> {
// @ts-expect-error 忽略
return await QueryPostAPIWithParamsInternal<PaginationResponse<T>>( return await QueryPostAPIWithParamsInternal<PaginationResponse<T>>(
url, url,
undefined, undefined,
@@ -143,6 +159,7 @@ export async function QueryGetPaginationAPI<T>(
urlString: string, urlString: string,
params?: unknown params?: unknown
): Promise<PaginationResponse<T>> { ): Promise<PaginationResponse<T>> {
// @ts-expect-error 忽略
return await QueryGetAPIInternal<PaginationResponse<T>>(urlString, params) return await QueryGetAPIInternal<PaginationResponse<T>>(urlString, params)
} }
export function GetHeaders(): [string, string][] { export function GetHeaders(): [string, string][] {

View File

@@ -47,8 +47,8 @@ defineExpose({ setCss })
const { customCss, isOBS = true } = defineProps<{ const { customCss, isOBS = true } = defineProps<{
customCss?: string customCss?: string
isOBS?: boolean, isOBS?: boolean,
active: boolean, active?: boolean,
visible: boolean, visible?: boolean,
}>() }>()
const messageRender = ref() const messageRender = ref()

View File

@@ -88,8 +88,13 @@ async function get() {
if (data.code == 200) { if (data.code == 200) {
return data.data return data.data
} }
} catch (err) {} } catch (err) {
return {} as { songs: SongRequestInfo[]; setting: Setting_LiveRequest } console.log(err)
}
return {
songs: [],
setting: {} as Setting_LiveRequest,
} as { songs: SongRequestInfo[]; setting: Setting_LiveRequest }
} }
const allowGuardTypes = computed(() => { const allowGuardTypes = computed(() => {
const types = [] const types = []
@@ -148,19 +153,12 @@ onUnmounted(() => {
<NDivider class="live-request-divider"> <NDivider class="live-request-divider">
<p class="live-request-header-count">已有 {{ activeSongs.length ?? 0 }} </p> <p class="live-request-header-count">已有 {{ activeSongs.length ?? 0 }} </p>
</NDivider> </NDivider>
<div <div class="live-request-processing-container"
class="live-request-processing-container" :singing="songs.findIndex((s) => s.status == SongRequestStatus.Singing) > -1" :from="singing?.from as number"
:singing="songs.findIndex((s) => s.status == SongRequestStatus.Singing) > -1" :status="singing?.status as number">
:from="singing?.from as number"
:status="singing?.status as number"
>
<div class="live-request-processing-prefix"></div> <div class="live-request-processing-prefix"></div>
<template v-if="singing"> <template v-if="singing">
<img <img class="live-request-processing-avatar" :src="singing?.user?.face" referrerpolicy="no-referrer" />
class="live-request-processing-avatar"
:src="singing?.user?.face"
referrerpolicy="no-referrer"
/>
<p class="live-request-processing-song-name">{{ singing?.songName }}</p> <p class="live-request-processing-song-name">{{ singing?.songName }}</p>
<p class="live-request-processing-name">{{ singing?.user?.name }}</p> <p class="live-request-processing-name">{{ singing?.user?.name }}</p>
</template> </template>
@@ -169,22 +167,10 @@ onUnmounted(() => {
</div> </div>
<div class="live-request-content" ref="listContainerRef"> <div class="live-request-content" ref="listContainerRef">
<template v-if="activeSongs.length > 0"> <template v-if="activeSongs.length > 0">
<Vue3Marquee <Vue3Marquee class="live-request-list" :key="key" vertical :duration="20" :pause="!isMoreThanContainer"
class="live-request-list" :style="`height: ${height}px;width: ${width}px;`">
:key="key" <div class="live-request-list-item" :from="song.from as number" :status="song.status as number"
vertical v-for="(song, index) in activeSongs" :key="song.id" :style="`height: ${itemHeight}px`">
:duration="20"
:pause="!isMoreThanContainer"
:style="`height: ${height}px;width: ${width}px;`"
>
<div
class="live-request-list-item"
:from="song.from as number"
:status="song.status as number"
v-for="(song, index) in activeSongs"
:key="song.id"
:style="`height: ${itemHeight}px`"
>
<div class="live-request-list-item-index" :index="index + 1"> <div class="live-request-list-item-index" :index="index + 1">
{{ index + 1 }} {{ index + 1 }}
</div> </div>
@@ -194,11 +180,8 @@ onUnmounted(() => {
<p v-if="settings.showUserName" class="live-request-list-item-name"> <p v-if="settings.showUserName" class="live-request-list-item-name">
{{ song.from == SongRequestFrom.Manual ? '主播添加' : song.user?.name }} {{ song.from == SongRequestFrom.Manual ? '主播添加' : song.user?.name }}
</p> </p>
<div <div v-if="settings.showFanMadelInfo" class="live-request-list-item-level"
v-if="settings.showFanMadelInfo" :has-level="(song.user?.fans_medal_level ?? 0) > 0">
class="live-request-list-item-level"
:has-level="(song.user?.fans_medal_level ?? 0) > 0"
>
{{ `${song.user?.fans_medal_name} ${song.user?.fans_medal_level}` }} {{ `${song.user?.fans_medal_name} ${song.user?.fans_medal_level}` }}
</div> </div>
</div> </div>
@@ -210,13 +193,8 @@ onUnmounted(() => {
</div> </div>
</div> </div>
<div class="live-request-footer" v-if="settings.showRequireInfo" ref="footerRef"> <div class="live-request-footer" v-if="settings.showRequireInfo" ref="footerRef">
<Vue3Marquee <Vue3Marquee :key="key" ref="footerListRef" class="live-request-footer-marquee" :duration="10"
:key="key" animate-on-overflow-only>
ref="footerListRef"
class="live-request-footer-marquee"
:duration="10"
animate-on-overflow-only
>
<span class="live-request-tag" type="prefix"> <span class="live-request-tag" type="prefix">
<div class="live-request-tag-key">前缀</div> <div class="live-request-tag-key">前缀</div>
<div class="live-request-tag-value"> <div class="live-request-tag-value">
@@ -264,6 +242,7 @@ onUnmounted(() => {
border-radius: 10px; border-radius: 10px;
color: white; color: white;
} }
.live-request-header { .live-request-header {
margin: 0; margin: 0;
color: #fff; color: #fff;
@@ -276,17 +255,20 @@ onUnmounted(() => {
0 0 30px #61606086, 0 0 30px #61606086,
0 0 40px rgba(64, 156, 179, 0.555); 0 0 40px rgba(64, 156, 179, 0.555);
} }
.live-request-header-count { .live-request-header-count {
color: #ffffffbd; color: #ffffffbd;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
} }
.live-request-divider { .live-request-divider {
margin: 0 auto; margin: 0 auto;
margin-top: -15px; margin-top: -15px;
margin-bottom: -15px; margin-bottom: -15px;
width: 90%; width: 90%;
} }
.live-request-processing-container { .live-request-processing-container {
height: 35px; height: 35px;
margin: 0 10px 0 10px; margin: 0 10px 0 10px;
@@ -294,34 +276,41 @@ onUnmounted(() => {
align-items: center; align-items: center;
gap: 10px; gap: 10px;
} }
.live-request-processing-empty { .live-request-processing-empty {
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
color: #ffffffbe; color: #ffffffbe;
} }
.live-request-processing-prefix { .live-request-processing-prefix {
border: 2px solid rgb(231, 231, 231); border: 2px solid rgb(231, 231, 231);
height: 30px; height: 30px;
width: 10px; width: 10px;
border-radius: 10px; border-radius: 10px;
} }
.live-request-processing-container[singing='true'] .live-request-processing-prefix { .live-request-processing-container[singing='true'] .live-request-processing-prefix {
background-color: #75c37f; background-color: #75c37f;
animation: animated-border 3s linear infinite; animation: animated-border 3s linear infinite;
} }
.live-request-processing-container[singing='false'] .live-request-processing-prefix { .live-request-processing-container[singing='false'] .live-request-processing-prefix {
background-color: #c37575; background-color: #c37575;
} }
.live-request-processing-avatar { .live-request-processing-avatar {
height: 30px; height: 30px;
border-radius: 50%; border-radius: 50%;
/* 添加无限旋转动画 */ /* 添加无限旋转动画 */
animation: rotate 20s linear infinite; animation: rotate 20s linear infinite;
} }
/* 网页点歌 */ /* 网页点歌 */
.live-request-processing-container[from='3'] .live-request-processing-avatar { .live-request-processing-container[from='3'] .live-request-processing-avatar {
display: none; display: none;
} }
.live-request-processing-song-name { .live-request-processing-song-name {
font-size: large; font-size: large;
font-weight: bold; font-weight: bold;
@@ -329,21 +318,26 @@ onUnmounted(() => {
white-space: nowrap; white-space: nowrap;
max-width: 80%; max-width: 80%;
} }
.live-request-processing-name { .live-request-processing-name {
font-size: 12px; font-size: 12px;
font-style: italic; font-style: italic;
} }
@keyframes rotate { @keyframes rotate {
0% { 0% {
transform: rotate(0); transform: rotate(0);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.n-divider__line { .n-divider__line {
background-color: #ffffffd5; background-color: #ffffffd5;
} }
.live-request-content { .live-request-content {
background-color: #0f0f0f4f; background-color: #0f0f0f4f;
margin: 10px; margin: 10px;
@@ -352,9 +346,11 @@ onUnmounted(() => {
border-radius: 10px; border-radius: 10px;
overflow-x: hidden; overflow-x: hidden;
} }
.marquee { .marquee {
justify-items: left; justify-items: left;
} }
.live-request-list-item { .live-request-list-item {
display: flex; display: flex;
width: 100%; width: 100%;
@@ -364,6 +360,7 @@ onUnmounted(() => {
justify-content: left; justify-content: left;
gap: 10px; gap: 10px;
} }
.live-request-list-item-song-name { .live-request-list-item-song-name {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
@@ -380,13 +377,13 @@ onUnmounted(() => {
color: #d2d8d6; color: #d2d8d6;
font-size: 12px; font-size: 12px;
} }
.live-request-list-item[from='0'] .live-request-list-item-avatar { .live-request-list-item[from='0'] .live-request-list-item-avatar {
display: none; display: none;
} }
/* 弹幕点歌 */ /* 弹幕点歌 */
.live-request-list-item[from='1'] { .live-request-list-item[from='1'] {}
}
.live-request-list-item-name { .live-request-list-item-name {
font-style: italic; font-style: italic;
@@ -397,6 +394,7 @@ onUnmounted(() => {
margin-left: auto; margin-left: auto;
} }
.live-request-list-item-index { .live-request-list-item-index {
text-align: center; text-align: center;
height: 18px; height: 18px;
@@ -407,6 +405,7 @@ onUnmounted(() => {
color: rgba(204, 204, 204, 0.993); color: rgba(204, 204, 204, 0.993);
font-size: 12px; font-size: 12px;
} }
.live-request-list-item-level { .live-request-list-item-level {
text-align: center; text-align: center;
height: 18px; height: 18px;
@@ -417,9 +416,11 @@ onUnmounted(() => {
color: rgba(204, 204, 204, 0.993); color: rgba(204, 204, 204, 0.993);
font-size: 12px; font-size: 12px;
} }
.live-request-list-item-level[has-level='false'] { .live-request-list-item-level[has-level='false'] {
display: none; display: none;
} }
.live-request-footer { .live-request-footer {
margin: 0 5px 5px 5px; margin: 0 5px 5px 5px;
height: 60px; height: 60px;
@@ -428,6 +429,7 @@ onUnmounted(() => {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.live-request-tag { .live-request-tag {
display: flex; display: flex;
margin: 5px 0 5px 5px; margin: 5px 0 5px 5px;
@@ -440,30 +442,36 @@ onUnmounted(() => {
flex-direction: column; flex-direction: column;
justify-content: left; justify-content: left;
} }
.live-request-tag-key { .live-request-tag-key {
font-style: italic; font-style: italic;
color: rgb(211, 211, 211); color: rgb(211, 211, 211);
font-size: 12px; font-size: 12px;
} }
.live-request-tag-value { .live-request-tag-value {
font-size: 14px; font-size: 14px;
} }
.live-request-list-item-index[index='1'] { .live-request-list-item-index[index='1'] {
background-color: #ebc34c; background-color: #ebc34c;
color: white; color: white;
font-weight: bold; font-weight: bold;
text-shadow: 0 0 6px #ebc34c; text-shadow: 0 0 6px #ebc34c;
} }
.live-request-list-item-index[index='2'] { .live-request-list-item-index[index='2'] {
background-color: #c0c0c0; background-color: #c0c0c0;
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
.live-request-list-item-index[index='3'] { .live-request-list-item-index[index='3'] {
background-color: #b87333; background-color: #b87333;
color: white; color: white;
font-weight: bold; font-weight: bold;
} }
@keyframes animated-border { @keyframes animated-border {
0% { 0% {
box-shadow: 0 0 0px #589580; box-shadow: 0 0 0px #589580;

View File

@@ -16,8 +16,8 @@ import { Vue3Marquee } from 'vue3-marquee'
const props = defineProps<{ const props = defineProps<{
id?: number, id?: number,
active: boolean, active?: boolean,
visible: boolean, visible?: boolean,
}>() }>()
const message = useMessage() const message = useMessage()

View File

@@ -16,8 +16,8 @@ type WaitMusicInfo = {
const props = defineProps<{ const props = defineProps<{
id?: number, id?: number,
active: boolean, active?: boolean,
visible: boolean, visible?: boolean,
}>() }>()
const message = useMessage() const message = useMessage()
@@ -52,7 +52,7 @@ async function get() {
if (data.code == 200) { if (data.code == 200) {
return data.data return data.data
} }
} catch (err) {} } catch (err) { }
return originSongs.value return originSongs.value
} }
const isMoreThanContainer = computed(() => { const isMoreThanContainer = computed(() => {
@@ -85,18 +85,13 @@ onUnmounted(() => {
<NDivider class="music-request-divider"> <NDivider class="music-request-divider">
<p class="music-request-header-count">已有 {{ originSongs.waiting.length ?? 0 }} </p> <p class="music-request-header-count">已有 {{ originSongs.waiting.length ?? 0 }} </p>
</NDivider> </NDivider>
<div <div class="music-request-singing-container" :playing="originSongs.playing ? 'true' : 'false'"
class="music-request-singing-container" :from="originSongs.playing?.music.from ?? -1">
:playing="originSongs.playing ? 'true' : 'false'"
:from="originSongs.playing?.music.from ?? -1"
>
<div class="music-request-singing-prefix"></div> <div class="music-request-singing-prefix"></div>
<template v-if="originSongs.playing"> <template v-if="originSongs.playing">
<img <img class="music-request-singing-avatar"
class="music-request-singing-avatar"
:src="originSongs.playing.music.cover ?? AVATAR_URL + originSongs.playing.from?.uid" :src="originSongs.playing.music.cover ?? AVATAR_URL + originSongs.playing.from?.uid"
referrerpolicy="no-referrer" referrerpolicy="no-referrer" />
/>
<p class="music-request-singing-song-name">{{ originSongs.playing.music.name }}</p> <p class="music-request-singing-song-name">{{ originSongs.playing.music.name }}</p>
<p class="music-request-singing-name">{{ originSongs.playing.from?.name }}</p> <p class="music-request-singing-name">{{ originSongs.playing.from?.name }}</p>
</template> </template>
@@ -105,21 +100,10 @@ onUnmounted(() => {
</div> </div>
<div class="music-request-content" ref="listContainerRef"> <div class="music-request-content" ref="listContainerRef">
<template v-if="originSongs.waiting.length > 0"> <template v-if="originSongs.waiting.length > 0">
<Vue3Marquee <Vue3Marquee class="music-request-list" :key="key" vertical :pause="!isMoreThanContainer" :duration="20"
class="music-request-list" :style="`height: ${height}px;width: ${width}px;`">
:key="key" <span class="music-request-list-item" :from="item.music.from as number"
vertical v-for="(item, index) in originSongs.waiting" :key="item.music.id" :style="`height: ${itemHeight}px`">
:pause="!isMoreThanContainer"
:duration="20"
:style="`height: ${height}px;width: ${width}px;`"
>
<span
class="music-request-list-item"
:from="item.music.from as number"
v-for="(item, index) in originSongs.waiting"
:key="item.music.id"
:style="`height: ${itemHeight}px`"
>
<div class="music-request-list-item-index" :index="index + 1"> <div class="music-request-list-item-index" :index="index + 1">
{{ index + 1 }} {{ index + 1 }}
</div> </div>
@@ -149,6 +133,7 @@ onUnmounted(() => {
border-radius: 10px; border-radius: 10px;
color: white; color: white;
} }
.music-request-header { .music-request-header {
margin: 0; margin: 0;
color: #fff; color: #fff;
@@ -161,17 +146,20 @@ onUnmounted(() => {
0 0 30px #61606086, 0 0 30px #61606086,
0 0 40px rgba(64, 156, 179, 0.555); 0 0 40px rgba(64, 156, 179, 0.555);
} }
.music-request-header-count { .music-request-header-count {
color: #ffffffbd; color: #ffffffbd;
text-align: center; text-align: center;
font-size: 14px; font-size: 14px;
} }
.music-request-divider { .music-request-divider {
margin: 0 auto; margin: 0 auto;
margin-top: -15px; margin-top: -15px;
margin-bottom: -15px; margin-bottom: -15px;
width: 90%; width: 90%;
} }
.music-request-singing-container { .music-request-singing-container {
height: 35px; height: 35px;
margin: 0 10px 0 10px; margin: 0 10px 0 10px;
@@ -179,34 +167,41 @@ onUnmounted(() => {
align-items: center; align-items: center;
gap: 10px; gap: 10px;
} }
.music-request-singing-empty { .music-request-singing-empty {
font-weight: bold; font-weight: bold;
font-style: italic; font-style: italic;
color: #ffffffbe; color: #ffffffbe;
} }
.music-request-singing-prefix { .music-request-singing-prefix {
border: 2px solid rgb(231, 231, 231); border: 2px solid rgb(231, 231, 231);
height: 30px; height: 30px;
width: 10px; width: 10px;
border-radius: 10px; border-radius: 10px;
} }
.music-request-singing-container[playing='true'] .music-request-singing-prefix { .music-request-singing-container[playing='true'] .music-request-singing-prefix {
background-color: #75c37f; background-color: #75c37f;
animation: animated-border 3s linear infinite; animation: animated-border 3s linear infinite;
} }
.music-request-singing-container[playing='false'] .music-request-singing-prefix { .music-request-singing-container[playing='false'] .music-request-singing-prefix {
background-color: #c37575; background-color: #c37575;
} }
.music-request-singing-avatar { .music-request-singing-avatar {
height: 30px; height: 30px;
border-radius: 50%; border-radius: 50%;
/* 添加无限旋转动画 */ /* 添加无限旋转动画 */
animation: rotate 20s linear infinite; animation: rotate 20s linear infinite;
} }
/* 网页点歌 */ /* 网页点歌 */
.music-request-singing-container[from='3'] .music-request-singing-avatar { .music-request-singing-container[from='3'] .music-request-singing-avatar {
display: none; display: none;
} }
.music-request-singing-song-name { .music-request-singing-song-name {
font-size: large; font-size: large;
font-weight: bold; font-weight: bold;
@@ -214,21 +209,26 @@ onUnmounted(() => {
white-space: nowrap; white-space: nowrap;
max-width: 80%; max-width: 80%;
} }
.music-request-singing-name { .music-request-singing-name {
font-size: 12px; font-size: 12px;
font-style: italic; font-style: italic;
} }
@keyframes rotate { @keyframes rotate {
0% { 0% {
transform: rotate(0); transform: rotate(0);
} }
100% { 100% {
transform: rotate(360deg); transform: rotate(360deg);
} }
} }
.n-divider__line { .n-divider__line {
background-color: #ffffffd5; background-color: #ffffffd5;
} }
.music-request-content { .music-request-content {
background-color: #0f0f0f4f; background-color: #0f0f0f4f;
margin: 10px; margin: 10px;
@@ -237,9 +237,11 @@ onUnmounted(() => {
border-radius: 10px; border-radius: 10px;
overflow-x: hidden; overflow-x: hidden;
} }
.marquee { .marquee {
justify-items: left; justify-items: left;
} }
.music-request-list-item { .music-request-list-item {
display: flex; display: flex;
width: 100%; width: 100%;
@@ -249,6 +251,7 @@ onUnmounted(() => {
justify-content: left; justify-content: left;
gap: 10px; gap: 10px;
} }
.music-request-list-item-song-name { .music-request-list-item-song-name {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
@@ -265,13 +268,13 @@ onUnmounted(() => {
color: #d2d8d6; color: #d2d8d6;
font-size: 12px; font-size: 12px;
} }
.music-request-list-item[from='0'] .music-request-list-item-avatar { .music-request-list-item[from='0'] .music-request-list-item-avatar {
display: none; display: none;
} }
/* 弹幕点歌 */ /* 弹幕点歌 */
.music-request-list-item[from='1'] { .music-request-list-item[from='1'] {}
}
.music-request-list-item-name { .music-request-list-item-name {
font-style: italic; font-style: italic;
@@ -282,6 +285,7 @@ onUnmounted(() => {
margin-left: auto; margin-left: auto;
} }
.music-request-list-item-index { .music-request-list-item-index {
text-align: center; text-align: center;
height: 18px; height: 18px;
@@ -292,6 +296,7 @@ onUnmounted(() => {
color: rgba(204, 204, 204, 0.993); color: rgba(204, 204, 204, 0.993);
font-size: 12px; font-size: 12px;
} }
.music-request-list-item-level { .music-request-list-item-level {
text-align: center; text-align: center;
height: 18px; height: 18px;
@@ -302,9 +307,11 @@ onUnmounted(() => {
color: rgba(204, 204, 204, 0.993); color: rgba(204, 204, 204, 0.993);
font-size: 12px; font-size: 12px;
} }
.music-request-list-item-level[has-level='false'] { .music-request-list-item-level[has-level='false'] {
display: none; display: none;
} }
.music-request-tag { .music-request-tag {
display: flex; display: flex;
margin: 5px 0 5px 5px; margin: 5px 0 5px 5px;
@@ -317,14 +324,17 @@ onUnmounted(() => {
flex-direction: column; flex-direction: column;
justify-content: left; justify-content: left;
} }
.music-request-tag-key { .music-request-tag-key {
font-style: italic; font-style: italic;
color: rgb(211, 211, 211); color: rgb(211, 211, 211);
font-size: 12px; font-size: 12px;
} }
.music-request-tag-value { .music-request-tag-value {
font-size: 14px; font-size: 14px;
} }
@keyframes animated-border { @keyframes animated-border {
0% { 0% {
box-shadow: 0 0 0px #589580; box-shadow: 0 0 0px #589580;

View File

@@ -9,8 +9,8 @@ import { useWebRTC } from '@/store/useRTC'
const props = defineProps<{ const props = defineProps<{
id?: number, id?: number,
active: boolean, active?: boolean,
visible: boolean, visible?: boolean,
}>() }>()
const hash = ref('') const hash = ref('')

View File

@@ -20,8 +20,8 @@ import { Vue3Marquee } from 'vue3-marquee'
const props = defineProps<{ const props = defineProps<{
id?: number, id?: number,
active: boolean, active?: boolean,
visible: boolean, visible?: boolean,
}>() }>()
const message = useMessage() const message = useMessage()

View File

@@ -283,7 +283,15 @@ function speakFromAPI(text: string) {
.trim() .trim()
.replace(/^(?:https?:\/\/)/, '') .replace(/^(?:https?:\/\/)/, '')
.replace(/\{\{\s*text\s*\}\}/, encodeURIComponent(text))}` .replace(/\{\{\s*text\s*\}\}/, encodeURIComponent(text))}`
const tempURL = new URL(url) let tempURL: URL
try {
tempURL = new URL(url)
} catch (err) {
console.log(err)
message.error('无效的API地址: ' + url)
cancelSpeech()
return
}
if (isVtsuruVoiceAPI.value) { if (isVtsuruVoiceAPI.value) {
tempURL.searchParams.set('vtsuruId', accountInfo.value?.id.toString() ?? '-1') tempURL.searchParams.set('vtsuruId', accountInfo.value?.id.toString() ?? '-1')
url = tempURL.toString() url = tempURL.toString()

View File

@@ -10,7 +10,7 @@
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"useDefineForClassFields": true, "useDefineForClassFields": true,
"allowJs": false, "allowJs": false,
"sourceMap": false, "sourceMap": true,
"baseUrl": ".", "baseUrl": ".",
"types": ["node"], "types": ["node"],
"paths": { "paths": {

View File

@@ -23,15 +23,10 @@ const monacoEditorPlugin = isObjectWithDefaultFunction(monacoEditorPluginModule)
export default defineConfig({ export default defineConfig({
plugins: [ plugins: [
vue({ vue({
script: { script: { propsDestructure: true, defineModel: true },
propsDestructure: true,
defineModel: true
},
include: [/\.vue$/, /\.md$/], include: [/\.vue$/, /\.md$/],
template: { template: {
compilerOptions: { compilerOptions: { isCustomElement: (tag) => tag.startsWith('yt-') }
isCustomElement: (tag) => tag.startsWith('yt-')
}
} }
}), }),
svgLoader(), svgLoader(),
@@ -42,19 +37,11 @@ export default defineConfig({
caddyTls(), caddyTls(),
monacoEditorPlugin({ languageWorkers: ['css'] }) monacoEditorPlugin({ languageWorkers: ['css'] })
], ],
server: { server: { port: 51000 },
port: 51000 resolve: { alias: { '@': path.resolve(__dirname, 'src') } },
}, define: { 'process.env': {}, global: 'window' },
resolve: {
alias: {
'@': path.resolve(__dirname, 'src')
}
},
define: {
'process.env': {},
global: 'window'
},
optimizeDeps: { optimizeDeps: {
include: ['@vicons/fluent', '@vicons/ionicons5', 'vue', 'vue-router'] include: ['@vicons/fluent', '@vicons/ionicons5', 'vue', 'vue-router']
} },
build: { sourcemap: true }
}) })