pleroma-fe/src/components/status_popover/status_popover.vue

76 lines
1.5 KiB
Vue
Raw Normal View History

<template>
2020-02-28 17:39:47 +01:00
<Popover
trigger="hover"
popover-class="popover-default status-popover"
2020-02-28 17:39:47 +01:00
:bound-to="{ x: 'container' }"
@show="enter"
>
2020-02-28 17:39:47 +01:00
<template slot="trigger">
<slot />
</template>
<div
slot="content"
>
<Status
2019-10-25 04:14:53 +02:00
v-if="status"
:is-preview="true"
2019-10-25 04:14:53 +02:00
:statusoid="status"
:compact="true"
/>
<div
v-else-if="error"
class="status-preview-no-content faint"
>
{{ $t('status.status_unavailable') }}
</div>
<div
v-else
class="status-preview-no-content"
>
2020-10-20 23:31:16 +02:00
<FAIcon
icon="circle-notch"
spin
size="2x"
/>
</div>
2020-02-28 17:39:47 +01:00
</div>
</Popover>
</template>
<script src="./status_popover.js" ></script>
<style lang="scss">
@import '../../_variables.scss';
/* popover styles load on-demand, so we need to override */
.status-popover.popover {
font-size: 1rem;
min-width: 15em;
max-width: 95%;
2020-02-28 17:39:47 +01:00
border-color: $fallback--border;
border-color: var(--border, $fallback--border);
border-style: solid;
border-width: 1px;
border-radius: $fallback--tooltipRadius;
border-radius: var(--tooltipRadius, $fallback--tooltipRadius);
box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.5);
box-shadow: var(--popupShadow);
2020-07-28 00:27:11 +02:00
/* TODO cleanup this */
.Status.Status {
border: none;
}
.status-preview-no-content {
padding: 1em;
text-align: center;
i {
font-size: 2em;
}
}
}
</style>