Skip to content

Commit

Permalink
feat: renterd alert hints
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfreska committed Oct 27, 2023
1 parent ea3d2f4 commit 2674b7c
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 7 deletions.
5 changes: 5 additions & 0 deletions .changeset/dull-plants-fail.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'renterd': minor
---

Alerts are now more concise and show an actionable hint when available.
20 changes: 19 additions & 1 deletion apps/renterd/dialogs/AlertsDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,10 +89,11 @@ export function AlertsDialog({ open, onOpenChange }: Props) {
}

const dataFieldOrder = [
'hint',
'origin',
'hostKey',
'contractID',
'account',
'accountID',
'slabKey',
'additions',
'removals',
Expand Down Expand Up @@ -273,6 +274,23 @@ const dataFields: Record<
)
},
},
hint: {
render: ({ value }: { value: string }) => (
<div className="flex flex-col w-full gap-2">
<Text color="contrast">{value}</Text>
</div>
),
},
allowance: {
render: ({ value }: { value: string }) => (
<div className="flex justify-between w-full gap-2">
<Text color="subtle" ellipsis>
allowance
</Text>
<ValueSc variant="value" value={new BigNumber(value)} />
</div>
),
},
balance: {
render: ({ value }: { value: string }) => (
<div className="flex justify-between w-full gap-2">
Expand Down
7 changes: 1 addition & 6 deletions apps/website/components/DownloadSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,7 @@ export function DownloadSelect({ daemon, release, testnetOnly }: Props) {
const [download, setDownload] = useState(downloadLinks[0])

return (
<div
className="flex"
style={{
containerType: 'normal',
}}
>
<div className="flex">
<ControlGroup>
<Button state="waiting" className="hidden @sm:flex">
{release.tag_name}
Expand Down

0 comments on commit 2674b7c

Please sign in to comment.