From 98d48e3594c7bd2dad319fbe66693de15f462bce Mon Sep 17 00:00:00 2001 From: Tim Haasdyk Date: Thu, 2 May 2024 15:20:42 +0200 Subject: [PATCH] Add help links --- .../ProjectConfidentialityCombobox.svelte | 1 + .../ProjectConfidentialityFilterSelect.svelte | 3 +- .../components/Projects/ProjectFilter.svelte | 7 ++++- .../src/lib/components/help/SupHelp.svelte | 12 +++++++ frontend/src/lib/components/help/index.ts | 12 +++++++ frontend/src/lib/forms/FormField.svelte | 6 ++++ frontend/src/lib/forms/Select.svelte | 4 ++- frontend/src/lib/i18n/locales/en.json | 6 ++-- frontend/src/lib/layout/AppMenu.svelte | 9 ++++++ frontend/src/lib/layout/Layout.svelte | 6 ++++ .../routes/(authenticated)/admin/+page.svelte | 31 ++++++++++++++----- .../[project_code]/AddProjectMember.svelte | 6 +++- .../BulkAddProjectMembers.svelte | 6 +++- 13 files changed, 94 insertions(+), 15 deletions(-) create mode 100644 frontend/src/lib/components/help/SupHelp.svelte create mode 100644 frontend/src/lib/components/help/index.ts diff --git a/frontend/src/lib/components/Projects/ProjectConfidentialityCombobox.svelte b/frontend/src/lib/components/Projects/ProjectConfidentialityCombobox.svelte index 8e44e0784..c761d02e8 100644 --- a/frontend/src/lib/components/Projects/ProjectConfidentialityCombobox.svelte +++ b/frontend/src/lib/components/Projects/ProjectConfidentialityCombobox.svelte @@ -10,6 +10,7 @@ import { Select } from '$lib/forms'; import t, { type I18nKey } from '$lib/i18n'; + import { helpLinks } from '../help'; import type { Confidentiality } from './ProjectFilter.svelte'; // eslint-disable-next-line @typescript-eslint/no-redundant-type-constituents -- false positive @@ -13,7 +14,7 @@
- {#each Object.entries(options) as [value, label]} diff --git a/frontend/src/lib/components/Projects/ProjectFilter.svelte b/frontend/src/lib/components/Projects/ProjectFilter.svelte index 6096a59aa..04ff9b8c6 100644 --- a/frontend/src/lib/components/Projects/ProjectFilter.svelte +++ b/frontend/src/lib/components/Projects/ProjectFilter.svelte @@ -47,6 +47,8 @@ import t from '$lib/i18n'; import IconButton from '../IconButton.svelte'; import ProjectConfidentialityFilterSelect from './ProjectConfidentialityFilterSelect.svelte'; + import SupHelp from '../help/SupHelp.svelte'; + import { helpLinks } from '../help'; type Filters = Partial & Pick; export let filters: Writable; @@ -157,7 +159,10 @@