Skip to content

Commit fddadfe

Browse files
Added button to hide settings panel
1 parent 0479810 commit fddadfe

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

src/renderer/Settings.tsx

+8
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,14 @@ export function Settings({ config }: Props): JSX.Element {
6464
>
6565
{texts.limit.title}
6666
</InputNumber>
67+
68+
<button
69+
className="btn btn-sm btn-primary mt-3"
70+
title={texts.hideSettings.desc}
71+
onClick={() => apiRenderer.command({ id: "hideSettings" })}
72+
>
73+
{texts.hideSettings.title}
74+
</button>
6775
</main>
6876
);
6977
}

src/renderer/texts.ts

+5
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ export const texts: Record<TextId, Text> = {
3030
title: "Settings",
3131
desc: "When enabled, show settings panel",
3232
},
33+
hideSettings: {
34+
title: "Hide settings",
35+
desc: "Hide settings panel",
36+
},
3337
limit: {
3438
title: "Limit",
3539
desc: "Maximum number of clipboard items to store",
@@ -50,6 +54,7 @@ type TextId =
5054
| "paused"
5155
| "autoStar"
5256
| "showSettings"
57+
| "hideSettings"
5358
| "limit";
5459

5560
interface Text {

0 commit comments

Comments
 (0)