From 4fd981b3039f066d17a19c1ea2e561c503f2d558 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Mon, 4 Oct 2021 17:32:27 +0300 Subject: [PATCH] Add AttributesBar, YesNoPresenter (#230) Signed-off-by: Alexander Platov --- packages/panel/src/components/Panel.svelte | 2 +- packages/theme/styles/_layouts.scss | 3 + .../src/components/AttributesBar.svelte | 71 +++++++++++++++++++ .../src/components/EditCandidate.svelte | 6 +- .../src/components/YesNoPresenter.svelte | 56 +++++++++++++++ .../src/components/icons/Location.svelte | 27 +++++++ 6 files changed, 162 insertions(+), 3 deletions(-) create mode 100644 plugins/recruit-resources/src/components/AttributesBar.svelte create mode 100644 plugins/recruit-resources/src/components/YesNoPresenter.svelte create mode 100644 plugins/recruit-resources/src/components/icons/Location.svelte diff --git a/packages/panel/src/components/Panel.svelte b/packages/panel/src/components/Panel.svelte index f1323dc1e1..4525bacf33 100644 --- a/packages/panel/src/components/Panel.svelte +++ b/packages/panel/src/components/Panel.svelte @@ -168,7 +168,7 @@ flex-shrink: 0; padding: 0 2rem; height: 3.5rem; - border-bottom: 1px solid var(--theme-card-divider); + border-bottom: 1px solid var(--theme-bg-accent-hover); } } diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index 0eb8898d21..f2ac4442f8 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -135,6 +135,7 @@ table { align-items: stretch; } +.relative { position: relative; } .abs-lt-content { position: absolute; top: var(--modal-padding); @@ -180,6 +181,7 @@ table { height: 1.715em; } +/* Text */ .hidden-text { position: absolute; visibility: hidden; @@ -193,6 +195,7 @@ table { overflow: hidden; user-select: none; } +.small-text { font-size: .75rem; } .focused-button { background-color: var(--theme-button-bg-focused); diff --git a/plugins/recruit-resources/src/components/AttributesBar.svelte b/plugins/recruit-resources/src/components/AttributesBar.svelte new file mode 100644 index 0000000000..87e6fb0ded --- /dev/null +++ b/plugins/recruit-resources/src/components/AttributesBar.svelte @@ -0,0 +1,71 @@ + + + + +
+
+ + {#if !minimize} +
+
+ {/if} +
+
+
+
+
+
+ + \ No newline at end of file diff --git a/plugins/recruit-resources/src/components/EditCandidate.svelte b/plugins/recruit-resources/src/components/EditCandidate.svelte index 7ebbb0bf52..03155dc36f 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -27,6 +27,7 @@ import Attachments from './Attachments.svelte' import Edit from './icons/Edit.svelte' import SocialEditor from './SocialEditor.svelte' + import AttributesBar from './AttributesBar.svelte' import chunter from '@anticrm/chunter' @@ -63,12 +64,13 @@ {#if object !== undefined} { dispatch('close') }}> - + +
diff --git a/plugins/recruit-resources/src/components/YesNoPresenter.svelte b/plugins/recruit-resources/src/components/YesNoPresenter.svelte new file mode 100644 index 0000000000..dfe9ef3e3d --- /dev/null +++ b/plugins/recruit-resources/src/components/YesNoPresenter.svelte @@ -0,0 +1,56 @@ + + + + +
{ + if (state === 'yes') state = 'no' + else if (state === 'no') state = 'unknown' + else state = 'yes' +}}> + + + {#if state === 'yes'} + + {:else if state === 'no'} + + {:else} + + {/if} + + +
+ + diff --git a/plugins/recruit-resources/src/components/icons/Location.svelte b/plugins/recruit-resources/src/components/icons/Location.svelte new file mode 100644 index 0000000000..7653bfeca2 --- /dev/null +++ b/plugins/recruit-resources/src/components/icons/Location.svelte @@ -0,0 +1,27 @@ + + + + + + + + + +