mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-06 18:36:55 +08:00
feat: add streaming-only options for daily first gift and check-in points
This commit is contained in:
@@ -252,6 +252,10 @@ export interface Setting_Point {
|
||||
dailyFirstGiftPoints: number // 每日首次礼物积分(固定积分)
|
||||
useDailyFirstGiftPercent: boolean // 是否使用礼物价值比例计算
|
||||
dailyFirstGiftPercent: number // 每日首次礼物价值比例
|
||||
|
||||
// 仅开播时生效设置
|
||||
dailyFirstOnlyOnStreaming: boolean
|
||||
checkInOnlyOnStreaming: boolean
|
||||
}
|
||||
export interface Setting_QuestionDisplay {
|
||||
font?: string // Optional string, with a maximum length of 30 characters
|
||||
|
||||
@@ -65,6 +65,8 @@ const defaultPointSetting: Setting_Point = {
|
||||
dailyFirstGiftPoints: 10,
|
||||
useDailyFirstGiftPercent: false,
|
||||
dailyFirstGiftPercent: 0.1,
|
||||
dailyFirstOnlyOnStreaming: false,
|
||||
checkInOnlyOnStreaming: false,
|
||||
}
|
||||
const serverSetting = computed<Setting_Point>(() => {
|
||||
return (accountInfo.value?.settings?.point ?? defaultPointSetting)
|
||||
|
||||
@@ -58,6 +58,8 @@ const defaultSettingPoint: Setting_Point = {
|
||||
dailyFirstGiftPoints: 10,
|
||||
useDailyFirstGiftPercent: false,
|
||||
dailyFirstGiftPercent: 0.1,
|
||||
dailyFirstOnlyOnStreaming: false,
|
||||
checkInOnlyOnStreaming: false,
|
||||
}
|
||||
|
||||
// 响应式设置对象
|
||||
@@ -301,8 +303,17 @@ async function SaveComboSetting() {
|
||||
礼物
|
||||
</NCheckbox>
|
||||
</NCheckboxGroup>
|
||||
|
||||
</NFlex>
|
||||
|
||||
<NCheckbox
|
||||
v-model:checked="setting.checkInOnlyOnStreaming"
|
||||
:disabled="!canEdit"
|
||||
@update:checked="updateSettings"
|
||||
>
|
||||
仅开播时允许签到
|
||||
</NCheckbox>
|
||||
|
||||
<!-- 舰长设置区域 -->
|
||||
<template v-if="setting.allowType.includes(EventDataTypes.Guard)">
|
||||
<NDivider>上舰设置</NDivider>
|
||||
@@ -536,6 +547,19 @@ async function SaveComboSetting() {
|
||||
</NButton>
|
||||
</NInputGroup>
|
||||
</template>
|
||||
|
||||
<NFlex
|
||||
align="center"
|
||||
:gap="12"
|
||||
>
|
||||
<NCheckbox
|
||||
v-model:checked="setting.dailyFirstOnlyOnStreaming"
|
||||
:disabled="!canEdit"
|
||||
@update:checked="updateSettings"
|
||||
>
|
||||
仅开播时生效
|
||||
</NCheckbox>
|
||||
</NFlex>
|
||||
</NFlex>
|
||||
|
||||
<!-- 礼物设置区域 -->
|
||||
@@ -779,6 +803,7 @@ async function SaveComboSetting() {
|
||||
</NModal>
|
||||
</template>
|
||||
</NFlex>
|
||||
<NDivider />
|
||||
</NSpin>
|
||||
</template>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user