diff --git a/plugins/task-resources/src/components/state/DoneStateEditor.svelte b/plugins/task-resources/src/components/state/DoneStateEditor.svelte
index b74d02aa74..3ccdf63389 100644
--- a/plugins/task-resources/src/components/state/DoneStateEditor.svelte
+++ b/plugins/task-resources/src/components/state/DoneStateEditor.svelte
@@ -17,7 +17,8 @@
import { Ref } from '@anticrm/core'
import { createQuery } from '@anticrm/presentation'
import { DoneState, SpaceWithStates } from '@anticrm/task'
- import { Label, showPopup } from '@anticrm/ui'
+ import { Label, showPopup, Button } from '@anticrm/ui'
+ import type { ButtonKind, ButtonSize } from '@anticrm/ui'
import DoneStatePresenter from './DoneStatePresenter.svelte'
import DoneStatesPopup from './DoneStatesPopup.svelte'
import task from '../../plugin'
@@ -25,8 +26,13 @@
export let value: Ref
| null | undefined
export let onChange: (value: any) => void
export let space: Ref
+ export let kind: ButtonKind = 'no-border'
+ export let size: ButtonSize = 'small'
+ export let justify: 'left' | 'center' = 'center'
+ export let width: string = 'min-content'
+
let state: DoneState | undefined
- let container: HTMLElement
+ let container: HTMLButtonElement
let opened: boolean = false
const query = createQuery()
@@ -42,10 +48,13 @@
}
- {
+
+
+ {#if state}
+
+ {:else}
+
+ {/if}
+
+
diff --git a/plugins/view-resources/src/components/BooleanEditorPopup.svelte b/plugins/view-resources/src/components/BooleanEditorPopup.svelte
new file mode 100644
index 0000000000..9f3f07c78e
--- /dev/null
+++ b/plugins/view-resources/src/components/BooleanEditorPopup.svelte
@@ -0,0 +1,80 @@
+
+
+
+
+
+
diff --git a/plugins/view-resources/src/components/DateEditor.svelte b/plugins/view-resources/src/components/DateEditor.svelte
index ca908f01eb..0c9c7ddcde 100644
--- a/plugins/view-resources/src/components/DateEditor.svelte
+++ b/plugins/view-resources/src/components/DateEditor.svelte
@@ -21,6 +21,7 @@
export let type: TypeDate | undefined
// export let label: IntlString
export let onChange: (value: any) => void
+ export let kind: 'no-border' | 'link' = 'no-border'
$: withTime = type?.withTime ?? true
@@ -29,6 +30,7 @@
{value}
{withTime}
editable
+ {kind}
on:change={(res) => {
if (res.detail !== undefined) onChange(res.detail)
}}
diff --git a/plugins/view-resources/src/components/NumberEditor.svelte b/plugins/view-resources/src/components/NumberEditor.svelte
index 9c29a1a7f5..cfaeb38905 100644
--- a/plugins/view-resources/src/components/NumberEditor.svelte
+++ b/plugins/view-resources/src/components/NumberEditor.svelte
@@ -15,18 +15,70 @@
-->
-
+{#if kind === 'link'}
+ {
+ if (!shown) {
+ showPopup(
+ StringEditorPopup,
+ { value, format: 'number' },
+ eventToHTMLElement(ev),
+ (res) => {
+ if (res !== undefined) value = res
+ onChange(value)
+ shown = false
+ },
+ (res) => {
+ if (res !== undefined) value = res
+ }
+ )
+ }
+ }}
+ >
+ {#if value}
+ {value}
+ {:else}
+
+ {/if}
+
+{:else}
+
+{/if}
+
+
diff --git a/plugins/view-resources/src/components/StringEditor.svelte b/plugins/view-resources/src/components/StringEditor.svelte
index fbe883dfa7..5b81c0aa23 100644
--- a/plugins/view-resources/src/components/StringEditor.svelte
+++ b/plugins/view-resources/src/components/StringEditor.svelte
@@ -15,7 +15,8 @@
-->
-
+{#if kind === 'link'}
+ {
+ if (!shown) {
+ showPopup(
+ StringEditorPopup,
+ { value },
+ eventToHTMLElement(ev),
+ (res) => {
+ if (res !== undefined) value = res
+ onChange(value)
+ shown = false
+ },
+ (res) => {
+ if (res !== undefined) value = res
+ }
+ )
+ }
+ }}
+ >
+ {#if value}
+ {value}
+ {:else}
+
+ {/if}
+
+{:else}
+
+{/if}
+
+
diff --git a/plugins/view-resources/src/components/StringEditorPopup.svelte b/plugins/view-resources/src/components/StringEditorPopup.svelte
new file mode 100644
index 0000000000..6a5a3bfb19
--- /dev/null
+++ b/plugins/view-resources/src/components/StringEditorPopup.svelte
@@ -0,0 +1,46 @@
+
+
+
+
diff --git a/plugins/workbench-resources/src/components/SpaceHeader.svelte b/plugins/workbench-resources/src/components/SpaceHeader.svelte
index 8f2fc6d6f4..f6635972b2 100644
--- a/plugins/workbench-resources/src/components/SpaceHeader.svelte
+++ b/plugins/workbench-resources/src/components/SpaceHeader.svelte
@@ -75,7 +75,7 @@
async function onSpaceEdit (): Promise {
if (space === undefined) return
const editor = await getEditor(space._class)
- showPanel(editor ?? plugin.component.SpacePanel, space._id, space._class, 'right')
+ showPanel(editor ?? plugin.component.SpacePanel, space._id, space._class, 'content')
}
function updateViewlets (viewlets: WithLookup[]) {
diff --git a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte
index 1c397866c4..8160ad9865 100644
--- a/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte
+++ b/plugins/workbench-resources/src/components/navigator/SpacePanel.svelte
@@ -60,12 +60,14 @@
}}
>
-
-
- {#if clazz.icon}
{/if}
+ {#if clazz}
+
+
+ {#if clazz.icon}{/if}
+
+
-
-
+ {/if}