2019-10-24 20:53:36 +00:00
|
|
|
<template>
|
2020-02-28 16:39:47 +00:00
|
|
|
<Popover
|
|
|
|
trigger="hover"
|
2020-07-03 09:56:31 +00:00
|
|
|
popover-class="popover-default status-popover"
|
2020-02-28 16:39:47 +00:00
|
|
|
:bound-to="{ x: 'container' }"
|
|
|
|
@show="enter"
|
2019-10-24 20:53:36 +00:00
|
|
|
>
|
2021-04-07 19:42:34 +00:00
|
|
|
<template v-slot:trigger>
|
2020-02-28 16:39:47 +00:00
|
|
|
<slot />
|
|
|
|
</template>
|
2021-04-07 19:42:34 +00:00
|
|
|
<template v-slot:content>
|
2019-10-24 20:53:36 +00:00
|
|
|
<Status
|
2019-10-25 02:14:53 +00:00
|
|
|
v-if="status"
|
2019-10-24 20:53:36 +00:00
|
|
|
:is-preview="true"
|
2019-10-25 02:14:53 +00:00
|
|
|
:statusoid="status"
|
2019-10-24 20:53:36 +00:00
|
|
|
:compact="true"
|
|
|
|
/>
|
2020-03-02 06:35:57 +00:00
|
|
|
<div
|
|
|
|
v-else-if="error"
|
|
|
|
class="status-preview-no-content faint"
|
|
|
|
>
|
|
|
|
{{ $t('status.status_unavailable') }}
|
|
|
|
</div>
|
2019-10-24 20:53:36 +00:00
|
|
|
<div
|
|
|
|
v-else
|
2020-03-02 06:35:57 +00:00
|
|
|
class="status-preview-no-content"
|
2019-10-24 20:53:36 +00:00
|
|
|
>
|
2020-10-20 21:31:16 +00:00
|
|
|
<FAIcon
|
|
|
|
icon="circle-notch"
|
|
|
|
spin
|
|
|
|
size="2x"
|
|
|
|
/>
|
2019-10-24 20:53:36 +00:00
|
|
|
</div>
|
2021-04-07 19:42:34 +00:00
|
|
|
</template>
|
2020-02-28 16:39:47 +00:00
|
|
|
</Popover>
|
2019-10-24 20:53:36 +00:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./status_popover.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2020-08-17 21:26:44 +00:00
|
|
|
/* popover styles load on-demand, so we need to override */
|
|
|
|
.status-popover.popover {
|
2019-10-24 20:53:36 +00:00
|
|
|
font-size: 1rem;
|
|
|
|
min-width: 15em;
|
|
|
|
max-width: 95%;
|
|
|
|
|
2020-02-28 16:39:47 +00: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);
|
2019-10-24 20:53:36 +00:00
|
|
|
|
2020-07-27 22:27:11 +00:00
|
|
|
/* TODO cleanup this */
|
|
|
|
.Status.Status {
|
2019-10-24 20:53:36 +00:00
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
2020-03-02 06:35:57 +00:00
|
|
|
.status-preview-no-content {
|
2019-10-24 20:53:36 +00:00
|
|
|
padding: 1em;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
i {
|
|
|
|
font-size: 2em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|