From 93f536bf217959f97695a261e20659e0d4e7d154 Mon Sep 17 00:00:00 2001 From: Jiiks Date: Wed, 5 Dec 2018 08:26:01 +0200 Subject: [PATCH] Make tags clickable --- .../styles/partials/bdsettings/remotecard.scss | 15 +++++++++++++-- client/src/ui/components/bd/RemoteCard.vue | 8 ++++++-- client/src/ui/components/bd/ThemesView.vue | 9 +++++++-- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/client/src/styles/partials/bdsettings/remotecard.scss b/client/src/styles/partials/bdsettings/remotecard.scss index 8a18b5d2..7c62e121 100644 --- a/client/src/styles/partials/bdsettings/remotecard.scss +++ b/client/src/styles/partials/bdsettings/remotecard.scss @@ -48,8 +48,19 @@ color: #828a97; font-size: 10px; display: flex; - flex-direction: column; - justify-content: flex-end; + align-items: flex-end; + + .bd-remoteCardTag { + > div { + display: inline; + cursor: pointer; + margin-left: 2px; + + &:hover { + color: #fff; + } + } + } } .bd-buttonGroup { diff --git a/client/src/ui/components/bd/RemoteCard.vue b/client/src/ui/components/bd/RemoteCard.vue index ce17ce29..46fd9c19 100644 --- a/client/src/ui/components/bd/RemoteCard.vue +++ b/client/src/ui/components/bd/RemoteCard.vue @@ -25,7 +25,11 @@
-
{{item.tags.join(', ')}}
+
+
+
{{tag}}
, +
+
Install
Preview
@@ -40,7 +44,7 @@ import { shell } from 'electron'; export default { - props: ['item'], + props: ['item', 'tagClicked'], data() { return {} }, diff --git a/client/src/ui/components/bd/ThemesView.vue b/client/src/ui/components/bd/ThemesView.vue index 5728f8fb..82e73919 100644 --- a/client/src/ui/components/bd/ThemesView.vue +++ b/client/src/ui/components/bd/ThemesView.vue @@ -35,7 +35,7 @@
{{searchHint}}
- +
@@ -49,7 +49,7 @@
- +
@@ -191,6 +191,11 @@ this.onlineThemes.filters.ascending = false; } this.refreshOnline(); + }, + async searchByTag(tag) { + if (this.loadingOnline || this.loadingMore) return; + this.onlineThemes.filters.sterm = tag; + this.refreshOnline(); } } }