@widgetic/editor 4.1.13 → 4.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/PreviewChromeControls.svelte +15 -21
- package/dist/components/WidgetPreview.svelte +136 -105
- package/dist/components/color-select/ColorSelect.svelte +203 -224
- package/dist/components/color-select/constants.d.ts +4 -2
- package/dist/components/color-select/constants.js +4 -2
- package/dist/components/color-select/render.js +10 -9
- package/dist/components/editors/CompositionEditorApp.svelte +55 -40
- package/dist/components/editors/EditLeaseNotice.svelte +44 -33
- package/dist/components/editors/EmbedEditor.svelte +133 -259
- package/dist/components/editors/PropsEditor.svelte +426 -1333
- package/dist/components/editors/props-editor.css +5 -68
- package/dist/components/ic/AngleInputController.svelte +202 -277
- package/dist/components/ic/BrowserInputController.svelte +813 -803
- package/dist/components/ic/CheckboxInputController.svelte +92 -169
- package/dist/components/ic/CheckboxInputController.svelte.d.ts +2 -8
- package/dist/components/ic/ColorPickerInputController.svelte +1589 -1587
- package/dist/components/ic/ColorPickerInputController.svelte.d.ts +3 -3
- package/dist/components/ic/DateFieldInputController.svelte +455 -465
- package/dist/components/ic/DatePickerInputController.svelte +355 -368
- package/dist/components/ic/DatePickerInputController.svelte.d.ts +1 -1
- package/dist/components/ic/DropdownInputController.svelte +130 -200
- package/dist/components/ic/FixedPositionInputController.svelte +255 -276
- package/dist/components/ic/FixedPositionInputController.svelte.d.ts +5 -1
- package/dist/components/ic/FontInputController.svelte +2110 -2231
- package/dist/components/ic/FontInputController.svelte.d.ts +11 -11
- package/dist/components/ic/InputControllerHeader.svelte +141 -147
- package/dist/components/ic/InputControllerRenderer.svelte +5 -1
- package/dist/components/ic/InputControllerRenderer.svelte.d.ts +2 -1
- package/dist/components/ic/InputControllerRow.svelte +74 -0
- package/dist/components/ic/InputControllerRow.svelte.d.ts +14 -0
- package/dist/components/ic/KnowledgeDocumentsInputController.svelte +401 -0
- package/dist/components/ic/KnowledgeDocumentsInputController.svelte.d.ts +11 -0
- package/dist/components/ic/KnowledgeTextForm.svelte +109 -0
- package/dist/components/ic/KnowledgeTextForm.svelte.d.ts +15 -0
- package/dist/components/ic/NumberControls.svelte +303 -269
- package/dist/components/ic/NumberControls.svelte.d.ts +4 -1
- package/dist/components/ic/NumberInputController.svelte +361 -301
- package/dist/components/ic/NumberInputController.svelte.d.ts +2 -0
- package/dist/components/ic/PositionInputController.svelte +253 -176
- package/dist/components/ic/PositionInputController.svelte.d.ts +2 -0
- package/dist/components/ic/RadioGroupInputController.svelte +71 -137
- package/dist/components/ic/RadioGroupInputController.svelte.d.ts +2 -8
- package/dist/components/ic/RangeCalendarInputController.svelte +233 -270
- package/dist/components/ic/RangeCalendarInputController.svelte.d.ts +2 -2
- package/dist/components/ic/RoundedCornersInputController.svelte +412 -435
- package/dist/components/ic/RoundedCornersInputController.svelte.d.ts +2 -0
- package/dist/components/ic/SliderInputController.svelte +263 -332
- package/dist/components/ic/SliderInputController.svelte.d.ts +1 -1
- package/dist/components/ic/SliderRangeInputController.svelte +140 -144
- package/dist/components/ic/SliderRangeInputController.svelte.d.ts +3 -3
- package/dist/components/ic/SwitchInputController.svelte +47 -109
- package/dist/components/ic/TagsInputController.svelte +95 -110
- package/dist/components/ic/TextAreaInputController.svelte +1794 -1935
- package/dist/components/ic/TextAreaPreviewInputController.svelte +436 -438
- package/dist/components/ic/TextAreaPreviewInputController.svelte.d.ts +2 -2
- package/dist/components/ic/TextInputController.svelte +65 -75
- package/dist/components/ic/TextInputController.svelte.d.ts +2 -0
- package/dist/components/ic/TimeInputController.svelte +433 -431
- package/dist/components/ic/VectorInputController.svelte +1833 -1831
- package/dist/components/ic/VectorInputController.svelte.d.ts +10 -10
- package/dist/components/ic/index.d.ts +2 -0
- package/dist/components/ic/index.js +2 -0
- package/dist/components/ic/shared/CategoryTabs.svelte +28 -35
- package/dist/components/ic/shared/ItemGrid.svelte +145 -179
- package/dist/components/ic/shared/RecentItemsSection.svelte +208 -271
- package/dist/components/ic/shared/RecentItemsSection.svelte.d.ts +1 -1
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte +23 -38
- package/dist/components/ui/arrows/OpacitySliderArrows.svelte.d.ts +1 -4
- package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte +45 -0
- package/dist/components/ui/calendar-editor-fit/EditorCalendarStyles.svelte.d.ts +26 -0
- package/dist/components/ui/checkerboard-background/CheckerboardBackground.svelte +20 -12
- package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte +39 -0
- package/dist/components/ui/shadow-picker-host/ShadowPickerHost.svelte.d.ts +10 -0
- package/dist/composition/compositionApi.d.ts +21 -1
- package/dist/composition/compositionApi.js +64 -5
- package/dist/composition/knowledgeDocuments.d.ts +90 -0
- package/dist/composition/knowledgeDocuments.js +94 -0
- package/dist/composition/knowledgeDocumentsPanel.d.ts +152 -0
- package/dist/composition/knowledgeDocumentsPanel.js +443 -0
- package/dist/i18n/language.d.ts +86 -36
- package/dist/i18n/messages.d.ts +97 -34
- package/dist/i18n/messages.js +104 -34
- package/dist/i18n/translate.d.ts +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/knowledgeDocumentsContext.d.ts +10 -0
- package/dist/knowledgeDocumentsContext.js +31 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +26 -2
- package/package.json +4 -4
|
@@ -42,10 +42,13 @@
|
|
|
42
42
|
import { createEventDispatcher, onDestroy, onMount, tick } from 'svelte';
|
|
43
43
|
import { get, writable } from 'svelte/store';
|
|
44
44
|
import { createWidgeticMediaLibrary, type MediaLibraryProvider } from '@widgetic/file-browser';
|
|
45
|
+
import { Button } from '@widgetic/design-system/components';
|
|
45
46
|
import type { MessageOverrides } from '@widgetic/design-system/i18n';
|
|
46
47
|
import { shareTextDirection, type TextDirection } from '@widgetic/design-system/components/textDirection';
|
|
47
48
|
import { leftOnThisScreen } from '../../utils/dockPlacement';
|
|
48
49
|
import { provideEditorLanguage } from '../../i18n/language.js';
|
|
50
|
+
import { provideEditorKnowledgeDocuments } from '../../knowledgeDocumentsContext.js';
|
|
51
|
+
import { createKnowledgeDocumentsClient } from '../../composition/knowledgeDocuments.js';
|
|
49
52
|
import type { PartnerPickFileFn } from '../../pickFileContext.js';
|
|
50
53
|
import type { StoreFileUrlFn } from '../../fileStorageUrlContext.js';
|
|
51
54
|
import PropsEditor from './PropsEditor.svelte';
|
|
@@ -177,6 +180,12 @@
|
|
|
177
180
|
apiBasePath,
|
|
178
181
|
getAccessToken: (reason, refusedToken) => getAccessToken(reason, refusedToken)
|
|
179
182
|
});
|
|
183
|
+
|
|
184
|
+
// The Documents panel of AI Answers sits deep inside the settings editor and is drawn from a schema, so the calls that list,
|
|
185
|
+
// add and remove the documents of THIS composition reach it through a context instead of through props. They go through the
|
|
186
|
+
// same client as the saves, so they ask for a new token the same way when one is refused.
|
|
187
|
+
const knowledgeDocuments = createKnowledgeDocumentsClient(api, compositionId);
|
|
188
|
+
provideEditorKnowledgeDocuments(() => knowledgeDocuments);
|
|
180
189
|
const controller = new CompositionEditorController({
|
|
181
190
|
compositionId,
|
|
182
191
|
api,
|
|
@@ -626,43 +635,46 @@
|
|
|
626
635
|
|
|
627
636
|
{#if state.phase === 'failed' && state.loadError}
|
|
628
637
|
<!-- Nothing can be shown behind this one (no composition, so no editor and no preview), so it sits in the middle. -->
|
|
638
|
+
<!-- The notices of the editor (this one, loading, the schemas and the save error) are the cards of the Figma Composition Pages page: radius 12, 16 padding, a 1px border and no shadow. -->
|
|
629
639
|
<div
|
|
630
640
|
role="alert"
|
|
631
|
-
class="composition-editor-error absolute left-1/2 top-1/2 z-30 flex w-max max-w-sm -translate-x-1/2 -translate-y-1/2 flex-col gap-
|
|
641
|
+
class="composition-editor-error absolute left-1/2 top-1/2 z-30 flex w-max max-w-sm -translate-x-1/2 -translate-y-1/2 flex-col gap-3 rounded-xl border border-border bg-background p-4"
|
|
632
642
|
>
|
|
633
|
-
<p class="text-
|
|
634
|
-
<
|
|
635
|
-
|
|
636
|
-
class="retry-load-btn w-fit
|
|
637
|
-
|
|
643
|
+
<p class="text-body text-destructive">{failureMessage(state.loadError, 'load', $t)}</p>
|
|
644
|
+
<Button
|
|
645
|
+
size="sm"
|
|
646
|
+
class="retry-load-btn w-fit"
|
|
647
|
+
onclick={() => {
|
|
638
648
|
void controller.load();
|
|
639
649
|
}}
|
|
640
650
|
>
|
|
641
651
|
{$t('editor.app.tryAgain')}
|
|
642
|
-
</
|
|
652
|
+
</Button>
|
|
643
653
|
</div>
|
|
644
654
|
{:else if state.phase !== 'ready' || state.schemasLoading}
|
|
645
655
|
<div
|
|
646
656
|
role="status"
|
|
647
|
-
class="composition-editor-loading absolute z-30 rounded-
|
|
657
|
+
class="composition-editor-loading absolute z-30 rounded-xl border border-border bg-background px-4 py-3 text-body text-muted-foreground {loadingCardPosition}"
|
|
648
658
|
>
|
|
649
659
|
{$t('editor.app.loading')}
|
|
650
660
|
</div>
|
|
651
661
|
{:else if state.schemasError}
|
|
652
662
|
<div
|
|
653
663
|
role="alert"
|
|
654
|
-
class="composition-editor-error absolute start-4 top-4 z-30 flex max-w-sm flex-col gap-
|
|
664
|
+
class="composition-editor-error absolute start-4 top-4 z-30 flex max-w-sm flex-col gap-3 rounded-xl border border-border bg-background p-4"
|
|
655
665
|
>
|
|
656
|
-
<span class="text-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
666
|
+
<span class="text-body text-destructive">{state.schemasError}</span>
|
|
667
|
+
<!-- Outline, not the main style: the settings panel (when it is back) has the main action of the editor. -->
|
|
668
|
+
<Button
|
|
669
|
+
size="sm"
|
|
670
|
+
variant="outline"
|
|
671
|
+
class="retry-schemas-btn w-fit"
|
|
672
|
+
onclick={() => {
|
|
661
673
|
void controller.reloadSchemas();
|
|
662
674
|
}}
|
|
663
675
|
>
|
|
664
676
|
{$t('editor.app.retry')}
|
|
665
|
-
</
|
|
677
|
+
</Button>
|
|
666
678
|
</div>
|
|
667
679
|
{:else if schemasAvailable}
|
|
668
680
|
<!--
|
|
@@ -704,13 +716,14 @@
|
|
|
704
716
|
person chooses a version. Each choice says what it does to the other version: keeping the edits replaces the newer one, and
|
|
705
717
|
using the newer one drops the edits. (It takes the place of the save error: no save is made while this is on the screen.)
|
|
706
718
|
-->
|
|
719
|
+
<!-- A "Choice Card" of the Figma Composition Pages page, as the card of a teammate editing (see `EditLeaseNotice`). -->
|
|
707
720
|
<div
|
|
708
721
|
role="alert"
|
|
709
|
-
class="composition-editor-conflict absolute bottom-4 start-4 z-30 flex max-w-sm flex-col gap-3 rounded-
|
|
722
|
+
class="composition-editor-conflict absolute bottom-4 start-4 z-30 flex max-w-sm flex-col gap-3 rounded-xl border border-border bg-background p-4"
|
|
710
723
|
>
|
|
711
724
|
<div class="flex flex-col gap-1">
|
|
712
|
-
<p class="text-
|
|
713
|
-
<p class="text-
|
|
725
|
+
<p class="text-body-medium text-foreground">{$t('editor.conflict.title')}</p>
|
|
726
|
+
<p class="text-body text-muted-foreground">
|
|
714
727
|
{#if state.conflict.lastEditedBy?.name}
|
|
715
728
|
{$t('editor.conflict.bodyNamed', { name: state.conflict.lastEditedBy.name })}
|
|
716
729
|
{:else}
|
|
@@ -719,61 +732,63 @@
|
|
|
719
732
|
</p>
|
|
720
733
|
</div>
|
|
721
734
|
{#if state.conflict.resolveError}
|
|
722
|
-
<p class="composition-editor-conflict-error text-
|
|
735
|
+
<p class="composition-editor-conflict-error text-caption text-destructive">
|
|
723
736
|
{state.conflict.resolveError.sessionEnded
|
|
724
737
|
? failureMessage(state.conflict.resolveError, 'save', $t)
|
|
725
738
|
: $t('editor.conflict.resolveFailed')}
|
|
726
739
|
</p>
|
|
727
740
|
{/if}
|
|
728
741
|
{#if state.conflict.resolving}
|
|
729
|
-
<p role="status" class="composition-editor-conflict-working text-
|
|
742
|
+
<p role="status" class="composition-editor-conflict-working text-caption text-muted-foreground">
|
|
730
743
|
{$t('editor.conflict.working')}
|
|
731
744
|
</p>
|
|
732
745
|
{/if}
|
|
733
|
-
<div class="flex flex-col gap-
|
|
746
|
+
<div class="flex flex-col gap-3">
|
|
734
747
|
<div class="flex flex-col items-start gap-1">
|
|
735
|
-
<
|
|
736
|
-
|
|
748
|
+
<Button
|
|
749
|
+
size="sm"
|
|
750
|
+
class="keep-my-changes-btn"
|
|
737
751
|
disabled={state.conflict.resolving}
|
|
738
|
-
|
|
739
|
-
on:click={() => {
|
|
752
|
+
onclick={() => {
|
|
740
753
|
void controller.keepMyChanges();
|
|
741
754
|
}}
|
|
742
755
|
>
|
|
743
756
|
{$t('editor.conflict.keepMine')}
|
|
744
|
-
</
|
|
745
|
-
<span class="text-
|
|
757
|
+
</Button>
|
|
758
|
+
<span class="text-caption text-muted-foreground">{$t('editor.conflict.keepMineHint')}</span>
|
|
746
759
|
</div>
|
|
747
760
|
<div class="flex flex-col items-start gap-1">
|
|
748
|
-
<
|
|
749
|
-
|
|
761
|
+
<Button
|
|
762
|
+
size="sm"
|
|
763
|
+
variant="outline"
|
|
764
|
+
class="load-latest-btn"
|
|
750
765
|
disabled={state.conflict.resolving}
|
|
751
|
-
|
|
752
|
-
on:click={() => {
|
|
766
|
+
onclick={() => {
|
|
753
767
|
void controller.loadLatestVersion();
|
|
754
768
|
}}
|
|
755
769
|
>
|
|
756
770
|
{$t('editor.conflict.loadLatest')}
|
|
757
|
-
</
|
|
758
|
-
<span class="text-
|
|
771
|
+
</Button>
|
|
772
|
+
<span class="text-caption text-muted-foreground">{$t('editor.conflict.loadLatestHint')}</span>
|
|
759
773
|
</div>
|
|
760
774
|
</div>
|
|
761
775
|
</div>
|
|
762
776
|
{:else if state.phase === 'ready' && state.saveError}
|
|
763
777
|
<div
|
|
764
778
|
role="alert"
|
|
765
|
-
class="composition-editor-save-error absolute bottom-4 start-4 z-30 flex max-w-sm flex-col gap-
|
|
779
|
+
class="composition-editor-save-error absolute bottom-4 start-4 z-30 flex max-w-sm flex-col gap-3 rounded-xl border border-border bg-background p-4"
|
|
766
780
|
>
|
|
767
|
-
<p class="text-
|
|
768
|
-
<
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
781
|
+
<p class="text-body text-destructive">{failureMessage(state.saveError, 'save', $t)}</p>
|
|
782
|
+
<Button
|
|
783
|
+
size="sm"
|
|
784
|
+
variant="outline"
|
|
785
|
+
class="retry-save-btn w-fit"
|
|
786
|
+
onclick={() => {
|
|
772
787
|
void controller.save('manual');
|
|
773
788
|
}}
|
|
774
789
|
>
|
|
775
790
|
{$t('editor.app.tryAgain')}
|
|
776
|
-
</
|
|
791
|
+
</Button>
|
|
777
792
|
</div>
|
|
778
793
|
{/if}
|
|
779
794
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
* `startEditing`); the editor decides what they do. Every word is in the editor's catalog (`editor.presence.*`).
|
|
14
14
|
*/
|
|
15
15
|
import { createEventDispatcher } from 'svelte';
|
|
16
|
+
import { Button } from '@widgetic/design-system/components';
|
|
16
17
|
import { useEditorLanguage } from '../../i18n/language';
|
|
17
18
|
import type { PresenceState } from '../../composition/editLeaseController.js';
|
|
18
19
|
|
|
@@ -60,91 +61,101 @@
|
|
|
60
61
|
|
|
61
62
|
{#if presence.phase === 'blocked'}
|
|
62
63
|
<!-- A choice is waiting, so the settings and the preview are covered until the person makes it. -->
|
|
64
|
+
<!-- The card is the "Choice Card" of the Composition Pages page in Figma: 384 wide, 16 padding, radius 12, a 1px border and no shadow. -->
|
|
63
65
|
<div
|
|
64
|
-
class="composition-editor-presence-veil absolute inset-0 z-30 flex items-center justify-center bg-
|
|
66
|
+
class="composition-editor-presence-veil absolute inset-0 z-30 flex items-center justify-center bg-background/60 p-4"
|
|
65
67
|
>
|
|
66
68
|
<div
|
|
67
69
|
role="alert"
|
|
68
|
-
class="composition-editor-presence flex w-full max-w-sm flex-col gap-3 rounded-
|
|
70
|
+
class="composition-editor-presence flex w-full max-w-sm flex-col gap-3 rounded-xl border border-border bg-background p-4"
|
|
69
71
|
>
|
|
70
72
|
<div class="flex flex-col gap-1">
|
|
71
|
-
<p class="composition-editor-presence-title break-words text-
|
|
73
|
+
<p class="composition-editor-presence-title break-words text-body-medium text-foreground">
|
|
72
74
|
{cardTitle}
|
|
73
75
|
</p>
|
|
74
|
-
<p class="text-
|
|
76
|
+
<p class="text-body text-muted-foreground">{cardBody}</p>
|
|
75
77
|
</div>
|
|
76
78
|
{#if presence.actionFailed}
|
|
77
|
-
<p class="composition-editor-presence-error text-
|
|
79
|
+
<p class="composition-editor-presence-error text-caption text-destructive">
|
|
78
80
|
{$t('editor.presence.actionFailed')}
|
|
79
81
|
</p>
|
|
80
82
|
{/if}
|
|
81
83
|
{#if presence.working}
|
|
82
|
-
<p
|
|
84
|
+
<p
|
|
85
|
+
role="status"
|
|
86
|
+
class="composition-editor-presence-working text-caption text-muted-foreground"
|
|
87
|
+
>
|
|
83
88
|
{$t('editor.presence.working')}
|
|
84
89
|
</p>
|
|
85
90
|
{/if}
|
|
86
|
-
<div class="flex flex-col gap-
|
|
91
|
+
<div class="flex flex-col gap-3">
|
|
87
92
|
<div class="flex flex-col items-start gap-1">
|
|
88
|
-
<
|
|
89
|
-
|
|
93
|
+
<Button
|
|
94
|
+
size="sm"
|
|
95
|
+
class="take-over-btn"
|
|
90
96
|
disabled={presence.working}
|
|
91
|
-
|
|
92
|
-
on:click={() => dispatch('takeOver')}
|
|
97
|
+
onclick={() => dispatch('takeOver')}
|
|
93
98
|
>
|
|
94
99
|
{$t('editor.presence.takeOver')}
|
|
95
|
-
</
|
|
96
|
-
<span class="text-
|
|
100
|
+
</Button>
|
|
101
|
+
<span class="text-caption text-muted-foreground"
|
|
102
|
+
>{$t('editor.presence.takeOverHint')}</span
|
|
103
|
+
>
|
|
97
104
|
</div>
|
|
98
105
|
<div class="flex flex-col items-start gap-1">
|
|
99
|
-
<
|
|
100
|
-
|
|
106
|
+
<Button
|
|
107
|
+
size="sm"
|
|
108
|
+
variant="outline"
|
|
109
|
+
class="look-only-btn"
|
|
101
110
|
disabled={presence.working}
|
|
102
|
-
|
|
103
|
-
on:click={() => dispatch('lookOnly')}
|
|
111
|
+
onclick={() => dispatch('lookOnly')}
|
|
104
112
|
>
|
|
105
113
|
{$t('editor.presence.lookOnly')}
|
|
106
|
-
</
|
|
107
|
-
<span class="text-
|
|
114
|
+
</Button>
|
|
115
|
+
<span class="text-caption text-muted-foreground"
|
|
116
|
+
>{$t('editor.presence.lookOnlyHint')}</span
|
|
117
|
+
>
|
|
108
118
|
</div>
|
|
109
119
|
</div>
|
|
110
120
|
</div>
|
|
111
121
|
</div>
|
|
112
122
|
{:else if presence.phase === 'readOnly'}
|
|
123
|
+
<!-- The bar is the "Presence Bar" of the Composition Pages page in Figma: radius 12, a 1px border, 16 at the start and 8 at the end. -->
|
|
113
124
|
<div
|
|
114
125
|
role="status"
|
|
115
|
-
class="composition-editor-presence-bar absolute bottom-4 left-1/2 z-30 flex w-max max-w-[calc(100%-2rem)] -translate-x-1/2 flex-wrap items-center justify-center gap-x-3 gap-y-1 rounded-
|
|
126
|
+
class="composition-editor-presence-bar absolute bottom-4 left-1/2 z-30 flex w-max max-w-[calc(100%-2rem)] -translate-x-1/2 flex-wrap items-center justify-center gap-x-3 gap-y-1 rounded-xl border border-border bg-background py-2 pe-2 ps-4"
|
|
116
127
|
>
|
|
117
|
-
<span class="composition-editor-presence-bar-text break-words text-
|
|
128
|
+
<span class="composition-editor-presence-bar-text break-words text-body text-foreground"
|
|
118
129
|
>{barText}</span
|
|
119
130
|
>
|
|
120
131
|
{#if presence.actionFailed}
|
|
121
|
-
<span class="composition-editor-presence-error text-
|
|
132
|
+
<span class="composition-editor-presence-error text-caption text-destructive">
|
|
122
133
|
{$t('editor.presence.actionFailed')}
|
|
123
134
|
</span>
|
|
124
135
|
{/if}
|
|
125
136
|
{#if presence.working}
|
|
126
|
-
<span class="composition-editor-presence-working text-
|
|
137
|
+
<span class="composition-editor-presence-working text-caption text-muted-foreground">
|
|
127
138
|
{$t('editor.presence.working')}
|
|
128
139
|
</span>
|
|
129
140
|
{/if}
|
|
130
141
|
{#if presence.nobodyIsEditing}
|
|
131
|
-
<
|
|
132
|
-
|
|
142
|
+
<Button
|
|
143
|
+
size="sm"
|
|
144
|
+
class="start-editing-btn"
|
|
133
145
|
disabled={presence.working}
|
|
134
|
-
|
|
135
|
-
on:click={() => dispatch('startEditing')}
|
|
146
|
+
onclick={() => dispatch('startEditing')}
|
|
136
147
|
>
|
|
137
148
|
{$t('editor.presence.startEditing')}
|
|
138
|
-
</
|
|
149
|
+
</Button>
|
|
139
150
|
{:else}
|
|
140
|
-
<
|
|
141
|
-
|
|
151
|
+
<Button
|
|
152
|
+
size="sm"
|
|
153
|
+
class="take-over-btn"
|
|
142
154
|
disabled={presence.working}
|
|
143
|
-
|
|
144
|
-
on:click={() => dispatch('takeOver')}
|
|
155
|
+
onclick={() => dispatch('takeOver')}
|
|
145
156
|
>
|
|
146
157
|
{$t('editor.presence.takeOver')}
|
|
147
|
-
</
|
|
158
|
+
</Button>
|
|
148
159
|
{/if}
|
|
149
160
|
</div>
|
|
150
161
|
{/if}
|