From 62b3dbec86cd2c073d2ef98e0629e52ccb8fe021 Mon Sep 17 00:00:00 2001 From: Alexander Platov Date: Mon, 30 Aug 2021 10:26:11 +0300 Subject: [PATCH] Create attachments tab (#85) Signed-off-by: Alexander Platov --- packages/theme/styles/_layouts.scss | 9 ++ .../src/components/Attachments.svelte | 99 +++++++++++++++++++ .../src/components/EditCandidate.svelte | 8 ++ plugins/recruit-resources/src/index.ts | 4 +- .../src/components/NavHeader.svelte | 7 +- 5 files changed, 120 insertions(+), 7 deletions(-) create mode 100644 plugins/recruit-resources/src/components/Attachments.svelte diff --git a/packages/theme/styles/_layouts.scss b/packages/theme/styles/_layouts.scss index cc4429d4f3..04b256fd3e 100644 --- a/packages/theme/styles/_layouts.scss +++ b/packages/theme/styles/_layouts.scss @@ -84,6 +84,7 @@ table { } .flex { display: flex; } +.flex-grow { flex-grow: 1; } .flex-nowrap { display: flex; flex-wrap: nowrap; @@ -178,6 +179,13 @@ table { overflow: hidden; white-space: pre-wrap; } +.overflow-label { + flex-grow: 1; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + user-select: none; +} .focused-button { background-color: var(--theme-button-bg-focused); @@ -209,6 +217,7 @@ table { .content-color { color: var(--theme-content-color); } .content-trans-color { color: var(--theme-content-trans-color); } +.content-dark-color { color: var(--theme-content-dark-color); } .caption-color { color: var(--theme-caption-color); } .border-primary-button { border-color: var(--primary-button-border); } diff --git a/plugins/recruit-resources/src/components/Attachments.svelte b/plugins/recruit-resources/src/components/Attachments.svelte new file mode 100644 index 0000000000..b09d80e5b1 --- /dev/null +++ b/plugins/recruit-resources/src/components/Attachments.svelte @@ -0,0 +1,99 @@ + + + + + + {#each files as file} +
+
{file.ext}
+
+
{file.name}
+
{file.description}
+
+
+ {#each file.tags as tag} +
{tag}
+ {/each} +
+
+ {/each} +
+ +
Add attachment
+
+
+ + \ 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 04512b098b..dcc1b4d8ae 100644 --- a/plugins/recruit-resources/src/components/EditCandidate.svelte +++ b/plugins/recruit-resources/src/components/EditCandidate.svelte @@ -57,6 +57,14 @@ object, space } + }, + { + label: 'Attachments', + component: 'recruit:component:Attachments', + props: { + object, + space + } } ] diff --git a/plugins/recruit-resources/src/index.ts b/plugins/recruit-resources/src/index.ts index e87f6f2b48..e3a4b9d882 100644 --- a/plugins/recruit-resources/src/index.ts +++ b/plugins/recruit-resources/src/index.ts @@ -19,6 +19,7 @@ import CreateCandidate from './components/CreateCandidate.svelte' import CreateApplication from './components/CreateApplication.svelte' import EditCandidate from './components/EditCandidate.svelte' import CandidateGeneral from './components/CandidateGeneral.svelte' +import Attachments from './components/Attachments.svelte' export default async () => ({ component: { @@ -27,6 +28,7 @@ export default async () => ({ CreateCandidate, CreateApplication, EditCandidate, - CandidateGeneral + CandidateGeneral, + Attachments }, }) diff --git a/plugins/workbench-resources/src/components/NavHeader.svelte b/plugins/workbench-resources/src/components/NavHeader.svelte index 1e3952ace6..6868e3c9b6 100644 --- a/plugins/workbench-resources/src/components/NavHeader.svelte +++ b/plugins/workbench-resources/src/components/NavHeader.svelte @@ -23,7 +23,7 @@
- {label} + {label}
@@ -36,11 +36,6 @@ height: 4.5rem; .label { - flex-grow: 1; - white-space: nowrap; - text-overflow: ellipsis; - overflow: hidden; - user-select: none; font-weight: 500; font-size: 1rem; color: var(--theme-caption-color);