From 12eb302bcc93405f81b676b1a29a9731a5fec9be Mon Sep 17 00:00:00 2001
From: pacien
Date: Sun, 30 Oct 2022 17:40:33 +0100
Subject: viewer/command: add item download button

This adds a download button which allows the user to save the current
item as a file.

This is necessary because some item viewers do not expose a download
option on their own.

The download icon appears together with the other command buttons at the
top-left corner of the screen, replacing the listing sorting menu which
is only relevant for item lists (directory and search views).

GitHub: closes #308
---
 viewer/src/views/layout/top/LayoutTop.vue | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'viewer/src/views/layout/top/LayoutTop.vue')

diff --git a/viewer/src/views/layout/top/LayoutTop.vue b/viewer/src/views/layout/top/LayoutTop.vue
index b755c42..0362840 100644
--- a/viewer/src/views/layout/top/LayoutTop.vue
+++ b/viewer/src/views/layout/top/LayoutTop.vue
@@ -19,7 +19,10 @@
 
 <template>
   <div class="flex">
-    <LayoutCommand :current-item-path="galleryStore.currentItemPath" />
+    <LayoutCommand
+      :current-item-path="galleryStore.currentItemPath"
+      :item="galleryStore.currentItem"
+    />
     <LayoutBreadcrumb
       :current-item-path="galleryStore.currentItemPath"
       :search-mode="uiStore.searchMode"
-- 
cgit v1.2.3

