featI(dashboard): dynamic titles on member/group pages
This commit is contained in:
parent
50732ba010
commit
8113c83828
@ -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 @@
|
||||
}
|
||||
</style>
|
||||
|
||||
<svelte:head>
|
||||
<title>PluralKit | {title}</title>
|
||||
</svelte:head>
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
{#if settings && settings.appearance.color_background && !notOwnSystem}
|
||||
@ -242,3 +248,7 @@
|
||||
z-index: -30;
|
||||
}
|
||||
</style>
|
||||
|
||||
<svelte:head>
|
||||
<title>PluralKit | {title}</title>
|
||||
</svelte:head>
|
Loading…
Reference in New Issue
Block a user