fix: ui search items
This commit is contained in:
parent
954a6bd5a1
commit
916793f5ae
6 changed files with 45 additions and 10 deletions
26
components/search/SearchHashtagInfo.vue
Normal file
26
components/search/SearchHashtagInfo.vue
Normal file
|
@ -0,0 +1,26 @@
|
|||
<script setup lang="ts">
|
||||
import type { History, Tag } from 'masto'
|
||||
|
||||
const { hashtag } = defineProps<{ hashtag: Tag }>()
|
||||
|
||||
const totalTrend = $computed(() =>
|
||||
hashtag.history?.reduce((total: number, item) => total + (Number(item.accounts) || 0), 0),
|
||||
)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div flex flex-row items-center gap2 relative>
|
||||
<div w-10 h-10 flex-none rounded-full bg-active flex place-items-center place-content-center>
|
||||
<div i-ri:hashtag text-secondary text-lg />
|
||||
</div>
|
||||
<div flex flex-col>
|
||||
<span>
|
||||
{{ hashtag.name }}
|
||||
</span>
|
||||
<CommonTrending :history="hashtag.history" text-xs text-secondary truncate />
|
||||
</div>
|
||||
<div v-if="totalTrend" absolute left-15 right-0 top-0 bottom-4 op35 flex place-items-center place-content-center ml-auto>
|
||||
<CommonTrendingCharts :history="hashtag.history" text-xs text-secondary width="150" height="20" h-full w-full />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
Loading…
Add table
Add a link
Reference in a new issue