Skip to content

Commit

Permalink
feat: hostd config simple
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Oct 13, 2023
1 parent 21972d7 commit 8686112
Show file tree
Hide file tree
Showing 16 changed files with 774 additions and 585 deletions.
5 changes: 5 additions & 0 deletions .changeset/chatty-jobs-knock.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hostd': minor
---

The configuration now has an advanced mode that allows the user to view and change all settings.
5 changes: 5 additions & 0 deletions .changeset/honest-hotels-relate.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hostd': minor
---

The configuration page now shows the changed status on fields if the user has made a change but the server values were since updated.
5 changes: 5 additions & 0 deletions .changeset/seven-eagles-pull.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'hostd': minor
---

The configuration is now much simpler by default, only requiring the user to set essential settings.
22 changes: 22 additions & 0 deletions apps/hostd/components/Config/ConfigNav.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Text, Switch, Tooltip } from '@siafoundation/design-system'
import { useConfig } from '../../contexts/config'

export function ConfigNav() {
const { showAdvanced, setShowAdvanced } = useConfig()

return (
<div className="pl-1">
<Tooltip content={showAdvanced ? 'Hide advanced' : 'Show advanced'}>
<div className="flex gap-1 items-center">
<Switch
checked={showAdvanced}
onCheckedChange={(checked) => setShowAdvanced(checked)}
/>
<Text size="12" color="subtle">
Advanced
</Text>
</div>
</Tooltip>
</div>
)
}
Loading

0 comments on commit 8686112

Please sign in to comment.