diff options
| author | Patrick | 2025-12-30 20:15:22 +0100 |
|---|---|---|
| committer | Patrick | 2025-12-30 20:15:22 +0100 |
| commit | 57acc37af734aa7505457c4f6549a8bb1bd00169 (patch) | |
| tree | c64b96afaf7b3e236781910e7c7c68a82a5068bf /ui-summary.c | |
| parent | dabc7e8ded98204a5157c4404510c8e84eeeacb3 (diff) | |
| download | ps-cgit-57acc37af734aa7505457c4f6549a8bb1bd00169.tar.gz ps-cgit-57acc37af734aa7505457c4f6549a8bb1bd00169.zip | |
replace clone urls with input and button
Diffstat (limited to 'ui-summary.c')
| -rw-r--r-- | ui-summary.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/ui-summary.c b/ui-summary.c index 7a11cb1..c990bfd 100644 --- a/ui-summary.c +++ b/ui-summary.c @@ -31,13 +31,14 @@ static void print_url(const char *url) htmlf("<tr class='nohover'><th class='left' colspan='%d'>Clone</th></tr>\n", columns); } - htmlf("<tr><td colspan='%d'><a rel='vcs-git' href='", columns); + htmlf("<tr><td colspan='%d'><input type='text' readonly value='", columns); html_url_path(url); - html("' title='"); - html_attr(ctx.repo->name); - html(" Git repository'>"); + html("' />"); + html("<button onclick=\"navigator.clipboard.writeText('"); html_txt(url); - html("</a></td></tr>\n"); + html("');\">"); + html("<svg aria-hidden=\"true\" focusable=\"false\" viewBox=\"0 0 16 16\" width=\"16\" height=\"16\" fill=\"currentColor\" display=\"inline-block\" overflow=\"visible\" style=\"vertical-align: text-bottom;\"><path d=\"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z\"></path><path d=\"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z\"></path></svg>"); + html("</button></td></tr>\n"); } void cgit_print_summary(void) |
