File tree Expand file tree Collapse file tree
webui/src/components/dashboard/search Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <script setup lang="ts">
2+ import { usePrettyHttp } from ' @/composables/http' ;
3+ import { usePrettyText } from ' @/composables/usePrettyText' ;
4+ import { computed } from ' vue' ;
5+
6+ const props = defineProps <{
7+ item: SearchItem
8+ }>()
9+
10+ const { adaptiveTruncate } = usePrettyText ()
11+
12+ const title = computed (() => {
13+ let title = props .item .title
14+ return adaptiveTruncate (title )
15+ })
16+ </script >
17+
18+ <template >
19+ <div class =" card-body" >
20+
21+ <div class =" d-flex justify-content-between" >
22+ <h6 class =" mb-1" >
23+ <span class =" badge bg-config me-1" v-if =" item.params.source" >{{ item.params.source }}</span >
24+ {{ title }}
25+ </h6 >
26+ </div >
27+
28+ <div class =" text-muted small mb-1" >
29+ <span v-if =" item.domain" > {{ item.domain }} · ; </span >
30+ <span >{{ item.type }}</span >
31+ </div >
32+
33+ <p class =" small mb-0" v-html =" item.fragments?.join(' ... ')" ></p >
34+
35+ </div >
36+ </template >
37+
38+ <style scoped>
39+ .bg-config {
40+ background-color : #343a40 ;
41+ }
42+ </style >
You can’t perform that action at this time.
0 commit comments