mirror of
https://github.com/go-gitea/gitea
synced 2024-12-22 16:44:26 +00:00
- use octicons for icon - use fomantic for centering the link
This commit is contained in:
parent
eb793c3361
commit
920ae2367f
@ -7,6 +7,7 @@ import {showGlobalErrorMessage} from '../bootstrap.js';
|
|||||||
import {attachDropdownAria} from './aria.js';
|
import {attachDropdownAria} from './aria.js';
|
||||||
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
|
import {handleGlobalEnterQuickSubmit} from './comp/QuickSubmit.js';
|
||||||
import {initTooltip} from '../modules/tippy.js';
|
import {initTooltip} from '../modules/tippy.js';
|
||||||
|
import {svg} from '../svg.js';
|
||||||
|
|
||||||
const {appUrl, csrfToken} = window.config;
|
const {appUrl, csrfToken} = window.config;
|
||||||
|
|
||||||
@ -169,10 +170,10 @@ export function initGlobalDropzone() {
|
|||||||
$dropzone.find('.files').append(input);
|
$dropzone.find('.files').append(input);
|
||||||
// Create a "Copy Link" element, to conveniently copy the image
|
// Create a "Copy Link" element, to conveniently copy the image
|
||||||
// or file link as Markdown to the clipboard
|
// or file link as Markdown to the clipboard
|
||||||
const copyLinkElement = document.createElement('a');
|
const copyLinkElement = document.createElement('div');
|
||||||
copyLinkElement.className = 'dz-remove';
|
copyLinkElement.className = 'tc';
|
||||||
copyLinkElement.href = '#';
|
// The a element has a hardcoded cursor: pointer because the default is overridden by .dropzone
|
||||||
copyLinkElement.innerHTML = '<i class="fa fa-copy"></i> Copy link';
|
copyLinkElement.innerHTML = `<a href="#" style="cursor: pointer;">${svg('octicon-copy', 14, 'copy link')} Copy link</a>`;
|
||||||
copyLinkElement.addEventListener('click', (e) => {
|
copyLinkElement.addEventListener('click', (e) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
let fileMarkdown = `[${file.name}](/attachments/${file.uuid})`;
|
let fileMarkdown = `[${file.name}](/attachments/${file.uuid})`;
|
||||||
|
Loading…
Reference in New Issue
Block a user