Verified Commit 3ccccd15 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Added default icon for musicbrainz profiles

parent 691a75ee
Pipeline #4246 passed with stages
in 1 minute and 16 seconds
......@@ -52,6 +52,7 @@
<ul class="collection">
<li class="collection-item avatar" v-for="suggestion in filteredSuggestions" :key="suggestion.fullId">
<img v-if="suggestion.avatar" :src="suggestion.avatar" alt="" class="circle">
<i v-else-if="sources[suggestion.source].defaultAvatarIcon" class="material-icons purple accent-1 circle">{{ sources[suggestion.source].defaultAvatarIcon }}</i>
<a target="_blank" rel="noopener noreferrer" :href="suggestion.url" class="title">{{ suggestion.name }}</a>
<br>
<span class="tooltipped" v-tooltip :data-tooltip="getScoreTooltip(suggestion)">
......@@ -92,6 +93,7 @@ import axios from 'axios'
export default {
data () {
return {
sources: sources.sources,
maxDays: 60,
isLoadingSources: false,
isLoadingRetribute: false,
......
......@@ -90,7 +90,9 @@ export default {
description: "Funkwhale servers",
extendedDescription: "Receive suggestions based on your listening history",
imageBackground: "grey lighten-5",
defaultAvatarIcon: "folder",
form: Form,
connect: true,
getLogo () {
return require("../assets/sources/funkwhale-logo.png")
},
......
......@@ -5,10 +5,16 @@ import sortBy from "lodash/sortBy"
export default {
all () {
return sortBy(Object.values(this.sources), ["id"])
return sortBy(Object.values(this.sources), ["id"]).filter((s) => {
return s.connect
})
},
sources: {
funkwhale: Funkwhale,
mastodon: Mastodon
mastodon: Mastodon,
musicbrainz: {
defaultAvatarIcon: "music_note",
connect: false
}
}
}
......@@ -45,6 +45,7 @@ export default {
extendedDescription: "Receive suggestions based on your favorites",
imageBackground: "blue-grey darken-4",
form: Form,
connect: true,
getLogo () {
return require("../assets/sources/mastodon-logo.svg")
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment