mirror of
https://github.com/laurent22/joplin.git
synced 2024-11-27 08:21:03 +02:00
Desktop: Add button to copy note ID in Note Properties dialog (#4749)
This commit is contained in:
parent
4810c01aec
commit
c044017ba4
@ -8,6 +8,7 @@ const Note = require('@joplin/lib/models/Note').default;
|
||||
const formatcoords = require('formatcoords');
|
||||
const bridge = require('electron').remote.require('./bridge').default;
|
||||
const shim = require('@joplin/lib/shim').default;
|
||||
const { clipboard } = require('electron');
|
||||
|
||||
class NotePropertiesDialog extends React.Component {
|
||||
constructor() {
|
||||
@ -318,6 +319,12 @@ class NotePropertiesDialog extends React.Component {
|
||||
};
|
||||
editCompIcon = 'fa-edit';
|
||||
}
|
||||
|
||||
// Add the copy icon and the 'copy on click' event
|
||||
if (key === 'id') {
|
||||
editCompIcon = 'fa-copy';
|
||||
editCompHandler = () => clipboard.writeText(value);
|
||||
}
|
||||
}
|
||||
|
||||
if (editCompHandler) {
|
||||
|
Loading…
Reference in New Issue
Block a user