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

  • Done
  • quality assurance status badge
Details
3 participants
  • Jakob Kirsch
  • Ludovic Courtès
  • Philippe Virouleau
Owner
unassigned
Submitted by
Jakob Kirsch
Severity
normal

Debbugs page

Jakob Kirsch wrote 8 months ago
(address . guix-patches@gnu.org)(name . Jakob Kirsch)(address . jakob.kirsch@web.de)
20240724222709.6417-1-jakob.kirsch@web.de
---
src/components/inputs/SourceInput.tsx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (19 lines)
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
Ludovic Courtès wrote 7 months ago
(name . Jakob Kirsch)(address . jakob.kirsch@web.de)
87r0akvfl4.fsf@gnu.org
Hello,

(Cc: Philippe, the author of Guix Packager.)

Jakob Kirsch <jakob.kirsch@web.de> skribis:

Toggle quote (21 lines)
> ---
> 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):

I took the liberty to apply this patch and it’s now deployed:


Philippe, lemme know if anything needs to be tweaked. :-)

Thanks for your contribution!

Ludo’.
Closed
Philippe Virouleau wrote 7 months ago
(address . 72281-done@debbugs.gnu.org)
a7bcbaeb-be91-4075-b16b-db0ea24b53a6@inria.fr
Hi Ludo and Jakob,

Thanks a lot, that looks great to me :)

Regards,
Philippe

On 8/19/24 14:53, Ludovic Courtès wrote:
Toggle quote (36 lines)
> Hello,
>
> (Cc: Philippe, the author of Guix Packager.)
>
> Jakob Kirsch <jakob.kirsch@web.de> skribis:
>
>> ---
>> 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):
>
> I took the liberty to apply this patch and it’s now deployed:
>
> https://guix-hpc.gitlabpages.inria.fr/guix-packager/
>
> Philippe, lemme know if anything needs to be tweaked. :-)
>
> Thanks for your contribution!
>
> Ludo’.
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 72281@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72281
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help