mirror of
https://github.com/garraflavatra/rolens.git
synced 2025-07-19 14:14:05 +00:00
20 lines
380 B
Svelte
20 lines
380 B
Svelte
|
<script>
|
||
|
import { OpenDirectory } from '../../wailsjs/go/app/App';
|
||
|
|
||
|
export let value = '';
|
||
|
export let id = '';
|
||
|
export let title = 'Choose a directory';
|
||
|
|
||
|
async function selectDir() {
|
||
|
value = await OpenDirectory(title) || value;
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<input type="text" on:pointerdown={selectDir} readonly {id} {value} />
|
||
|
|
||
|
<style>
|
||
|
input {
|
||
|
cursor: pointer;
|
||
|
}
|
||
|
</style>
|