Skip to content

Commit

Permalink
Migrate ColorBadge of TagList from bootstrap-vue to vuetify 2 #248
Browse files Browse the repository at this point in the history
  • Loading branch information
robertfausk committed Jan 2, 2025
1 parent ffdc88f commit 0b0fe4c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
17 changes: 10 additions & 7 deletions web/assets/js/components/Tags/ColorBadge.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
<template>
<b-badge
<v-chip
class="font-weight-bold d-flex align-items-center"
:style="`background-color: ${ color }`"
pill
font-scale="2"
>
<div
style="height:inherit; background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; filter: invert(1) grayscale(1) contrast(999);"
<span
:style="`background-color: ${ color }`"
>
{{ color }}
</div>
</b-badge>
<span
style="height:inherit; background: inherit; -webkit-background-clip: text; background-clip: text; color: transparent; text-align: center; filter: invert(1) grayscale(1) contrast(999);"
>
{{ color }}
</span>
</span>
</v-chip>
</template>

<script>
Expand Down
3 changes: 1 addition & 2 deletions web/assets/js/components/Tags/TagList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@
<script>
'use strict';
import ColorBadge from './ColorBadge.vue';
import ContentLoadingSpinner from '../ContentLoadingSpinner.vue';
import {useAlertStore, useAuthStore, useClientStore, useTagStore} from '../../stores';
import {
itemsPerPageOptions,
Expand All @@ -146,7 +145,7 @@ import {
export default {
name: 'TagList',
components: { ContentLoadingSpinner, ColorBadge },
components: { ColorBadge },
data: function () {
return {
itemsPerPageOptions,
Expand Down

0 comments on commit 0b0fe4c

Please sign in to comment.