Compare commits
No commits in common. "32094f3a798ce2aee3235b5d662547de402261ec" and "ffe1dd6f9ffed6aaa161c2a35def8b614cd3b61d" have entirely different histories.
32094f3a79
...
ffe1dd6f9f
@ -65,7 +65,7 @@ export class Footer extends Component<{}, { synced: boolean, syncing: boolean }>
|
|||||||
Welcome <b>{Notes.name}</b>
|
Welcome <b>{Notes.name}</b>
|
||||||
</span>
|
</span>
|
||||||
<span style="color: lightgrey;">
|
<span style="color: lightgrey;">
|
||||||
v1.3
|
v1.2
|
||||||
</span>
|
</span>
|
||||||
</footer>
|
</footer>
|
||||||
}
|
}
|
||||||
|
@ -84,7 +84,7 @@ export default class EntryList extends Component<{ vault: Promise<IVault> }, { n
|
|||||||
}
|
}
|
||||||
|
|
||||||
const deleteNote = async () => {
|
const deleteNote = async () => {
|
||||||
this.vault.deleteNote(note._id).then(() => {
|
Notes.delete(note._id).then(() => {
|
||||||
Notifications.sendSuccess("Deleted")
|
Notifications.sendSuccess("Deleted")
|
||||||
this.rawNotes = this.rawNotes.filter(e => e._id !== note._id);
|
this.rawNotes = this.rawNotes.filter(e => e._id !== note._id);
|
||||||
this.setState({ notes: this.state.notes.filter(e => e._id !== note._id) });
|
this.setState({ notes: this.state.notes.filter(e => e._id !== note._id) });
|
||||||
@ -93,18 +93,6 @@ export default class EntryList extends Component<{ vault: Promise<IVault> }, { 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;
|
let share;
|
||||||
if ((window.navigator as any).share) {
|
if ((window.navigator as any).share) {
|
||||||
share = <button class="uk-button" onClick={shareNote}>
|
share = <button class="uk-button" onClick={shareNote}>
|
||||||
@ -115,7 +103,6 @@ export default class EntryList extends Component<{ vault: Promise<IVault> }, { n
|
|||||||
let context = <ContextMenu event={evt} >
|
let context = <ContextMenu event={evt} >
|
||||||
{share}
|
{share}
|
||||||
<button class="uk-button" onClick={deleteNote}>delete</button>
|
<button class="uk-button" onClick={deleteNote}>delete</button>
|
||||||
<button class="uk-button" onClick={copyNote}>copy</button>
|
|
||||||
</ContextMenu>
|
</ContextMenu>
|
||||||
|
|
||||||
this.setState({ context });
|
this.setState({ context });
|
||||||
|
Loading…
Reference in New Issue
Block a user