-
-
-
+
+
+
+ -
+
+
+ {{item.title}}
+
+
+
+
@@ -44,23 +46,8 @@ import Gallery from "./Gallery.vue";
@Component
export default class PanelTop extends Vue {
- activeStep: number = -1;
-
- mounted() {
- this.currentItemPathChanged();
- }
-
- get isReady() {
- return this.activeStep >= 0;
- }
-
- @Watch("$galleryStore.currentItemPath")
- currentItemPathChanged() {
- this.activeStep = -1;
- this.$nextTick(() => (this.activeStep = this.$galleryStore.currentItemPath.length - 1));
- }
-
getIcon(item: Gallery.Item) {
+ if (item.path.length <= 1) return "home";
switch (item.properties.type) {
case "picture":
return "image";
@@ -68,19 +55,28 @@ export default class PanelTop extends Vue {
return "folder";
}
}
-
- onStepClick(index: number) {
- const item = this.$galleryStore.currentItemPath[index];
- if (item) this.$router.push(item.path);
- }
}
--
cgit v1.2.3
From 17b1598c5a5a375e6eaa0763767368c05ba0f56e Mon Sep 17 00:00:00 2001
From: Zero~Informatique
Date: Thu, 30 Jan 2020 22:58:27 +0100
Subject: viewer: Improved the proposition layout
---
viewer/src/assets/scss/global.scss | 5 ++++-
viewer/src/assets/scss/theme.scss | 2 ++
viewer/src/components/LdProposition.vue | 36 ++++++++++++++++++++++-----------
viewer/src/components/LdTagInput.vue | 1 -
viewer/src/plugins/fontawesome.ts | 4 ++--
viewer/src/views/PanelLeft.vue | 2 +-
viewer/src/views/PanelTop.vue | 2 +-
7 files changed, 34 insertions(+), 18 deletions(-)
(limited to 'viewer/src')
diff --git a/viewer/src/assets/scss/global.scss b/viewer/src/assets/scss/global.scss
index 3cfa1a5..b418911 100644
--- a/viewer/src/assets/scss/global.scss
+++ b/viewer/src/assets/scss/global.scss
@@ -32,6 +32,9 @@
.nowrap {
white-space: nowrap;
}
+.no-scroll-x {
+ overflow-x: hidden;
+}
.flex {
display: flex;
@@ -50,7 +53,7 @@
color: $link;
cursor: pointer;
text-decoration: none;
- & :hover {
+ &:hover {
color: $link-hover;
}
}
diff --git a/viewer/src/assets/scss/theme.scss b/viewer/src/assets/scss/theme.scss
index 2314ee8..d3aac99 100644
--- a/viewer/src/assets/scss/theme.scss
+++ b/viewer/src/assets/scss/theme.scss
@@ -32,3 +32,5 @@ $loader-color: #272727;
$link: $panel-top-txtcolor;
$link-hover: lightblue;
$disabled-color: rgba($link, 0.3);
+$control-radius: 0;
+$input-radius: 0;
diff --git a/viewer/src/components/LdProposition.vue b/viewer/src/components/LdProposition.vue
index f653e4d..02f7fe4 100644
--- a/viewer/src/components/LdProposition.vue
+++ b/viewer/src/components/LdProposition.vue
@@ -19,12 +19,18 @@
-
-
-
+
+
+
+
+
+
+ {{proposed.rawTag}} x{{proposed.count}}
-
+ >{{proposed.rawTag}}
+ x{{proposed.count}}
@@ -72,7 +78,7 @@ export default class LdTagInput extends Vue {
const node = this.$galleryStore.tags[rawTag];
const search: Tag.Search = { ...node, operation, display: `${operation}${node.tag}` };
this.$uiStore.currentTags.push(search);
- this.$uiStore.mode = "search";
+ setTimeout(() => this.$uiStore.setModeSearch()); // Give time for the UI to display the Tag change
}
}
@@ -82,12 +88,18 @@ export default class LdTagInput extends Vue {
.proposition {
display: flex;
- justify-content: space-between;
align-items: center;
- margin: 10px;
- cursor: pointer;
-}
-.proposition span {
- padding: 0 10px;
+ padding-right: 7px;
+ .operation-tag {
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ overflow: hidden;
+ flex-grow: 1;
+ cursor: pointer;
+ }
+ .operation-btns {
+ padding: 2px 7px;
+ cursor: pointer;
+ }
}
diff --git a/viewer/src/components/LdTagInput.vue b/viewer/src/components/LdTagInput.vue
index 7c9981f..ff354c6 100644
--- a/viewer/src/components/LdTagInput.vue
+++ b/viewer/src/components/LdTagInput.vue
@@ -27,7 +27,6 @@
:data="filteredTags"
field="display"
type="is-black"
- icon="tag"
size="is-medium"
class="panelTagInput"
@typing="searchTags"
diff --git a/viewer/src/plugins/fontawesome.ts b/viewer/src/plugins/fontawesome.ts
index c17d4a1..bf2ff5f 100644
--- a/viewer/src/plugins/fontawesome.ts
+++ b/viewer/src/plugins/fontawesome.ts
@@ -30,7 +30,7 @@ import {
faImage,
faHome,
faArrowLeft,
- faFilter,
+ faTags,
faAngleRight,
} from "@fortawesome/free-solid-svg-icons";
@@ -43,7 +43,7 @@ library.add(
faImage,
faHome,
faArrowLeft,
- faFilter,
+ faTags,
faAngleRight,
);
diff --git a/viewer/src/views/PanelLeft.vue b/viewer/src/views/PanelLeft.vue
index 35c092a..ea35664 100644
--- a/viewer/src/views/PanelLeft.vue
+++ b/viewer/src/views/PanelLeft.vue
@@ -24,7 +24,7 @@
{{$t('panelLeft.filters')}}
{{$t('panelLeft.propositions')}}
-
+