Skip to content

Commit

Permalink
make suggestions stand out
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Herwege <mark.herwege@telenet.be>
  • Loading branch information
mherwege committed Oct 26, 2023
1 parent 14de617 commit b914842
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
<div class="addons-cards">
<addon-card v-for="addon in featuredAddons" :key="addon.uid" :addon="addon" :install-action-text="installActionText" :headline="'Featured'" @addonButtonClick="addonButtonClick" />
</div>
<div v-if="showAsCards" class="addons-cards">
<div v-if="suggested" class="addons-cards">
<addon-card v-for="addon in addonsList" :key="addon.uid" :addon="addon" :install-action-text="installActionText" :headline="'Suggested'" @addonButtonClick="addonButtonClick" />
</div>
<div v-else-if="showAsCards" class="addons-cards">
<addon-card v-for="addon in addonsList" :key="addon.uid" :addon="addon" :install-action-text="installActionText" @addonButtonClick="addonButtonClick" />
</div>
<f7-list v-else media-list ref="addonlist" class="addons-table-list" no-chevron no-hairlines>
Expand Down Expand Up @@ -95,7 +98,7 @@ import AddonCard from './addon-card.vue'
import { compareAddons } from '@/assets/addon-store'
export default {
props: ['addons', 'title', 'subtitle', 'showAll', 'featured', 'showAsCards', 'installActionText'],
props: ['addons', 'title', 'subtitle', 'showAll', 'featured', 'showAsCards', 'suggested', 'installActionText'],
components: {
AddonListItem,
AddonCard
Expand Down
4 changes: 2 additions & 2 deletions bundles/org.openhab.ui/web/src/pages/addons/addons-store.vue
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
v-if="suggestedAddons" :show-all="true"
@addonButtonClick="addonButtonClick"
:addons="suggestedAddons.filter((a) => a.type === 'binding')"
:show-as-cards="true"
:suggested="true"
:title="'Binding Suggestions'"
:subtitle="'Suggested bindings from network scan'" />
<addons-section
Expand Down Expand Up @@ -117,7 +117,7 @@
<addons-section
v-if="suggestedAddons" :show-all="true"
@addonButtonClick="addonButtonClick"
:show-as-cards="true"
:suggested="true"
:addons="suggestedAddons.filter((a) => a.type === 'misc')"
:title="'System Integrations Suggestions'"
:subtitle="'Suggested system integrations from network scan'" />
Expand Down

0 comments on commit b914842

Please sign in to comment.