featI(dashboard): dynamic titles on member/group pages
This commit is contained in:
parent
50732ba010
commit
8113c83828
@ -43,6 +43,8 @@
|
|||||||
fetchGroup();
|
fetchGroup();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let title = isPublic ? "group" : "group (dash)";
|
||||||
|
|
||||||
async function fetchGroup() {
|
async function fetchGroup() {
|
||||||
try {
|
try {
|
||||||
group = await api().groups($params.id).get({auth: !isPublic});
|
group = await api().groups($params.id).get({auth: !isPublic});
|
||||||
@ -52,6 +54,9 @@
|
|||||||
}
|
}
|
||||||
err = "";
|
err = "";
|
||||||
loading = false;
|
loading = false;
|
||||||
|
if (group.name) {
|
||||||
|
title = isPublic ? group.name : `${group.name} (dash)`;
|
||||||
|
}
|
||||||
memberLoading = true;
|
memberLoading = true;
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
fetchMembers();
|
fetchMembers();
|
||||||
@ -237,3 +242,7 @@
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>PluralKit | {title}</title>
|
||||||
|
</svelte:head>
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@
|
|||||||
fetchMember();
|
fetchMember();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let title = isPublic ? "member" : "member (dash)";
|
||||||
|
|
||||||
async function fetchMember() {
|
async function fetchMember() {
|
||||||
try {
|
try {
|
||||||
member = await api().members($params.id).get({auth: !isPublic});
|
member = await api().members($params.id).get({auth: !isPublic});
|
||||||
@ -53,6 +55,9 @@
|
|||||||
}
|
}
|
||||||
err = "";
|
err = "";
|
||||||
loading = false;
|
loading = false;
|
||||||
|
if (member.name) {
|
||||||
|
title = isPublic ? member.name : `${member.name} (dash)`;
|
||||||
|
}
|
||||||
groupLoading = true;
|
groupLoading = true;
|
||||||
await new Promise(resolve => setTimeout(resolve, 1000));
|
await new Promise(resolve => setTimeout(resolve, 1000));
|
||||||
fetchGroups();
|
fetchGroups();
|
||||||
@ -104,6 +109,7 @@
|
|||||||
groups = groups.filter(group => group.id !== event.detail);
|
groups = groups.filter(group => group.id !== event.detail);
|
||||||
systemGroups = systemGroups.filter(group => group.id !== event.detail);
|
systemGroups = systemGroups.filter(group => group.id !== event.detail);
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
{#if settings && settings.appearance.color_background && !notOwnSystem}
|
{#if settings && settings.appearance.color_background && !notOwnSystem}
|
||||||
@ -241,4 +247,8 @@
|
|||||||
min-height: 100%;
|
min-height: 100%;
|
||||||
z-index: -30;
|
z-index: -30;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<svelte:head>
|
||||||
|
<title>PluralKit | {title}</title>
|
||||||
|
</svelte:head>
|
Loading…
Reference in New Issue
Block a user