From 7553cda85b1a39c2ed3aa2bfdd4b981699af2c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Jaenisch?= Date: Tue, 18 Jun 2024 08:37:13 +0200 Subject: [PATCH] feat: display Repositories on Profile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When looking at the Memorandum of Understanding I realised that I should display repositories instead of projects. So I reused the new component to do just that. I could not use a list here, because I need spacing between the elements. If I were to apply Flexbox to lists it would change their semantics. But plain divs lack all kinds of semantics. I went with the next best thing and picked a section as container. Signed-off-by: André Jaenisch --- src/lib/components/templates/Profile.svelte | 15 ++++++++++++++- src/lib/i18n/locales/bg.json | 3 +++ src/lib/i18n/locales/de.json | 3 +++ src/lib/i18n/locales/en.json | 3 +++ src/lib/i18n/locales/he.json | 3 +++ src/lib/i18n/locales/pl.json | 3 +++ 6 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/lib/components/templates/Profile.svelte b/src/lib/components/templates/Profile.svelte index e2de1c8..1f47e2f 100644 --- a/src/lib/components/templates/Profile.svelte +++ b/src/lib/components/templates/Profile.svelte @@ -98,7 +98,7 @@ You should have received a copy of the GNU Affero General Public License along w -
+
@@ -123,6 +123,19 @@ You should have received a copy of the GNU Affero General Public License along w {/if} {/each} + +

+ {$_('page.profile.repositories.heading')} +

+
+ {#each data.user.followingsMap as following} + {#if following.type === 'Repository'} +
+ +
+ {/if} + {/each} +

The following is DEBUG information and will be removed in the near future.

{#if data?.user} diff --git a/src/lib/i18n/locales/bg.json b/src/lib/i18n/locales/bg.json index 36f28c9..579a14b 100644 --- a/src/lib/i18n/locales/bg.json +++ b/src/lib/i18n/locales/bg.json @@ -82,6 +82,9 @@ "add_or_import": "", "empty": "", "heading": "" + }, + "repositories": { + "heading": "" } }, "projects": { diff --git a/src/lib/i18n/locales/de.json b/src/lib/i18n/locales/de.json index 0a43fcf..5b02188 100644 --- a/src/lib/i18n/locales/de.json +++ b/src/lib/i18n/locales/de.json @@ -82,6 +82,9 @@ "add_or_import": "{addElementOpen}Ein Projekt hinzufügen{addElementClose} oder {importElementOpen}Ein Projekt importieren{importElementClose}.", "empty": "Bisher keine Projekte hinzugefügt.", "heading": "Projekte" + }, + "repositories": { + "heading": "" } }, "projects": { diff --git a/src/lib/i18n/locales/en.json b/src/lib/i18n/locales/en.json index e0997f7..4e45fcc 100644 --- a/src/lib/i18n/locales/en.json +++ b/src/lib/i18n/locales/en.json @@ -82,6 +82,9 @@ "add_or_import": "{addElementOpen}Add a project{addElementClose} or {importElementOpen}import a project{importElementClose}.", "empty": "No projects added yet.", "heading": "Projects" + }, + "repositories": { + "heading": "Repositories" } }, "projects": { diff --git a/src/lib/i18n/locales/he.json b/src/lib/i18n/locales/he.json index f9b46ed..9b0e88c 100644 --- a/src/lib/i18n/locales/he.json +++ b/src/lib/i18n/locales/he.json @@ -82,6 +82,9 @@ "add_or_import": "", "empty": "עדיין אין כאן פרוייקטים.", "heading": "פרויקטים" + }, + "repositories": { + "heading": "" } }, "projects": { diff --git a/src/lib/i18n/locales/pl.json b/src/lib/i18n/locales/pl.json index 56acc33..74aaeac 100644 --- a/src/lib/i18n/locales/pl.json +++ b/src/lib/i18n/locales/pl.json @@ -77,6 +77,9 @@ "add_or_import": "{addElementOpen}Dodaj{addElementClose} lub {importElementOpen}zaimportuj projekt{importElementClose}.", "empty": "Nie dodano jeszcze żadnego projektu.", "heading": "Projekty" + }, + "repositories": { + "heading": "" } }, "projects": {