diff --git a/src/components/Viewer.vue b/src/components/Viewer.vue index bbd1e96f..facb1144 100644 --- a/src/components/Viewer.vue +++ b/src/components/Viewer.vue @@ -2,7 +2,7 @@
- + + + {{ t("memories", "Download") }} + +
@@ -46,6 +56,7 @@ import "photoswipe/style.css"; import DeleteIcon from "vue-material-design-icons/Delete.vue"; import StarIcon from "vue-material-design-icons/Star.vue"; import StarOutlineIcon from "vue-material-design-icons/StarOutline.vue"; +import DownloadIcon from "vue-material-design-icons/Download.vue"; @Component({ components: { @@ -54,6 +65,7 @@ import StarOutlineIcon from "vue-material-design-icons/StarOutline.vue"; DeleteIcon, StarIcon, StarOutlineIcon, + DownloadIcon, }, }) export default class Viewer extends Mixins(GlobalMixin) { @@ -372,6 +384,13 @@ export default class Viewer extends Mixins(GlobalMixin) { photo.flag &= ~this.c.FLAG_IS_FAVORITE; } } + + /** Download the current photo */ + private async downloadCurrent() { + const photo = this.getCurrentPhoto(); + if (!photo) return; + dav.downloadFilesByIds([photo]); + } }