2019-10-25 07:53:36 +11:00
|
|
|
<template>
|
2020-02-29 03:39:47 +11:00
|
|
|
<Popover
|
|
|
|
trigger="hover"
|
2019-10-25 07:53:36 +11:00
|
|
|
popover-class="status-popover"
|
2020-02-29 03:39:47 +11:00
|
|
|
:bound-to="{ x: 'container' }"
|
|
|
|
@show="enter"
|
2019-10-25 07:53:36 +11:00
|
|
|
>
|
2020-02-29 03:39:47 +11:00
|
|
|
<template slot="trigger">
|
|
|
|
<slot />
|
|
|
|
</template>
|
|
|
|
<div
|
|
|
|
slot="content"
|
|
|
|
>
|
2019-10-25 07:53:36 +11:00
|
|
|
<Status
|
2019-10-25 13:14:53 +11:00
|
|
|
v-if="status"
|
2019-10-25 07:53:36 +11:00
|
|
|
:is-preview="true"
|
2019-10-25 13:14:53 +11:00
|
|
|
:statusoid="status"
|
2019-10-25 07:53:36 +11:00
|
|
|
:compact="true"
|
|
|
|
/>
|
2020-03-02 17:35:57 +11:00
|
|
|
<div
|
|
|
|
v-else-if="error"
|
|
|
|
class="status-preview-no-content faint"
|
|
|
|
>
|
|
|
|
{{ $t('status.status_unavailable') }}
|
|
|
|
</div>
|
2019-10-25 07:53:36 +11:00
|
|
|
<div
|
|
|
|
v-else
|
2020-03-02 17:35:57 +11:00
|
|
|
class="status-preview-no-content"
|
2019-10-25 07:53:36 +11:00
|
|
|
>
|
|
|
|
<i class="icon-spin4 animate-spin" />
|
|
|
|
</div>
|
2020-02-29 03:39:47 +11:00
|
|
|
</div>
|
|
|
|
</Popover>
|
2019-10-25 07:53:36 +11:00
|
|
|
</template>
|
|
|
|
|
|
|
|
<script src="./status_popover.js" ></script>
|
|
|
|
|
|
|
|
<style lang="scss">
|
|
|
|
@import '../../_variables.scss';
|
|
|
|
|
2020-02-29 03:39:47 +11:00
|
|
|
.status-popover {
|
2019-10-25 07:53:36 +11:00
|
|
|
font-size: 1rem;
|
|
|
|
min-width: 15em;
|
|
|
|
max-width: 95%;
|
|
|
|
|
2020-02-29 03:39:47 +11: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-25 07:53:36 +11:00
|
|
|
|
|
|
|
.status-el.status-el {
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
2020-03-02 17:35:57 +11:00
|
|
|
.status-preview-no-content {
|
2019-10-25 07:53:36 +11:00
|
|
|
padding: 1em;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
i {
|
|
|
|
font-size: 2em;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|