guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#72281] [PATCH] Guix Packager: add copy feature for fetch command


From: Jakob Kirsch
Subject: [bug#72281] [PATCH] Guix Packager: add copy feature for fetch command
Date: Thu, 25 Jul 2024 00:26:23 +0200

---
 src/components/inputs/SourceInput.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/components/inputs/SourceInput.tsx 
b/src/components/inputs/SourceInput.tsx
index aa1b714..2f67425 100644
--- a/src/components/inputs/SourceInput.tsx
+++ b/src/components/inputs/SourceInput.tsx
@@ -136,9 +136,12 @@ function HashHelp({ method, url, version }: {
   method: Method, url: UrlType, version: string
 }) {
   return (
-    <div>
+    <div
+      onClick={() => {
+        navigator.clipboard.writeText(getFetchHelp(method, url, version))
+      }}>
       <Typography variant="body2">
-        You may compute the sha256 by running the following command(s):
+        You may compute the sha256 by running the following command(s) (click 
to copy):
       </Typography>
       <SyntaxHighlighter
         text={getFetchHelp(method, url, version)}
--
2.45.2






reply via email to

[Prev in Thread] Current Thread [Next in Thread]