Merge pull request #2121 from QuantumNous/feat/special_group

feat: add special user usable group setting
This commit is contained in:
Seefs
2025-10-29 18:54:51 +09:00
committed by GitHub
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);