From 8113c83828db08f5fdd51c705fa6dfebf9b157ff Mon Sep 17 00:00:00 2001 From: Draconizations Date: Mon, 30 May 2022 10:01:36 +0200 Subject: [PATCH] featI(dashboard): dynamic titles on member/group pages --- dashboard/src/pages/Group.svelte | 9 +++++++++ dashboard/src/pages/Member.svelte | 12 +++++++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/dashboard/src/pages/Group.svelte b/dashboard/src/pages/Group.svelte index b856df18..5f74b71c 100644 --- a/dashboard/src/pages/Group.svelte +++ b/dashboard/src/pages/Group.svelte @@ -43,6 +43,8 @@ fetchGroup(); }); + let title = isPublic ? "group" : "group (dash)"; + async function fetchGroup() { try { group = await api().groups($params.id).get({auth: !isPublic}); @@ -52,6 +54,9 @@ } err = ""; loading = false; + if (group.name) { + title = isPublic ? group.name : `${group.name} (dash)`; + } memberLoading = true; await new Promise(resolve => setTimeout(resolve, 1000)); fetchMembers(); @@ -237,3 +242,7 @@ } + + PluralKit | {title} + + diff --git a/dashboard/src/pages/Member.svelte b/dashboard/src/pages/Member.svelte index 17a51307..e6e90a10 100644 --- a/dashboard/src/pages/Member.svelte +++ b/dashboard/src/pages/Member.svelte @@ -44,6 +44,8 @@ fetchMember(); }); + let title = isPublic ? "member" : "member (dash)"; + async function fetchMember() { try { member = await api().members($params.id).get({auth: !isPublic}); @@ -53,6 +55,9 @@ } err = ""; loading = false; + if (member.name) { + title = isPublic ? member.name : `${member.name} (dash)`; + } groupLoading = true; await new Promise(resolve => setTimeout(resolve, 1000)); fetchGroups(); @@ -104,6 +109,7 @@ groups = groups.filter(group => group.id !== event.detail); systemGroups = systemGroups.filter(group => group.id !== event.detail); } + {#if settings && settings.appearance.color_background && !notOwnSystem} @@ -241,4 +247,8 @@ min-height: 100%; z-index: -30; } - \ No newline at end of file + + + + PluralKit | {title} + \ No newline at end of file