add Download mask settings
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import React from 'react'
|
||||
import { useRecoilState } from 'recoil'
|
||||
import { settingState } from '../../store/Atoms'
|
||||
import { Switch, SwitchThumb } from '../shared/Switch'
|
||||
import SettingBlock from './SettingBlock'
|
||||
|
||||
const DownloadMaskSettingBlock: React.FC = () => {
|
||||
const [setting, setSettingState] = useRecoilState(settingState)
|
||||
|
||||
const onCheckChange = (checked: boolean) => {
|
||||
setSettingState(old => {
|
||||
return { ...old, downloadMask: checked }
|
||||
})
|
||||
}
|
||||
|
||||
return (
|
||||
<SettingBlock
|
||||
title="Download Mask"
|
||||
desc="Download inpainting result and mask"
|
||||
input={
|
||||
<Switch checked={setting.downloadMask} onCheckedChange={onCheckChange}>
|
||||
<SwitchThumb />
|
||||
</Switch>
|
||||
}
|
||||
/>
|
||||
)
|
||||
}
|
||||
|
||||
export default DownloadMaskSettingBlock
|
||||
@@ -17,7 +17,7 @@ function SettingBlock(props: SettingBlockProps) {
|
||||
<div className="setting-block-content-title">
|
||||
<span>{title}</span>
|
||||
{desc && (
|
||||
<Tooltip content={<div style={{ width: 400 }}>{desc}</div>}>
|
||||
<Tooltip content={<div style={{ maxWidth: 400 }}>{desc}</div>}>
|
||||
<svg
|
||||
width="18"
|
||||
height="18"
|
||||
|
||||
@@ -7,6 +7,7 @@ import ManualRunInpaintingSettingBlock from './ManualRunInpaintingSettingBlock'
|
||||
import HDSettingBlock from './HDSettingBlock'
|
||||
import ModelSettingBlock from './ModelSettingBlock'
|
||||
import GraduallyInpaintingSettingBlock from './GraduallyInpaintingSettingBlock'
|
||||
import DownloadMaskSettingBlock from './DownloadMaskSettingBlock'
|
||||
|
||||
interface SettingModalProps {
|
||||
onClose: () => void
|
||||
@@ -31,6 +32,7 @@ export default function SettingModal(props: SettingModalProps) {
|
||||
>
|
||||
<ManualRunInpaintingSettingBlock />
|
||||
<GraduallyInpaintingSettingBlock />
|
||||
<DownloadMaskSettingBlock />
|
||||
<ModelSettingBlock />
|
||||
<HDSettingBlock />
|
||||
</Modal>
|
||||
|
||||
Reference in New Issue
Block a user