Corrected No date. Fix Status and Priority editors. Little fixes. (#1697)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov
2022-05-09 18:37:34 +07:00
committed by GitHub
parent 9266a61c98
commit b8e942a145
16 changed files with 239 additions and 289 deletions
@@ -229,13 +229,13 @@
{#if i !== 0}
<div class="ml-2 mr-2">or</div>
{/if}
<div class="flex-row-center" class:ml-2={i !== 0}>
<div class="flex-row-center">
{#each formatKey(key) as k, jj}
{#if jj !== 0}
<div class="ml-1 mr-1">then</div>
{/if}
{#each k as kk, j}
<div class="flex-center text-sm key-box" class:ml-2={j !== 0}>
<div class="flex-center text-sm key-box">
{kk}
</div>
{/each}
@@ -253,10 +253,15 @@
<style lang="scss">
.key-box {
background-color: var(--divider-color);
background-color: var(--button-bg-color);
color: var(--caption-color);
min-width: 1.5rem;
padding: 0.25rem;
padding: 0 0.5rem;
border: 1px solid var(--button-border-color);
border-radius: 0.25rem;
}
.key-box + .key-box {
margin-left: 0.5rem;
}
.item-box {
display: inline-block;
@@ -15,21 +15,26 @@
-->
<script lang="ts">
// import type { IntlString } from '@anticrm/platform'
import { Label } from '@anticrm/ui'
import { Label, Button } from '@anticrm/ui'
import type { ButtonKind, ButtonSize } from '@anticrm/ui'
import { getBooleanLabel } from '../utils'
export let value: any
export let maxWidth: string | undefined = undefined
export let withoutUndefined: boolean = false
export let onChange: (value: any) => void
export let kind: ButtonKind = 'no-border'
export let size: ButtonSize = 'small'
export let justify: 'left' | 'center' = 'center'
export let width: string | undefined = 'fit-content'
</script>
<div
class="flex-row-center yesno-container"
class:yes={value === true}
class:no={value === false}
class:unknown={value === undefined}
style={maxWidth ? `max-width: ${maxWidth};` : ''}
<Button
{kind}
{size}
{justify}
{width}
on:click={() => {
if (value === true) value = false
else if (value === false && !withoutUndefined) value = undefined
@@ -37,21 +42,34 @@
onChange(value)
}}
>
<svg class="yesno-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<circle class:yes={value === true} class:no={value === false} cx="8" cy="8" r="6" />
{#if value === true}
<polygon fill="#fff" points="7.4,10.9 4.9,8.4 5.7,7.6 7.3,9.1 10.2,5.6 11.1,6.4 " />
{:else if value === false}
<polygon fill="#fff" points="10.7,6 10,5.3 8,7.3 6,5.3 5.3,6 7.3,8 5.3,10 6,10.7 8,8.7 10,10.7 10.7,10 8.7,8 " />
{:else}
<path
fill="#fff"
d="M7.3,9.3h1.3V9c0.1-0.5,0.6-0.9,1.1-1.4c0.4-0.4,0.8-0.9,0.8-1.6c0-1.1-0.8-1.8-2.2-1.8c-1.4,0-2.4,0.8-2.5,2.2 h1.4c0.1-0.6,0.4-1,1-1C8.8,5.4,9,5.7,9,6.2c0,0.4-0.3,0.7-0.7,1.1c-0.5,0.5-1,0.9-1,1.7V9.3z M8,11.6c0.5,0,0.9-0.4,0.9-0.9 c0-0.5-0.4-0.9-0.9-0.9c-0.5,0-0.9,0.4-0.9,0.9C7.1,11.2,7.5,11.6,8,11.6z"
/>
{/if}
</svg>
<span><Label label={getBooleanLabel(value)} /></span>
</div>
<svelte:fragment slot="content">
<div
class="flex-row-center yesno-container"
class:yes={value === true}
class:no={value === false}
class:unknown={value === undefined}
style={maxWidth ? `max-width: ${maxWidth};` : ''}
>
<svg class="yesno-svg" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16">
<circle class:yes={value === true} class:no={value === false} cx="8" cy="8" r="6" />
{#if value === true}
<polygon fill="#fff" points="7.4,10.9 4.9,8.4 5.7,7.6 7.3,9.1 10.2,5.6 11.1,6.4 " />
{:else if value === false}
<polygon
fill="#fff"
points="10.7,6 10,5.3 8,7.3 6,5.3 5.3,6 7.3,8 5.3,10 6,10.7 8,8.7 10,10.7 10.7,10 8.7,8 "
/>
{:else}
<path
fill="#fff"
d="M7.3,9.3h1.3V9c0.1-0.5,0.6-0.9,1.1-1.4c0.4-0.4,0.8-0.9,0.8-1.6c0-1.1-0.8-1.8-2.2-1.8c-1.4,0-2.4,0.8-2.5,2.2 h1.4c0.1-0.6,0.4-1,1-1C8.8,5.4,9,5.7,9,6.2c0,0.4-0.3,0.7-0.7,1.1c-0.5,0.5-1,0.9-1,1.7V9.3z M8,11.6c0.5,0,0.9-0.4,0.9-0.9 c0-0.5-0.4-0.9-0.9-0.9c-0.5,0-0.9,0.4-0.9,0.9C7.1,11.2,7.5,11.6,8,11.6z"
/>
{/if}
</svg>
<span><Label label={getBooleanLabel(value)} /></span>
</div>
</svelte:fragment>
</Button>
<style lang="scss">
.yesno-container {