mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
feat: 新增消息队列设置功能,优化自动操作体验
- 在 ClientAutoAction.vue 中新增消息队列设置标签页,允许用户配置弹幕和私信发送间隔。 - 更新多个组件以支持新的设置选项,提升用户交互体验。 - 在 useBiliFunction 中实现队列处理逻辑,确保消息按设定间隔发送。 - 优化 CheckInSettings 组件,整合 AutoActionEditor 以简化配置管理。
This commit is contained in:
@@ -6,6 +6,14 @@ const props = defineProps({
|
||||
action: {
|
||||
type: Object as () => AutoActionItem,
|
||||
required: true
|
||||
},
|
||||
hideName: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
hideEnabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
});
|
||||
|
||||
@@ -44,6 +52,7 @@ const priorityOptions = [
|
||||
class="basic-settings"
|
||||
>
|
||||
<NSpace
|
||||
v-if="!hideName"
|
||||
key="name"
|
||||
align="center"
|
||||
justify="space-between"
|
||||
@@ -58,6 +67,7 @@ const priorityOptions = [
|
||||
</NSpace>
|
||||
|
||||
<NSpace
|
||||
v-if="!hideEnabled"
|
||||
key="enabled"
|
||||
align="center"
|
||||
justify="space-between"
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
style="width: 100%"
|
||||
/>
|
||||
<template #feedback>
|
||||
每个用户在指定秒数内只能签到一次。
|
||||
每个用户在指定秒数内签到命令只会响应一次
|
||||
</template>
|
||||
</NFormItem>
|
||||
|
||||
@@ -90,15 +90,16 @@
|
||||
</NAlert>
|
||||
</div>
|
||||
|
||||
<TemplateEditor
|
||||
v-model:template="config.successAction"
|
||||
title="签到成功回复模板"
|
||||
:custom-test-context="checkInTestContext"
|
||||
<!-- 使用 AutoActionEditor 编辑 action 配置 -->
|
||||
<AutoActionEditor
|
||||
:action="config.successAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
/>
|
||||
<TemplateEditor
|
||||
v-model:template="config.cooldownAction"
|
||||
title="冷却中回复模板"
|
||||
:custom-test-context="checkInTestContext"
|
||||
<AutoActionEditor
|
||||
:action="config.cooldownAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
/>
|
||||
|
||||
<NDivider title-placement="left">
|
||||
@@ -133,11 +134,11 @@
|
||||
<template #feedback>
|
||||
成功触发早鸟签到的用户额外获得的积分。
|
||||
</template>
|
||||
</NFormItem> <TemplateEditor
|
||||
v-model:template="config.earlyBird.successAction"
|
||||
title="早鸟成功回复模板"
|
||||
description="用户成功触发早鸟奖励时发送的回复消息,可用变量: {{user.name}}, {{checkin.bonusPoints}}, {{checkin.totalPoints}}, {{checkin.userPoints}}"
|
||||
:custom-test-context="checkInTestContext"
|
||||
</NFormItem>
|
||||
<AutoActionEditor
|
||||
:action="config.earlyBird.successAction"
|
||||
:hide-name="true"
|
||||
:hide-enabled="true"
|
||||
/>
|
||||
</template>
|
||||
</template>
|
||||
@@ -248,6 +249,7 @@ import { EventModel, EventDataTypes } from '@/api/api-models';
|
||||
import { Info24Filled } from '@vicons/fluent';
|
||||
import { computed, h, ref } from 'vue';
|
||||
import type { UserCheckInData } from '@/client/store/autoAction/modules/checkin';
|
||||
import AutoActionEditor from '../AutoActionEditor.vue';
|
||||
|
||||
const autoActionStore = useAutoAction();
|
||||
const config = autoActionStore.checkInModule.checkInConfig;
|
||||
|
||||
Reference in New Issue
Block a user