1
0
Fork 0
mirror of synced 2024-09-30 00:57:16 +13:00

re-add status lights for app row

This commit is contained in:
Peter Clement 2021-12-09 10:10:16 +00:00
parent d7afe11655
commit eed8a13100
4 changed files with 60 additions and 23 deletions

View file

@ -6,7 +6,6 @@
import { createEventDispatcher } from "svelte"
import clickOutside from "../../Actions/click_outside"
import Search from "./Search.svelte"
import Icon from "../../Icon/Icon.svelte"
export let id = null
export let disabled = false
@ -160,21 +159,17 @@
>
{#if getOptionIcon(option, idx)}
<span class="icon-Padding">
{#if getOptionIcon(option, idx).includes("assets")}
<img
src={getOptionIcon(option, idx)}
alt="icon"
width="20"
height="15"
/>
{:else}<Icon name={getOptionIcon(option, idx)} />{/if}
</span>
{/if}
{#if getOptionLabel(option, idx)}
<span class="spectrum-Menu-itemLabel">
{getOptionLabel(option, idx)}
<img
src={getOptionIcon(option, idx)}
alt="icon"
width="20"
height="15"
/>
</span>
{/if}
<span class="spectrum-Menu-itemLabel">
{getOptionLabel(option, idx)}
</span>
<svg
class="spectrum-Icon spectrum-UIIcon-Checkmark100 spectrum-Menu-checkmark spectrum-Menu-itemIcon"
focusable="false"

View file

@ -1,7 +1,14 @@
<script>
import { Heading, Button, Icon, ActionMenu, MenuItem } from "@budibase/bbui"
import {
Heading,
Button,
Icon,
ActionMenu,
MenuItem,
StatusLight,
} from "@budibase/bbui"
import { apps } from "stores/portal"
import { processStringSync } from "@budibase/string-templates"
export let app
export let exportApp
export let viewApp
@ -29,9 +36,35 @@
</div>
</div>
</div>
<div class="desktop" />
<div class="desktop" />
<div class="desktop" />
<div class="desktop">
{#if app.updatedAt}
{processStringSync("Updated {{ duration time 'millisecond' }} ago", {
time: new Date().getTime() - new Date(app.updatedAt).getTime(),
})}
{:else}
Never updated
{/if}
</div>
<div class="desktop">
<StatusLight
positive={!app.lockedYou && !app.lockedOther}
notice={app.lockedYou}
negative={app.lockedOther}
>
{#if app.lockedYou}
Locked by you
{:else if app.lockedOther}
Locked by {app.lockedBy.email}
{:else}
Open
{/if}
</StatusLight>
</div>
<div class="desktop">
<StatusLight active={app.deployed} neutral={!app.deployed}>
{#if app.deployed}Published{:else}Unpublished{/if}
</StatusLight>
</div>
<div>
<Button
disabled={app.lockedOther}

View file

@ -9,7 +9,7 @@
let iconsList = [
"Actions",
"Algorithm",
"ConversionFunnel",
"App",
"Briefcase",
"Money",
@ -23,6 +23,15 @@
"Magnify",
"Launch",
"Actions",
"Car",
"Camera",
"Bug",
"Channel",
"Calculator",
"Calendar",
"GraphDonut",
"GraphBarHorizontal",
"Demographic",
]
export const show = () => {
modal.show()
@ -86,7 +95,7 @@
<style>
.scrollable-icons {
overflow-y: auto;
height: 150px;
height: 230px;
}
.grid {

View file

@ -441,7 +441,7 @@
flex-direction: row;
justify-content: space-between;
align-items: center;
gap: 10px;
gap: 5px;
}
@media only screen and (max-width: 560px) {
@ -489,7 +489,7 @@
.select {
display: grid;
grid-template-columns: auto auto;
grid-gap: 50px;
grid-gap: 30px;
}
.filter :global(.spectrum-ActionGroup) {
flex-wrap: nowrap;