fix permissions errors and terminal launching
This commit is contained in:
@ -7,6 +7,13 @@
|
||||
export let value;
|
||||
|
||||
const dispatch = createEventDispatcher();
|
||||
|
||||
async function pickFile() {
|
||||
let file = await open();
|
||||
if (file) {
|
||||
value = file.path
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -18,9 +25,10 @@
|
||||
bind:value
|
||||
on:change={() => dispatch('update', {value})}
|
||||
>
|
||||
<button
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-sm btn-primary"
|
||||
on:click={async () => value = await open()}
|
||||
on:click={pickFile}
|
||||
>Browse</button>
|
||||
</div>
|
||||
<slot name="description" slot="description"></slot>
|
||||
|
Reference in New Issue
Block a user