Skip to content

Commit

Permalink
Merge pull request #146 from alley-rs/dev
Browse files Browse the repository at this point in the history
feat: 改进设置组件布局
  • Loading branch information
thep0y authored Dec 27, 2024
2 parents 9f9a056 + 8b33571 commit a23bce6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/components/settings/DarkMode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const DarkMode = (props: DarkModeProps) => {
)),
);
return (
<LazySpace gap={16}>
<LazySpace gap={16} justify="between">
<LazyLabel>暗色模式</LazyLabel>

<LazySpace gap={8}>{items()}</LazySpace>
Expand Down
11 changes: 9 additions & 2 deletions src/components/settings/Transparent.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AiOutlineCheck, AiOutlineClose } from "solid-icons/ai";
import { LazyLabel, LazySpace, LazySwitch } from "~/lazy";

interface TransparentProps {
Expand All @@ -7,10 +8,16 @@ interface TransparentProps {

const Transparent = (props: TransparentProps) => {
return (
<LazySpace gap={16}>
<LazySpace gap={16} justify="between">
<LazyLabel>窗口透明</LazyLabel>

<LazySwitch checked={props.enabled} setChecked={props.onSwitch} />
<LazySwitch
checked={props.enabled}
setChecked={props.onSwitch}
size="small"
checkedChild={<AiOutlineCheck />}
uncheckedChild={<AiOutlineClose />}
/>
</LazySpace>
);
};
Expand Down
4 changes: 2 additions & 2 deletions src/components/settings/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const Settings = () => {
onClose={() => { }}
maskClosable={false}
>
<LazyFlex direction="vertical" gap={8} style={{ "min-width": "400px" }}>
<LazyFlex direction="vertical" gap={16} style={{ "min-width": "400px" }}>
<Transparent
enabled={!!lsarConfig()?.transparent}
onSwitch={async (enabled) => {
Expand Down Expand Up @@ -124,7 +124,7 @@ const Settings = () => {
}
/>

<LazySpace>
<LazySpace justify="between">
<LazyLabel>播放器绝对路径</LazyLabel>

<Show when={lsarConfig()?.player.path}>
Expand Down

0 comments on commit a23bce6

Please sign in to comment.