-
-
Notifications
You must be signed in to change notification settings - Fork 553
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #951 from szwabodev/checkUpdatesTweaks
feat: automatic check for updates
- Loading branch information
Showing
6 changed files
with
243 additions
and
56 deletions.
There are no files selected for viewing
27 changes: 27 additions & 0 deletions
27
apps/dokploy/components/dashboard/settings/web-server/toggle-auto-check-updates.tsx
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,27 @@ | ||
import { Label } from "@/components/ui/label"; | ||
import { Switch } from "@/components/ui/switch"; | ||
import { useState } from "react"; | ||
|
||
export const ToggleAutoCheckUpdates = () => { | ||
const [enabled, setEnabled] = useState<boolean>( | ||
localStorage.getItem("enableAutoCheckUpdates") === "true", | ||
); | ||
|
||
const handleToggle = (checked: boolean) => { | ||
setEnabled(checked); | ||
localStorage.setItem("enableAutoCheckUpdates", String(checked)); | ||
}; | ||
|
||
return ( | ||
<div className="flex items-center gap-4"> | ||
<Switch | ||
checked={enabled} | ||
onCheckedChange={handleToggle} | ||
id="autoCheckUpdatesToggle" | ||
/> | ||
<Label className="text-primary" htmlFor="autoCheckUpdatesToggle"> | ||
Automatically check for new updates | ||
</Label> | ||
</div> | ||
); | ||
}; |
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
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
Oops, something went wrong.