diff --git a/src/components/routes/vault/EntryList.tsx b/src/components/routes/vault/EntryList.tsx index 98c66ba..ce45264 100755 --- a/src/components/routes/vault/EntryList.tsx +++ b/src/components/routes/vault/EntryList.tsx @@ -84,7 +84,7 @@ export default class EntryList extends Component<{ vault: Promise }, { n } const deleteNote = async () => { - Notes.delete(note._id).then(() => { + this.vault.deleteNote(note._id).then(() => { Notifications.sendSuccess("Deleted") this.rawNotes = this.rawNotes.filter(e => e._id !== note._id); this.setState({ notes: this.state.notes.filter(e => e._id !== note._id) }); @@ -93,6 +93,18 @@ export default class EntryList extends Component<{ vault: Promise }, { n }) } + const copyNote = async () => { + this.vault.getNote(note._id).then(note => { + const el = document.createElement('textarea'); + el.value = note.__value; + document.body.appendChild(el); + el.select(); + document.execCommand('copy'); + document.body.removeChild(el); + Notifications.sendSuccess("Copied"); + }) + } + let share; if ((window.navigator as any).share) { share = + this.setState({ context });