improve metadata and style ux

This commit is contained in:
vcoppe
2024-07-02 10:21:04 +02:00
parent 8e446ec74a
commit 874eea271e
3 changed files with 14 additions and 2 deletions

View File

@@ -217,6 +217,7 @@
>
<Info size="16" class="mr-1" />
{$_('menu.metadata.button')}
<Shortcut key="I" ctrl={true} />
</Menubar.Item>
<Menubar.Item
disabled={$selection.size === 0 ||
@@ -525,6 +526,16 @@
selectAll();
e.preventDefault();
}
} else if (e.key === 'i' && (e.metaKey || e.ctrlKey)) {
if (
$selection.size === 1 &&
$selection
.getSelected()
.every((item) => item instanceof ListFileItem || item instanceof ListTrackItem)
) {
$editMetadata = true;
}
e.preventDefault();
} else if (e.key === 'p' && (e.metaKey || e.ctrlKey)) {
$elevationProfile = !$elevationProfile;
e.preventDefault();

View File

@@ -200,6 +200,7 @@
<ContextMenu.Item disabled={!singleSelection} on:click={() => ($editMetadata = true)}>
<Info size="16" class="mr-1" />
{$_('menu.metadata.button')}
<Shortcut key="I" ctrl={true} />
</ContextMenu.Item>
<ContextMenu.Item on:click={() => ($editStyle = true)}>
<PaintBucket size="16" class="mr-1" />

View File

@@ -58,13 +58,13 @@
"click": "Click",
"drag": "Drag",
"metadata": {
"button": "Edit info",
"button": "Info...",
"name": "Name",
"description": "Description",
"save": "Save"
},
"style": {
"button": "Change style",
"button": "Appearance...",
"color": "Color",
"opacity": "Opacity",
"weight": "Weight"