Skip to content

Commit

Permalink
Address feedback from go-gitea#22517 (go-gitea#22563)
Browse files Browse the repository at this point in the history
- use octicons for icon
- use fomantic for centering the link
  • Loading branch information
fsiddi authored Jan 22, 2023
1 parent eb793c3 commit 920ae23
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions web_src/js/features/common-global.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -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})`;
Expand Down

0 comments on commit 920ae23

Please sign in to comment.