upgrade to tauri 2.2.0

This commit is contained in:
2025-01-04 07:51:23 -05:00
parent 2080fb897b
commit ac62171467
18 changed files with 2489 additions and 3347 deletions
+7 -8
View File
@@ -1,7 +1,7 @@
<script>
// import { listen } from '@tauri-apps/api/event';
import { open } from '@tauri-apps/plugin-dialog';
import { sep } from '@tauri-apps/api/path';
import { basename } from '@tauri-apps/api/path';
import { createEventDispatcher } from 'svelte';
import Icon from './Icon.svelte';
@@ -14,17 +14,16 @@
const dispatch = createEventDispatcher();
async function chooseFile() {
let file = await open(params);
if (file) {
value = file;
displayValue = file.name;
let path = await open(params);
if (path) {
displayValue = await basename(path);
value = {name: displayValue, path};
dispatch('update', value);
}
}
function handleInput(evt) {
const segments = evt.target.value.split(sep());
const name = segments[segments.length - 1];
async function handleInput(evt) {
const name = await basename(evt.target.value);
value = {name, path: evt.target.value};
}