Update version icon to version status light
This commit is contained in:
parent
fda4ec692f
commit
160d770655
|
@ -19,12 +19,15 @@
|
||||||
export let active = false
|
export let active = false
|
||||||
export let color = null
|
export let color = null
|
||||||
export let square = false
|
export let square = false
|
||||||
|
export let hoverable = false
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
|
on:click
|
||||||
class="spectrum-StatusLight spectrum-StatusLight--size{size}"
|
class="spectrum-StatusLight spectrum-StatusLight--size{size}"
|
||||||
class:custom={!!color}
|
class:custom={!!color}
|
||||||
class:square
|
class:square
|
||||||
|
class:hoverable
|
||||||
style={`--color: ${color};`}
|
style={`--color: ${color};`}
|
||||||
class:spectrum-StatusLight--celery={celery}
|
class:spectrum-StatusLight--celery={celery}
|
||||||
class:spectrum-StatusLight--yellow={yellow}
|
class:spectrum-StatusLight--yellow={yellow}
|
||||||
|
@ -56,6 +59,7 @@
|
||||||
min-height: 0;
|
min-height: 0;
|
||||||
padding-top: 0;
|
padding-top: 0;
|
||||||
padding-bottom: 0;
|
padding-bottom: 0;
|
||||||
|
transition: color ease-out 130ms;
|
||||||
}
|
}
|
||||||
.spectrum-StatusLight.withText::before {
|
.spectrum-StatusLight.withText::before {
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
|
@ -69,4 +73,8 @@
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
.hoverable:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
color: var(--spectrum-global-color-gray-900);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
Icon,
|
|
||||||
Modal,
|
Modal,
|
||||||
notifications,
|
notifications,
|
||||||
ModalContent,
|
ModalContent,
|
||||||
Body,
|
Body,
|
||||||
Button,
|
Button,
|
||||||
|
StatusLight,
|
||||||
} from "@budibase/bbui"
|
} from "@budibase/bbui"
|
||||||
import { store } from "builderStore"
|
import { store } from "builderStore"
|
||||||
import { API } from "api"
|
import { API } from "api"
|
||||||
|
@ -67,17 +67,10 @@
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if !hideIcon}
|
{#if !hideIcon && updateAvailable}
|
||||||
<div class="icon-wrapper" class:highlight={updateAvailable}>
|
<StatusLight hoverable on:click={updateModal.show} notice>
|
||||||
<Icon
|
Update available
|
||||||
name="Refresh"
|
</StatusLight>
|
||||||
hoverable
|
|
||||||
on:click={updateModal.show}
|
|
||||||
tooltip={updateAvailable
|
|
||||||
? "An update is available"
|
|
||||||
: "No updates are available"}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
{/if}
|
{/if}
|
||||||
<Modal bind:this={updateModal}>
|
<Modal bind:this={updateModal}>
|
||||||
<ModalContent
|
<ModalContent
|
||||||
|
|
|
@ -111,7 +111,9 @@
|
||||||
</Tabs>
|
</Tabs>
|
||||||
</div>
|
</div>
|
||||||
<div class="toprightnav">
|
<div class="toprightnav">
|
||||||
<VersionModal />
|
<div class="version">
|
||||||
|
<VersionModal />
|
||||||
|
</div>
|
||||||
<RevertModal />
|
<RevertModal />
|
||||||
<DeployNavigation {application} />
|
<DeployNavigation {application} />
|
||||||
</div>
|
</div>
|
||||||
|
@ -180,4 +182,8 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
gap: var(--spacing-xl);
|
gap: var(--spacing-xl);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.version {
|
||||||
|
margin-right: var(--spacing-s);
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue