feat: add special user usable group setting

This commit is contained in:
CaIon
2025-10-28 23:25:43 +08:00
parent a25c11df2a
commit 6aec088693
22 changed files with 521 additions and 142 deletions

View File

@@ -46,6 +46,7 @@ const RatioSetting = () => {
DefaultUseAutoGroup: false,
ExposeRatioEnabled: false,
UserUsableGroups: '',
'group_ratio_setting.group_special_usable_group': '',
});
const [loading, setLoading] = useState(false);
@@ -57,17 +58,7 @@ const RatioSetting = () => {
let newInputs = {};
data.forEach((item) => {
if (
item.key === 'ModelRatio' ||
item.key === 'GroupRatio' ||
item.key === 'GroupGroupRatio' ||
item.key === 'AutoGroups' ||
item.key === 'UserUsableGroups' ||
item.key === 'CompletionRatio' ||
item.key === 'ModelPrice' ||
item.key === 'CacheRatio' ||
item.key === 'ImageRatio' ||
item.key === 'AudioRatio' ||
item.key === 'AudioCompletionRatio'
item.value.startsWith('{') || item.value.startsWith('[')
) {
try {
item.value = JSON.stringify(JSON.parse(item.value), null, 2);