-
Notifications
You must be signed in to change notification settings - Fork 217
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Olga Bulat <obulat@gmail.com>
- Loading branch information
Showing
7 changed files
with
98 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
frontend/src/components/VMediaInfo/VSourceProviderPopover.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<template> | ||
<VPopover placement="top" :activate-on-hover="true"> | ||
<template #trigger> | ||
<VIconButton | ||
:label="datum.label" | ||
variant="filled-white" | ||
size="disabled" | ||
class="ms-2 h-4 w-4" | ||
:icon-props="{ name: 'info', size: 4 }" | ||
/> | ||
</template> | ||
<template #default> | ||
<p | ||
class="caption-regular rounded-sm bg-dark-charcoal px-2 py-1 text-white" | ||
tabindex="0" | ||
> | ||
{{ description }} | ||
</p> | ||
</template> | ||
</VPopover> | ||
</template> | ||
<script lang="ts"> | ||
import { computed, defineComponent, PropType } from "vue" | ||
import type { Metadata } from "~/types/media" | ||
import { useI18n } from "~/composables/use-i18n" | ||
import VIconButton from "~/components/VIconButton/VIconButton.vue" | ||
import VPopover from "~/components/VPopover/VPopover.vue" | ||
export default defineComponent({ | ||
name: "VSourceProviderPopover", | ||
components: { VIconButton, VPopover }, | ||
props: { | ||
datum: { | ||
type: Object as PropType<Metadata>, | ||
required: true, | ||
}, | ||
}, | ||
setup(props) { | ||
const i18n = useI18n() | ||
const description = computed(() => { | ||
if (!props.datum.name) return "" | ||
return i18n.t( | ||
props.datum.name === "source" | ||
? "mediaDetails.sourceDescription" | ||
: "mediaDetails.providerDescription" | ||
) | ||
}) | ||
return { | ||
description, | ||
} | ||
}, | ||
}) | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters