feat: add streaming-only options for daily first gift and check-in points

This commit is contained in:
2025-10-16 02:08:44 +08:00
parent e81f09514f
commit dfc1a9d709
3 changed files with 31 additions and 0 deletions

View File

@@ -252,6 +252,10 @@ export interface Setting_Point {
dailyFirstGiftPoints: number // 每日首次礼物积分(固定积分) dailyFirstGiftPoints: number // 每日首次礼物积分(固定积分)
useDailyFirstGiftPercent: boolean // 是否使用礼物价值比例计算 useDailyFirstGiftPercent: boolean // 是否使用礼物价值比例计算
dailyFirstGiftPercent: number // 每日首次礼物价值比例 dailyFirstGiftPercent: number // 每日首次礼物价值比例
// 仅开播时生效设置
dailyFirstOnlyOnStreaming: boolean
checkInOnlyOnStreaming: boolean
} }
export interface Setting_QuestionDisplay { export interface Setting_QuestionDisplay {
font?: string // Optional string, with a maximum length of 30 characters font?: string // Optional string, with a maximum length of 30 characters

View File

@@ -65,6 +65,8 @@ const defaultPointSetting: Setting_Point = {
dailyFirstGiftPoints: 10, dailyFirstGiftPoints: 10,
useDailyFirstGiftPercent: false, useDailyFirstGiftPercent: false,
dailyFirstGiftPercent: 0.1, dailyFirstGiftPercent: 0.1,
dailyFirstOnlyOnStreaming: false,
checkInOnlyOnStreaming: false,
} }
const serverSetting = computed<Setting_Point>(() => { const serverSetting = computed<Setting_Point>(() => {
return (accountInfo.value?.settings?.point ?? defaultPointSetting) return (accountInfo.value?.settings?.point ?? defaultPointSetting)

View File

@@ -58,6 +58,8 @@ const defaultSettingPoint: Setting_Point = {
dailyFirstGiftPoints: 10, dailyFirstGiftPoints: 10,
useDailyFirstGiftPercent: false, useDailyFirstGiftPercent: false,
dailyFirstGiftPercent: 0.1, dailyFirstGiftPercent: 0.1,
dailyFirstOnlyOnStreaming: false,
checkInOnlyOnStreaming: false,
} }
// 响应式设置对象 // 响应式设置对象
@@ -301,7 +303,16 @@ async function SaveComboSetting() {
礼物 礼物
</NCheckbox> </NCheckbox>
</NCheckboxGroup> </NCheckboxGroup>
</NFlex> </NFlex>
<NCheckbox
v-model:checked="setting.checkInOnlyOnStreaming"
:disabled="!canEdit"
@update:checked="updateSettings"
>
仅开播时允许签到
</NCheckbox>
<!-- 舰长设置区域 --> <!-- 舰长设置区域 -->
<template v-if="setting.allowType.includes(EventDataTypes.Guard)"> <template v-if="setting.allowType.includes(EventDataTypes.Guard)">
@@ -536,6 +547,19 @@ async function SaveComboSetting() {
</NButton> </NButton>
</NInputGroup> </NInputGroup>
</template> </template>
<NFlex
align="center"
:gap="12"
>
<NCheckbox
v-model:checked="setting.dailyFirstOnlyOnStreaming"
:disabled="!canEdit"
@update:checked="updateSettings"
>
仅开播时生效
</NCheckbox>
</NFlex>
</NFlex> </NFlex>
<!-- 礼物设置区域 --> <!-- 礼物设置区域 -->
@@ -779,6 +803,7 @@ async function SaveComboSetting() {
</NModal> </NModal>
</template> </template>
</NFlex> </NFlex>
<NDivider />
</NSpin> </NSpin>
</template> </template>