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}
{/if}
@@ -116,8 +120,10 @@
{#if isPublic}
You are currently viewing a group.
{/if}
- {#if err}
- {err}
+ {#if notOwnSystem}
+ This group does not belong to your system, did you mean to look up it's public page?
+ {:else if err}
+ {@html err}
{:else if loading}
{:else if group && group.id}
diff --git a/src/pages/Member.svelte b/src/pages/Member.svelte
index 69f72d0c..14e3f742 100644
--- a/src/pages/Member.svelte
+++ b/src/pages/Member.svelte
@@ -24,6 +24,7 @@
let systemMembers: Member[] = [];
let isMainDash = false;
let isDeleted = false;
+ let notOwnSystem = false;
const isPage = true;
export let isPublic = true;
@@ -46,7 +47,10 @@
async function fetchMember() {
try {
member = await api().members($params.id).get({auth: !isPublic});
- if (!isPublic && !member.privacy) throw new Error("This member does not belong to your system, did you mean to look up their public page?")
+ if (!isPublic && !member.privacy) {
+ notOwnSystem = true;
+ throw new Error("Member is not from own system.");
+ }
err = "";
loading = false;
groupLoading = true;
@@ -102,10 +106,10 @@
}
-{#if settings && settings.appearance.color_background}
+{#if settings && settings.appearance.color_background && !notOwnSystem}
{/if}
-{#if member && member.banner && ((settings && settings.appearance.banner_top))}
+{#if member && member.banner && settings && settings.appearance.banner_top && !notOwnSystem}
{/if}
@@ -117,8 +121,10 @@
{#if isPublic}
You are currently viewing a member.
{/if}
- {#if err}
- {err}
+ {#if notOwnSystem}
+ This member does not belong to your system, did you mean to look up their public page?
+ {:else if err}
+ {@html err}
{:else if loading}
{:else if member && member.id}