mirror of
https://github.com/schlagmichdoch/PairDrop.git
synced 2025-04-22 07:46:17 -04:00
add user notification if clipboard.readText() is undefined
This commit is contained in:
parent
62c02aaed3
commit
766b5d3dd7
1 changed files with 7 additions and 3 deletions
|
@ -996,9 +996,13 @@ class Base64ZipDialog extends Dialog {
|
||||||
super('base64ZipDialog');
|
super('base64ZipDialog');
|
||||||
const urlParams = new URL(window.location).searchParams;
|
const urlParams = new URL(window.location).searchParams;
|
||||||
const base64zip = urlParams.get('base64zip');
|
const base64zip = urlParams.get('base64zip');
|
||||||
this.$pasteBtn = this.$el.querySelector('#base64ZipPasteBtn')
|
if (!navigator.clipboard.readText) {
|
||||||
this.$pasteBtn.addEventListener('click', _ => this.processClipboard())
|
setTimeout(_ => Events.fire('notify-user', 'This feature is not available on your device.'), 500);
|
||||||
if (base64zip) this.show();
|
} else if (base64zip) {
|
||||||
|
this.$pasteBtn = this.$el.querySelector('#base64ZipPasteBtn')
|
||||||
|
this.$pasteBtn.addEventListener('click', _ => this.processClipboard())
|
||||||
|
this.show();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async processClipboard() {
|
async processClipboard() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue