mirror of
https://github.com/gpxstudio/gpx.studio.git
synced 2026-10-19 17:22:12 +00:00
clarify filename
This commit is contained in:
1 parent
11709316d2
commit
adbf89e318
16 files changed
+573
-61
No files matched your search
@@ -9,6 +9,8 @@
|
||||
import { editMetadata } from '$lib/components/file-list/metadata/utils.svelte';
|
||||
import { engine, type FileState } from '$lib/engine';
|
||||
import type { FileTreeNode } from '$lib/engine/selection-helpers';
|
||||
import { toast } from 'svelte-sonner';
|
||||
import { get } from 'svelte/store';
|
||||
|
||||
let {
|
||||
fileState,
|
||||
@@ -53,8 +55,15 @@
|
||||
// would open the dialog again before the effect below has reset it
|
||||
editMetadata.current = false;
|
||||
open = false;
|
||||
// the metadata of the selected elements are changed
|
||||
engine.metadata(name, description);
|
||||
// the metadata of the selected elements are changed. In the desktop app, a file on
|
||||
// the disk is renamed with it, which is refused if the name is the one of another
|
||||
engine.metadata(name, description).then((changed) => {
|
||||
const error = get(engine.lastError);
|
||||
if (!changed && error !== undefined && error !== 'nothing to do') {
|
||||
// a key of the dictionaries, when it comes from the desktop app
|
||||
toast.error(i18n._(error, error));
|
||||
}
|
||||
});
|
||||
}}
|
||||
>
|
||||
<Save size="16" />
|
||||
|
||||
Reference in new issue
Block a user