From 89bcb2dbe5b5e6eb8e8ba13ceecee2770dfe4cd4 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Thu, 9 Jan 2020 02:10:35 +0100 Subject: viewer: Changed "image" type to "picture". Adapted the code to the current compiler output format. The currentItem and currentPath are calculated in the store for easier multi-component access. Breadcrumb for current's position and navigation. --- viewer/src/@types/gallery/index.d.ts | 22 ++++------- viewer/src/assets/scss/theme.scss | 10 +++++ viewer/src/components/LdProposition.vue | 1 - viewer/src/locales/en.json | 3 +- viewer/src/plugins/fontawesome.ts | 2 + viewer/src/store/galleryStore.ts | 31 +++++++++++---- viewer/src/views/Gallery.vue | 36 +++++++++--------- viewer/src/views/GalleryDirectory.vue | 1 - viewer/src/views/GalleryImage.vue | 22 ----------- viewer/src/views/GalleryPicture.vue | 21 +++++++++++ viewer/src/views/GallerySearch.vue | 2 +- viewer/src/views/GalleryThumbnail.vue | 4 +- viewer/src/views/MainLayout.vue | 19 +++++----- viewer/src/views/PanelTop.vue | 67 +++++++++++++++++++++++++++++++++ 14 files changed, 165 insertions(+), 76 deletions(-) create mode 100644 viewer/src/assets/scss/theme.scss delete mode 100644 viewer/src/views/GalleryImage.vue create mode 100644 viewer/src/views/GalleryPicture.vue create mode 100644 viewer/src/views/PanelTop.vue diff --git a/viewer/src/@types/gallery/index.d.ts b/viewer/src/@types/gallery/index.d.ts index 310c865..97cc207 100644 --- a/viewer/src/@types/gallery/index.d.ts +++ b/viewer/src/@types/gallery/index.d.ts @@ -1,28 +1,22 @@ declare namespace Gallery { - interface Image extends Item { - properties: ImageProperties, + interface Picture extends Item { + properties: PictureProperties, } interface Directory extends Item { properties: DirectoryProperties, } interface Item { title: string, - date: string, + datetime: string, description: string, tags: RawTag[], path: string, - thumbnail: { - path: string, - }, - properties: ImageProperties | DirectoryProperties, + thumbnail?: string, + properties: PictureProperties | DirectoryProperties, } - interface ImageProperties { - type: "image", - filesize: number, - resolution: { - width: number, - height: number, - } + interface PictureProperties { + type: "picture", + resource: string, } interface DirectoryProperties { type: "directory", diff --git a/viewer/src/assets/scss/theme.scss b/viewer/src/assets/scss/theme.scss new file mode 100644 index 0000000..a8ee0be --- /dev/null +++ b/viewer/src/assets/scss/theme.scss @@ -0,0 +1,10 @@ +// === Theme + +$layout-top: 70px; +$layout-left: 250px; + +$panel-top-bgcolor: #225; +$panel-top-txtcolor: white; +$panel-left-bgcolor: $panel-top-bgcolor; +$panel-left-txtcolor: $panel-top-txtcolor; +$content-bgcolor: #1e1e1e; diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue index b23c14a..9e8d9dd 100644 --- a/viewer/src/components/LdProposition.vue +++ b/viewer/src/components/LdProposition.vue @@ -13,7 +13,6 @@ - - diff --git a/viewer/src/views/GalleryPicture.vue b/viewer/src/views/GalleryPicture.vue new file mode 100644 index 0000000..b655162 --- /dev/null +++ b/viewer/src/views/GalleryPicture.vue @@ -0,0 +1,21 @@ + + + + + diff --git a/viewer/src/views/GallerySearch.vue b/viewer/src/views/GallerySearch.vue index 887c1a3..44f312b 100644 --- a/viewer/src/views/GallerySearch.vue +++ b/viewer/src/views/GallerySearch.vue @@ -16,7 +16,7 @@ import GalleryThumbnail from "./GalleryThumbnail.vue"; @Component({ components: { GalleryThumbnail }, }) -export default class GalleryImage extends Vue { +export default class GalleryPicture extends Vue { @Prop({ required: true }) readonly items!: Gallery.Item[]; } diff --git a/viewer/src/views/GalleryThumbnail.vue b/viewer/src/views/GalleryThumbnail.vue index fdfd9d3..d7ef44c 100644 --- a/viewer/src/views/GalleryThumbnail.vue +++ b/viewer/src/views/GalleryThumbnail.vue @@ -1,6 +1,6 @@