Skip to content

Commit

Permalink
download fallback when js is disabled
Browse files Browse the repository at this point in the history
tarikcoskun committed Oct 11, 2024
1 parent ea06a6a commit 8e2d204
Showing 3 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions components/Button.module.scss
Original file line number Diff line number Diff line change
@@ -80,13 +80,13 @@ $colors: (
.button-group {
display: flex;

> :first-child {
> :first-child:not(:only-child) {
flex-grow: 1;
border-bottom-right-radius: 0;
border-top-right-radius: 0;
}

> :last-child {
> :last-child:not(:only-child) {
border-left: 1px solid rgb(0 0 0 / 0.075);
border-bottom-left-radius: 0;
border-top-left-radius: 0;
12 changes: 7 additions & 5 deletions components/DownloadButton.tsx
Original file line number Diff line number Diff line change
@@ -23,12 +23,14 @@ export function DownloadButton() {
return (
<Dropdown>
<Button.Group>
<Button as="a" href={os ? downloads[os].link : ""} color="surface" leading={OsIcon}>
Download for {os || "..."}
<Button as="a" href={os ? downloads[os].link : "https://github.com/TagStudioDev/TagStudio/releases/latest"} color="surface" leading={OsIcon}>
Download {os ? `for ${os}` : ""}
</Button>
<Dropdown.Trigger color="surface" padding="square" aria-label="Show more options">
<Icon lib="lucide" icon="chevron-down" size={16} />
</Dropdown.Trigger>
{os && (
<Dropdown.Trigger color="surface" padding="square" aria-label="Show more options">
<Icon lib="lucide" icon="chevron-down" size={16} />
</Dropdown.Trigger>
)}
</Button.Group>

<Dropdown.Menu>
2 changes: 1 addition & 1 deletion components/layout/NavbarDownloadButton.tsx
Original file line number Diff line number Diff line change
@@ -25,7 +25,7 @@ export function NavbarDownloadButton() {
return (
<Button
as="a"
href={os ? downloads[os].link : ""}
href={os ? downloads[os].link : "https://github.com/TagStudioDev/TagStudio/releases"}
color="surface"
className={cx("download-button")}
leading={OsIcon}

0 comments on commit 8e2d204

Please sign in to comment.