Skip to content

Commit

Permalink
fix(Studio.Design): fix changes requested
Browse files Browse the repository at this point in the history
  • Loading branch information
Milkeyyy committed Dec 28, 2024
1 parent 4e6a1cb commit 525f3af
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions websites/S/Studio.Design/presence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ presence.on("UpdateData", async () => {
largeImageKey: "https://i.imgur.com/zjBdwQ8.png",
startTimestamp: browsingTimestamp,
},
[privacy] = await Promise.all([presence.getSetting<boolean>("privacy")]),
privacy = await(presence.getSetting<boolean>("privacy")),
{ pathname } = document.location;

switch (pathname) {
Expand All @@ -25,15 +25,10 @@ presence.on("UpdateData", async () => {
default:
// Project Dashboard
if (pathname.includes("/projects/") && pathname.includes("/dashboard/")) {
if (privacy) presenceData.details = "Project Dashboard";
else {
// Project Name
presenceData.details = `${
document.querySelector(
".LayoutPdDashboard > header > div._flex._gap-8._flex-initial._flex-row.o-layout-project-dashboard-header-left._mr-auto._h-full._py-6._pl-24 > div > button > div > p"
).textContent
} | Dashboard`;
}
presenceData.details = privacy
? "Project dashboard"
: `${document?.title?.replace(/ \| Studio(\.Design)?$/, "")} | Dashboard`; // Global: Studio.Design / Japanese: Studio
// Home
if (pathname.includes("/home")) {
// Project Settings
Expand Down

0 comments on commit 525f3af

Please sign in to comment.