mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-19 15:48:04 +01:00
Guild category tags and challenge category tags have now the same styling.
This commit is contained in:
@@ -25,7 +25,11 @@ router-link.card-link(:to="{ name: 'guild', params: { groupId: guild._id } }")
|
||||
div.guild-bank(v-if='displayGemBank', v-once) {{$t('guildBank')}}
|
||||
.row
|
||||
.col-md-12
|
||||
.category-label(v-for="category in guild.categorySlugs")
|
||||
.category-label.category-label-blue(v-if='isLeader(guild)') {{ $t('owned') }}
|
||||
.category-label(
|
||||
v-for="category in guild.categorySlugs"
|
||||
:class="{'category-label-purple': isOfficial(category)}"
|
||||
)
|
||||
| {{$t(category)}}
|
||||
span.recommend-text(v-if='showSuggested(guild._id)') Suggested because you’re new to Habitica.
|
||||
</template>
|
||||
@@ -176,6 +180,13 @@ export default {
|
||||
// @TODO: ask about challenges when we add challenges
|
||||
await this.$store.dispatch('guilds:leave', {groupId: this.guild._id, type: 'myGuilds'});
|
||||
},
|
||||
isLeader (guild) {
|
||||
if (!guild.leader) return false;
|
||||
return this.user._id === guild.leader;
|
||||
},
|
||||
isOfficial (category) {
|
||||
return category === 'habitica_official';
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user