From 8eaa66e7f74198a225cf4e07f70cdb2267741ca3 Mon Sep 17 00:00:00 2001 From: Fulmine Date: Sat, 19 Mar 2022 17:22:50 +0100 Subject: [PATCH] link to profile when member/group is not from own system --- src/pages/Group.svelte | 16 +++++++++++----- src/pages/Member.svelte | 16 +++++++++++----- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/src/pages/Group.svelte b/src/pages/Group.svelte index 56a67ec9..62fbe20e 100644 --- a/src/pages/Group.svelte +++ b/src/pages/Group.svelte @@ -23,6 +23,7 @@ let systemMembers: Group[] = []; let isMainDash = false; let isDeleted = false; + let notOwnSystem = false; const isPage = true; export let isPublic = true; @@ -45,7 +46,10 @@ async function fetchGroup() { try { group = await api().groups($params.id).get({auth: !isPublic}); - if (!isPublic && !group.privacy) throw new Error("This group does not belong to your system, did you mean to look up their public page?") + if (!isPublic && !group.privacy) { + notOwnSystem = true; + throw new Error("Group is not from own system."); + } err = ""; loading = false; memberLoading = true; @@ -101,10 +105,10 @@ } -{#if settings && settings.appearance.color_background} +{#if settings && settings.appearance.color_background && !notOwnSystem}
{/if} -{#if group && group.banner && ((settings && settings.appearance.banner_top))} +{#if group && group.banner && settings && settings.appearance.banner_top && !notOwnSystem}