fix: permission requesting
This commit is contained in:
+2
-2
@@ -226,7 +226,7 @@ async function handlePrimaryButtonClick() {
|
||||
let chain = filehandle.getFile().then(f => Promise.all([f, f.arrayBuffer()]));
|
||||
let [file, buffer] = await chain.catch(e => alert('(ERROR) ' + new String(e ?? 'Failed to load file')));
|
||||
|
||||
save = await handle.requestPermission({ mode: 'readwrite' }) === 'granted';
|
||||
save = (await filehandle.requestPermission({ mode: 'readwrite' })) === 'granted';
|
||||
major = await Rpc2.invoke('loads', { params: [file.name, new Uint8Array(buffer).toBase64()] });
|
||||
$.get('#fileLabel').innerText = file.name;
|
||||
$.get('#fromLabel').innerText = parameters.account;
|
||||
@@ -278,7 +278,7 @@ $.set('#send', 'click', async () => {
|
||||
$('#send').classList.remove('pulse');
|
||||
$('#send').disabled = true;
|
||||
busy = true;
|
||||
busy = await handlePrimaryButtonClick().then(() => false, () => false);
|
||||
busy = await handlePrimaryButtonClick().then(() => false, e => console.error(e));
|
||||
});
|
||||
|
||||
$.set('#cancel', 'click', async () => {
|
||||
|
||||
Reference in New Issue
Block a user