Skip to content
This repository was archived by the owner on Feb 11, 2026. It is now read-only.

Commit 2257d77

Browse files
committed
feat(rpc): link user rpc icon to settings tab
When the user clicks on the their rich presence icon, the RPC settings tab will display.
1 parent 8d91bd4 commit 2257d77

2 files changed

Lines changed: 19 additions & 3 deletions

File tree

res/css/structures/_UserRPC.pcss

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ Please see LICENSE files in the repository root for full details.
1010
display: flex;
1111
align-items: center;
1212

13+
user-select: none;
14+
cursor: pointer;
15+
1316
.mx_UserRPC_activity {
1417
width: 32px;
1518
height: 32px;
@@ -18,7 +21,8 @@ Please see LICENSE files in the repository root for full details.
1821
justify-content: center;
1922
align-items: center;
2023

21-
background-color: #000;
24+
color: #666c75;
25+
background-color: #1a1c1e;
2226
border-radius: 50%;
2327

2428
/* crop image to circle */

src/components/structures/UserRPC.tsx

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Please see LICENSE files in the repository root for full details.
77

88
import React, { useEffect, useState } from 'react';
99

10-
import { logger } from "matrix-js-sdk/src/logger";
10+
// import { logger } from "matrix-js-sdk/src/logger";
11+
12+
import defaultDispatcher from "../../dispatcher/dispatcher";
13+
import { Action } from "../../dispatcher/actions";
14+
import { UserTab } from "../views/dialogs/UserTab";
1115

1216
import { BridgeRPC, Activity } from '../../elecord/rpc/BridgeRPC';
1317

@@ -33,7 +37,15 @@ const UserRPC: React.FC = () => {
3337

3438
// render user activity
3539
return (
36-
<div className="mx_UserRPC">
40+
<div
41+
onClick={() => {
42+
defaultDispatcher.dispatch({
43+
action: Action.ViewUserSettings,
44+
initialTabId: UserTab.RichPresence,
45+
});
46+
}}
47+
className="mx_UserRPC"
48+
>
3749
<div className="mx_UserRPC_activity">
3850
{activity?.application_id && activity.status ? (
3951
<img

0 commit comments

Comments
 (0)