forked from oliverschwendener/ueli
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ShowOnStartup): bug that prevented window.showOnStartup option to…
… work properly
- Loading branch information
1 parent
b2ce496
commit 1d08a3a
Showing
4 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { useSetting } from "@Core/Hooks"; | ||
import { Field, Switch } from "@fluentui/react-components"; | ||
import { useTranslation } from "react-i18next"; | ||
|
||
export const ShowOnStartup = () => { | ||
const { t } = useTranslation(); | ||
|
||
const { value, updateValue } = useSetting({ key: "window.showOnStartup", defaultValue: true }); | ||
|
||
return ( | ||
<Field label={t("showOnStartup", { ns: "settingsWindow" })}> | ||
<Switch checked={value} onChange={(_, { checked }) => updateValue(checked)} /> | ||
</Field> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters