diff options
-rw-r--r-- | compiler/app/Main.hs | 3 | ||||
-rw-r--r-- | compiler/src/Input.hs | 6 | ||||
-rw-r--r-- | viewer/public/index.html | 2 | ||||
-rw-r--r-- | viewer/src/views/GalleryNavigation.vue | 6 |
4 files changed, 10 insertions, 7 deletions
diff --git a/compiler/app/Main.hs b/compiler/app/Main.hs index e71e0db..dc97b38 100644 --- a/compiler/app/Main.hs +++ b/compiler/app/Main.hs | |||
@@ -1,7 +1,7 @@ | |||
1 | -- ldgallery - A static generator which turns a collection of tagged | 1 | -- ldgallery - A static generator which turns a collection of tagged |
2 | -- pictures into a searchable web gallery. | 2 | -- pictures into a searchable web gallery. |
3 | -- | 3 | -- |
4 | -- Copyright (C) 2019-2020 Pacien TRAN-GIRARD | 4 | -- Copyright (C) 2019-2021 Pacien TRAN-GIRARD |
5 | -- | 5 | -- |
6 | -- This program is free software: you can redistribute it and/or modify | 6 | -- This program is free software: you can redistribute it and/or modify |
7 | -- it under the terms of the GNU Affero General Public License as | 7 | -- it under the terms of the GNU Affero General Public License as |
@@ -94,6 +94,7 @@ options = Options | |||
94 | } | 94 | } |
95 | 95 | ||
96 | &= summary ("ldgallery v" ++ showVersion version ++ " - a static web gallery generator with tags") | 96 | &= summary ("ldgallery v" ++ showVersion version ++ " - a static web gallery generator with tags") |
97 | &= details ["This software is distributed under the terms of the GNU Affero General Public License v3.0."] | ||
97 | &= program "ldgallery" | 98 | &= program "ldgallery" |
98 | &= help "Compile a gallery" | 99 | &= help "Compile a gallery" |
99 | &= helpArg [explicit, name "h", name "help"] | 100 | &= helpArg [explicit, name "h", name "help"] |
diff --git a/compiler/src/Input.hs b/compiler/src/Input.hs index 48931ec..4cfabe6 100644 --- a/compiler/src/Input.hs +++ b/compiler/src/Input.hs | |||
@@ -1,7 +1,7 @@ | |||
1 | -- ldgallery - A static generator which turns a collection of tagged | 1 | -- ldgallery - A static generator which turns a collection of tagged |
2 | -- pictures into a searchable web gallery. | 2 | -- pictures into a searchable web gallery. |
3 | -- | 3 | -- |
4 | -- Copyright (C) 2019-2020 Pacien TRAN-GIRARD | 4 | -- Copyright (C) 2019-2021 Pacien TRAN-GIRARD |
5 | -- | 5 | -- |
6 | -- This program is free software: you can redistribute it and/or modify | 6 | -- This program is free software: you can redistribute it and/or modify |
7 | -- it under the terms of the GNU Affero General Public License as | 7 | -- it under the terms of the GNU Affero General Public License as |
@@ -100,9 +100,7 @@ readSidecarFile filepath = | |||
100 | 100 | ||
101 | 101 | ||
102 | readInputTree :: AnchoredFSNode -> IO InputTree | 102 | readInputTree :: AnchoredFSNode -> IO InputTree |
103 | readInputTree (AnchoredFSNode _ File{}) = | 103 | readInputTree (AnchoredFSNode anchor root) = mkDirNode root |
104 | throw $ AssertionFailed "Input directory is a file" | ||
105 | readInputTree (AnchoredFSNode anchor root@Dir{}) = mkDirNode root | ||
106 | where | 104 | where |
107 | mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree) | 105 | mkInputNode :: Map.Map FileName FSNode -> FSNode -> IO (Maybe InputTree) |
108 | mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) = | 106 | mkInputNode dir file@File{path} | not (isSidecar file) && not (isThumbnail file) = |
diff --git a/viewer/public/index.html b/viewer/public/index.html index 4f2767c..c3ff247 100644 --- a/viewer/public/index.html +++ b/viewer/public/index.html | |||
@@ -25,7 +25,7 @@ | |||
25 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> | 25 | <meta http-equiv="X-UA-Compatible" content="IE=edge"> |
26 | <meta name="mobile-web-app-capable" content="yes"> | 26 | <meta name="mobile-web-app-capable" content="yes"> |
27 | <meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1.0"> | 27 | <meta name="viewport" content="user-scalable=no,width=device-width,initial-scale=1.0"> |
28 | <meta name="generator" content="ldgallery"> | 28 | <meta name="generator" content="ldgallery, software distributed under the terms of the GNU Affero General Public License v3.0"> |
29 | 29 | ||
30 | <link rel="manifest" href="manifest.json"> | 30 | <link rel="manifest" href="manifest.json"> |
31 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> | 31 | <link rel="icon" href="<%= BASE_URL %>favicon.ico"> |
diff --git a/viewer/src/views/GalleryNavigation.vue b/viewer/src/views/GalleryNavigation.vue index fd1f19a..69198f6 100644 --- a/viewer/src/views/GalleryNavigation.vue +++ b/viewer/src/views/GalleryNavigation.vue | |||
@@ -21,7 +21,7 @@ | |||
21 | <div> | 21 | <div> |
22 | <ld-error v-if="isError" icon="folder-open" :message="$t('gallery.unknown-resource')" /> | 22 | <ld-error v-if="isError" icon="folder-open" :message="$t('gallery.unknown-resource')" /> |
23 | <gallery-search v-else-if="isSearch" :path="path" /> | 23 | <gallery-search v-else-if="isSearch" :path="path" /> |
24 | <component :is="componentName" v-else :item="$galleryStore.currentItem" /> | 24 | <component :is="componentName" v-else :key="componentKey" :item="$galleryStore.currentItem" /> |
25 | </div> | 25 | </div> |
26 | </template> | 26 | </template> |
27 | 27 | ||
@@ -66,6 +66,10 @@ export default class GalleryNavigation extends Vue { | |||
66 | return this.COMPONENT_BY_TYPE[this.$galleryStore.currentItem?.properties.type ?? ItemType.OTHER]; | 66 | return this.COMPONENT_BY_TYPE[this.$galleryStore.currentItem?.properties.type ?? ItemType.OTHER]; |
67 | } | 67 | } |
68 | 68 | ||
69 | get componentKey() { | ||
70 | return this.$galleryStore.currentItem?.path ?? ""; | ||
71 | } | ||
72 | |||
69 | @Watch("path") | 73 | @Watch("path") |
70 | pathChanged() { | 74 | pathChanged() { |
71 | this.$galleryStore.setCurrentPath(this.path); | 75 | this.$galleryStore.setCurrentPath(this.path); |