mirror of
https://github.com/ente-io/ente.git
synced 2025-08-08 07:28:26 +00:00
Menu
This commit is contained in:
parent
1b83acb262
commit
3936954ee2
@ -934,15 +934,26 @@ const AdvancedSettings: React.FC<NestedSidebarDrawerVisibilityProps> = ({
|
||||
onRootClose,
|
||||
}) => {
|
||||
const { cfUploadProxyDisabled } = useSettingsSnapshot();
|
||||
const [isAutoLaunchEnabled, setIsAutoLaunchEnabled] = useState(false);
|
||||
|
||||
const electron = globalThis.electron;
|
||||
|
||||
useEffect(() => {
|
||||
void electron
|
||||
?.isAutoLaunchEnabled()
|
||||
.then((enabled) => setIsAutoLaunchEnabled(enabled));
|
||||
}, [electron]);
|
||||
|
||||
const handleRootClose = () => {
|
||||
onClose();
|
||||
onRootClose();
|
||||
};
|
||||
|
||||
const toggle = () =>
|
||||
const toggleProxy = () =>
|
||||
void updateCFProxyDisabledPreference(!cfUploadProxyDisabled);
|
||||
|
||||
const toggleAutoLaunch = () => void electron?.toggleAutoLaunch();
|
||||
|
||||
return (
|
||||
<NestedSidebarDrawer
|
||||
{...{ open, onClose }}
|
||||
@ -954,27 +965,28 @@ const AdvancedSettings: React.FC<NestedSidebarDrawerVisibilityProps> = ({
|
||||
onRootClose={handleRootClose}
|
||||
title={t("advanced")}
|
||||
/>
|
||||
|
||||
<Stack sx={{ px: "16px", py: "20px", gap: "24px" }}>
|
||||
<Stack >
|
||||
<Stack>
|
||||
<RowButtonGroup>
|
||||
<RowSwitch
|
||||
label={t("faster_upload")}
|
||||
checked={!cfUploadProxyDisabled}
|
||||
onClick={toggle}
|
||||
onClick={toggleProxy}
|
||||
/>
|
||||
</RowButtonGroup>
|
||||
<RowButtonGroupHint>
|
||||
{t("faster_upload_description")}
|
||||
</RowButtonGroupHint>
|
||||
</Stack>
|
||||
<RowButtonGroup>
|
||||
<RowSwitch
|
||||
label={t("open_ente_on_startup")}
|
||||
checked={!cfUploadProxyDisabled}
|
||||
onClick={toggle}
|
||||
/>
|
||||
</RowButtonGroup>
|
||||
{electron && (
|
||||
<RowButtonGroup>
|
||||
<RowSwitch
|
||||
label={t("open_ente_on_startup")}
|
||||
checked={isAutoLaunchEnabled}
|
||||
onClick={toggleAutoLaunch}
|
||||
/>
|
||||
</RowButtonGroup>
|
||||
)}
|
||||
</Stack>
|
||||
</Stack>
|
||||
</NestedSidebarDrawer>
|
||||
|
@ -604,6 +604,7 @@
|
||||
"reset": "Reset",
|
||||
"faster_upload": "Faster uploads",
|
||||
"faster_upload_description": "Route uploads through nearby servers",
|
||||
"open_ente_on_startup": "Open Ente on startup",
|
||||
"cast_album_to_tv": "Play album on TV",
|
||||
"enter_cast_pin_code": "Enter the code you see on the TV below to pair this device.",
|
||||
"code": "Code",
|
||||
|
Loading…
x
Reference in New Issue
Block a user