Merge branch 'Yidadaa:main' into main

This commit is contained in:
money32wang
2023-07-03 09:42:49 +08:00
committed by GitHub
6 changed files with 48 additions and 11 deletions

View File

@@ -134,14 +134,19 @@ export function MaskConfig(props: {
type="checkbox"
checked={props.mask.syncGlobalConfig}
onChange={async (e) => {
const checked = e.currentTarget.checked;
if (
e.currentTarget.checked &&
checked &&
(await showConfirm(Locale.Mask.Config.Sync.Confirm))
) {
props.updateMask((mask) => {
mask.syncGlobalConfig = e.currentTarget.checked;
mask.syncGlobalConfig = checked;
mask.modelConfig = { ...globalConfig.modelConfig };
});
} else if (!checked) {
props.updateMask((mask) => {
mask.syncGlobalConfig = checked;
});
}
}}
></input>