aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
diff options
context:
space:
mode:
authorFrancesco Siddi <francesco.siddi@gmail.com>2023-01-22 05:14:43 +0100
committerGitHub <noreply@github.com>2023-01-21 22:14:43 -0600
commit920ae2367fdb5350778a0f91889acc35fe67b6ba (patch)
tree4485e3b6c76f3a0cc14b691209f10b8a0eeb8200 /web_src
parenteb793c3361ec86fe8f0344e262073be3791e313d (diff)
downloadgitea-920ae2367fdb5350778a0f91889acc35fe67b6ba.tar.gz
gitea-920ae2367fdb5350778a0f91889acc35fe67b6ba.zip
Address feedback from #22517 (#22563)
- use octicons for icon - use fomantic for centering the link
Diffstat (limited to 'web_src')
-rw-r--r--web_src/js/features/common-global.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/web_src/js/features/common-global.js b/web_src/js/features/common-global.js
index ab45267b84..442a83980c 100644
--- a/web_src/js/features/common-global.js
+++ b/web_src/js/features/common-global.js
@@ -7,6 +7,7 @@ import {showGlobalErrorMessage} from '../bootstrap.js';
import {attachDropdownAria} from './aria.js';
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
import {initTooltip} from '../modules/tippy.js';
+import {svg} from '../svg.js';
const {appUrl, csrfToken} = window.config;
@@ -169,10 +170,10 @@ export function initGlobalDropzone() {
$dropzone.find('.files').append(input);
// Create a "Copy Link" element, to conveniently copy the image
// or file link as Markdown to the clipboard
- const copyLinkElement = document.createElement('a');
- copyLinkElement.className = 'dz-remove';
- copyLinkElement.href = '#';
- copyLinkElement.innerHTML = '<i class="fa fa-copy"></i> Copy link';
+ const copyLinkElement = document.createElement('div');
+ copyLinkElement.className = 'tc';
+ // The a element has a hardcoded cursor: pointer because the default is overridden by .dropzone
+ copyLinkElement.innerHTML = `<a href="#" style="cursor: pointer;">${svg('octicon-copy', 14, 'copy link')} Copy link</a>`;
copyLinkElement.addEventListener('click', (e) => {
e.preventDefault();
let fileMarkdown = `[${file.name}](/attachments/${file.uuid})`;