Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit4956ebb

Browse files
committed
chore: add org display to workspace topbar
1 parentf90f088 commit4956ebb

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

‎site/src/pages/WorkspacePage/WorkspaceTopbar.tsx‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
116116
linkToTemplate(workspace.organization_name,workspace.template_name),
117117
);
118118

119+
// Organization logic
120+
const{ organizations, showOrganizations}=useDashboard();
121+
constmatchedOrganization=organizations.find(
122+
(o)=>o.id===workspace.organization_id,
123+
);
124+
119125
return(
120126
<Topbarcss={{gridArea:"topbar"}}>
121127
<Tooltiptitle="Back to workspaces">
@@ -146,6 +152,24 @@ export const WorkspaceTopbar: FC<WorkspaceProps> = ({
146152
<span>{workspace.owner_name}</span>
147153
</Tooltip>
148154

155+
{showOrganizations&&(
156+
<>
157+
<TopbarDivider/>
158+
159+
{matchedOrganization&&(
160+
<UserAvatar
161+
size="xs"
162+
username={matchedOrganization.display_name}
163+
avatarURL={matchedOrganization.icon}
164+
/>
165+
)}
166+
167+
<Tooltiptitle="Organization">
168+
<span>{workspace.organization_name}</span>
169+
</Tooltip>
170+
</>
171+
)}
172+
149173
<TopbarDivider/>
150174

151175
<Popovermode="hover">

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp