mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: 更新组件和配置,增强功能和用户体验, 添加签到功能
- 在 .editorconfig 中调整文件格式设置,统一代码风格。 - 在 default.d.ts 中为 naive-ui 添加 TabPaneSlots 接口声明,增强类型支持。 - 在多个组件中优化了模板和样式,提升用户交互体验。 - 在 ClientAutoAction.vue 中新增签到设置标签页,丰富功能选项。 - 在 Utils.ts 中增强 GUID 处理逻辑,增加输入验证和错误处理。 - 更新多个组件的逻辑,简化代码结构,提升可读性和维护性。
This commit is contained in:
@@ -65,7 +65,7 @@ export async function initAll(isOnBoot: boolean) {
|
||||
initInfo();
|
||||
info('[init] 开始更新数据');
|
||||
|
||||
if (isLoggedIn && accountInfo.value.isBiliVerified && !setting.settings.dev_disableDanmakuClient) {
|
||||
if (isLoggedIn.value && accountInfo.value.isBiliVerified && !setting.settings.dev_disableDanmakuClient) {
|
||||
const danmakuInitNoticeRef = window.$notification.info({
|
||||
title: '正在初始化弹幕客户端...',
|
||||
closable: false
|
||||
@@ -196,9 +196,11 @@ export async function initDanmakuClient() {
|
||||
const biliCookie = useBiliCookie();
|
||||
const settings = useSettings();
|
||||
if (isInitedDanmakuClient.value || isInitingDanmakuClient.value) {
|
||||
info('弹幕客户端已初始化, 跳过初始化');
|
||||
return { success: true, message: '' };
|
||||
}
|
||||
isInitingDanmakuClient.value = true;
|
||||
console.log(settings.settings);
|
||||
let result = { success: false, message: '' };
|
||||
try {
|
||||
if (isLoggedIn) {
|
||||
@@ -231,6 +233,9 @@ export async function initDanmakuClient() {
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
info('未登录, 跳过弹幕客户端初始化');
|
||||
result = { success: true, message: '' };
|
||||
}
|
||||
return result;
|
||||
} catch (err) {
|
||||
@@ -265,6 +270,7 @@ export async function callStartDanmakuClient() {
|
||||
const settings = useSettings();
|
||||
const webFetcher = useWebFetcher();
|
||||
if (settings.settings.useDanmakuClientType === 'direct') {
|
||||
info('开始初始化弹幕客户端 [direct]');
|
||||
const key = await getRoomKey(
|
||||
accountInfo.value.biliRoomId!, await biliCookie.getBiliCookie() || '');
|
||||
if (!key) {
|
||||
@@ -283,6 +289,7 @@ export async function callStartDanmakuClient() {
|
||||
tokenUserId: biliCookie.uId!,
|
||||
}, true);
|
||||
} else {
|
||||
info('开始初始化弹幕客户端 [openlive]');
|
||||
return await webFetcher.Start('openlive', undefined, true);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user