From 0cdd2308e53dfde1a118411fe4bb7ae85754a275 Mon Sep 17 00:00:00 2001
From: Crystal-RainSlide <16851802+Crystal-RainSlide@users.noreply.github.com>
Date: Sat, 14 Feb 2026 13:28:55 +0800
Subject: [PATCH 1/2] fix: linkify the whole Download button
---
src/components/download/selection.jsx | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/src/components/download/selection.jsx b/src/components/download/selection.jsx
index b8992bc..2fbbda5 100644
--- a/src/components/download/selection.jsx
+++ b/src/components/download/selection.jsx
@@ -93,10 +93,10 @@ const DownloadSelection = () => {
Source Code
@@ -113,15 +113,16 @@ const DownloadSelection = () => {
)}
-
+
+
{
Copy to clipboard
{
navigator.clipboard.writeText(details.shasum);
document.getElementById(
@@ -142,7 +144,6 @@ const DownloadSelection = () => {
`${content.title}-${selectedDE}`
).innerHTML = "Copy to clipboard";
}}
- className="my-4 hover:scale-105 transition-all bg-site-100 p-1 rounded-[0.65em] text-white text-sm px-2 py-1 shadow-md"
>
sha256sum
From b2ada333e49e5efd94bf93a89d4935dedf650c36 Mon Sep 17 00:00:00 2001
From: Crystal-RainSlide <16851802+Crystal-RainSlide@users.noreply.github.com>
Date: Sat, 14 Feb 2026 13:33:25 +0800
Subject: [PATCH 2/2] fix: use state for copy tooltip
---
src/components/download/selection.jsx | 18 ++++++------------
1 file changed, 6 insertions(+), 12 deletions(-)
diff --git a/src/components/download/selection.jsx b/src/components/download/selection.jsx
index 2fbbda5..32b295a 100644
--- a/src/components/download/selection.jsx
+++ b/src/components/download/selection.jsx
@@ -17,6 +17,7 @@ const DEFAULT_DE = {
const DownloadSelection = () => {
const [selectedPlatform, setSelectedPlatform] = useState("generic");
const [selectedDEs, setSelectedDEs] = useState({});
+ const [tooltipText, setTooltipText] = useState("Copy to clipboard");
const contents = PLATFORM_MAP[selectedPlatform];
const handleDEChange = (index, de) => {
@@ -129,21 +130,14 @@ const DownloadSelection = () => {
className="tooltiptext"
id={`${content.title}-${selectedDE}`}
>
- Copy to clipboard
+ {tooltipText}
{
- navigator.clipboard.writeText(details.shasum);
- document.getElementById(
- `${content.title}-${selectedDE}`
- ).innerHTML = "Copied to clipboard!";
- }}
- onMouseOut={() => {
- document.getElementById(
- `${content.title}-${selectedDE}`
- ).innerHTML = "Copy to clipboard";
- }}
+ onClick={() => navigator.clipboard.writeText(details.shasum).then(
+ () => setTooltipText("Copied to clipboard!")
+ )}
+ onMouseOut={() => setTooltipText("Copy to clipboard")}
>
sha256sum