From 808854169af13a68c51a5c82cbc75ff53e402260 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Wed, 1 Sep 2021 10:46:05 +0300 Subject: [PATCH] Add SocialEditor (#113) Signed-off-by: Alexander Platov --- .../ui/src/components/CircleButton.svelte | 3 +- .../src/components/DialogHeader.svelte | 6 +- .../src/components/SocialEditor.svelte | 61 +++++++++++++++++++ 3 files changed, 67 insertions(+), 3 deletions(-) create mode 100644 plugins/recruit-resources/src/components/SocialEditor.svelte diff --git a/packages/ui/src/components/CircleButton.svelte b/packages/ui/src/components/CircleButton.svelte index 8675793a84..4d1ac48b3c 100644 --- a/packages/ui/src/components/CircleButton.svelte +++ b/packages/ui/src/components/CircleButton.svelte @@ -21,7 +21,7 @@ export let icon: Asset | AnySvelteComponent -
+
{#if typeof (icon) === 'string'} @@ -46,6 +46,7 @@ .content { transform-origin: center center; transform: scale(.75); + pointer-events: none; } &:hover { diff --git a/plugins/recruit-resources/src/components/DialogHeader.svelte b/plugins/recruit-resources/src/components/DialogHeader.svelte index 57e12dbb54..3f3cf20e93 100644 --- a/plugins/recruit-resources/src/components/DialogHeader.svelte +++ b/plugins/recruit-resources/src/components/DialogHeader.svelte @@ -19,13 +19,15 @@ import type { Ref, Space, Doc } from '@anticrm/core' import { generateId } from '@anticrm/core' - import { EditBox, Button, CircleButton, Grid, Label, showModal, Link } from '@anticrm/ui' + import { EditBox, Button, CircleButton, Grid, Label, showModal, Link, showPopup } from '@anticrm/ui' + import type { AnyComponent } from '@anticrm/ui' import AvatarEditor from './AvatarEditor.svelte' import FileIcon from './icons/File.svelte' import FileUpload from './icons/FileUpload.svelte' import Edit from './icons/Edit.svelte' import Twitter from './icons/Twitter.svelte' import User from './icons/User.svelte' + import SocialEditor from './SocialEditor.svelte' import { uploadFile } from '../utils' import { Candidate } from '@anticrm/recruit' @@ -124,7 +126,7 @@
- + showPopup(SocialEditor, {}, ev.target)} />
diff --git a/plugins/recruit-resources/src/components/SocialEditor.svelte b/plugins/recruit-resources/src/components/SocialEditor.svelte new file mode 100644 index 0000000000..52b574b9c6 --- /dev/null +++ b/plugins/recruit-resources/src/components/SocialEditor.svelte @@ -0,0 +1,61 @@ + + + + + + +