Skip to content

Commit

Permalink
docs(Releases): add release reactions to selection display
Browse files Browse the repository at this point in the history
  • Loading branch information
johnleider committed May 24, 2023
1 parent d35c1ce commit 0c47292
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
29 changes: 28 additions & 1 deletion packages/docs/src/components/doc/Releases.vue
Expand Up @@ -14,6 +14,24 @@
prepend-inner-icon="mdi-text-box-search-outline"
return-object
>
<template #selection>
<div class="d-flex align-center">
<div class="me-1">{{ search?.tag_name }}</div>

&mdash;

<template v-for="(value, key) in reactions" :key="key">
<template v-if="search?.reactions?.[key]">
<span class="d-inline-flex align-center text-body-2 me-2">
{{ value }}

<span class="text-caption">{{ search.reactions[key] }}</span>
</span>
</template>
</template>
</div>
</template>

<template #item="{ item, props: itemProps }">
<v-list-item
v-if="item?.title"
Expand Down Expand Up @@ -42,7 +60,7 @@
>
<v-list-item v-if="publishedOn" lines="two">
<v-list-item-title class="d-flex align-center">
<i18n-t keypath="published-on">
<i18n-t keypath="published">
<template #date>
<v-chip
:text="publishedOn"
Expand Down Expand Up @@ -103,6 +121,15 @@
import { version } from 'vuetify'
import { wait } from '@/util/helpers'

const reactions = {
'+1': 'πŸ‘',
hooray: 'πŸŽ‰',
rocket: 'πŸš€',
laugh: 'πŸ˜‚',
heart: '❀️',
eyes: 'πŸ‘€',
}

const { t } = useI18n()
const date = useDate()
const route = useRoute()
Expand Down
2 changes: 1 addition & 1 deletion packages/docs/src/i18n/messages/en.json
Expand Up @@ -170,7 +170,7 @@
"professional-support": "Professional support",
"progress": "Progress",
"providers": "Providers",
"published-on": "Published on {date}",
"published": "Published: {date}",
"pwa": {
"install": "Install Vuetify Documentation",
"new-content-available": "New content is available. Click **Refresh** to update.",
Expand Down

0 comments on commit 0c47292

Please sign in to comment.