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 // 每日首次礼物积分(固定积分)
|
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
|
||||||
|
|||||||
@@ -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)
|
||||||
|
|||||||
@@ -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,8 +303,17 @@ 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)">
|
||||||
<NDivider>上舰设置</NDivider>
|
<NDivider>上舰设置</NDivider>
|
||||||
@@ -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>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user