Skip to content

Commit

Permalink
feat: implement metadata display
Browse files Browse the repository at this point in the history
  • Loading branch information
pirhoo committed Oct 31, 2024
1 parent 6aad6f8 commit d6b7157
Show file tree
Hide file tree
Showing 3 changed files with 218 additions and 322 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ defineProps({
type: String,
default: 'info'
},
name: {
type: String,
required: true
},
label: {
type: String,
required: true
Expand Down Expand Up @@ -37,7 +41,7 @@ defineProps({
</slot>
</div>
</div>
<document-metadata-actions v-model:pinned="pinned" :value="value" class="document-metadata__actions" />
<document-metadata-actions v-model:pinned="pinned" :name="name" :value="value" class="document-metadata__actions" />
</div>
</template>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ import DocumentMetadataActionsEntry from './DocumentMetadataActionsEntry'
const pinned = defineModel('pinned', { type: Boolean })
defineProps({
name: {
type: String,
required: true
},
value: {
type: String,
required: true
Expand All @@ -15,13 +19,16 @@ defineProps({
const pinIconWeight = computed(() => (pinned.value ? 'fill' : null))
const pinIconHoverWeight = computed(() => (pinned.value ? 'fill' : 'bold'))
const q = ''
const indices = ''
</script>

<template>
<div class="document-metdata-actions">
<slot>
<document-metadata-actions-entry
:label="$t('documentMetadataActions.search')"
:to="{ name: 'search', query: { q, indices } }"
icon="magnifying-glass"
@click="$emit('search')"
/>
Expand Down
Loading

0 comments on commit d6b7157

Please sign in to comment.