Skip to content

Commit

Permalink
Projects link in settings (#4663)
Browse files Browse the repository at this point in the history
* projects link in settings

* snap

* snap?

* remove copypasta
  • Loading branch information
ruggi authored Dec 15, 2023
1 parent 0ee8f70 commit d916c49
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 20 deletions.
20 changes: 20 additions & 0 deletions editor/src/components/navigator/left-pane/settings-pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import {
FlexRow,
H2,
HeadlessStringInput,
Icons,
PopupList,
Section,
SectionBodyArea,
Expand Down Expand Up @@ -247,6 +248,25 @@ export const SettingsPane = React.memo(() => {
>
<Section>
{isMyProject === 'yes' ? null : <ForksGiven />}
<UIGridRow padded variant='<-------------1fr------------->' style={{ marginBottom: 8 }}>
<a href='/projects' target='_blank' rel='noopener rofererrer'>
<Button
highlight
spotlight
outline={false}
style={{
width: '100%',
cursor: 'pointer',
height: UtopiaTheme.layout.inputHeight.default,
background: colorTheme.dynamicBlue.value,
color: colorTheme.bg1.value,
gap: 4,
}}
>
<Icons.ExternalLinkSmaller color='black' /> All projects
</Button>
</a>
</UIGridRow>
<UIGridRow padded variant='<---1fr--->|------172px-------|'>
<span style={{ color: colorTheme.fg2.value }}>Name</span>
{userState.loginState.type !== 'LOGGED_IN' ? (
Expand Down
36 changes: 16 additions & 20 deletions editor/src/components/user-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,18 +64,16 @@ export const SinglePlayerUserBar = React.memo(() => {
'SinglePlayerUserBar amIOwner',
)
return (
<a href='/projects' target='_blank' rel='noopener rofererrer'>
<div
style={{
width: 24,
height: 24,
position: 'relative',
}}
>
<Avatar userPicture={userPicture} isLoggedIn={true} />
{amIOwner ? <OwnerBadge /> : null}
</div>
</a>
<div
style={{
width: 24,
height: 24,
position: 'relative',
}}
>
<Avatar userPicture={userPicture} isLoggedIn={true} />
{amIOwner ? <OwnerBadge /> : null}
</div>
)
})
SinglePlayerUserBar.displayName = 'SinglePlayerUserBar'
Expand Down Expand Up @@ -219,14 +217,12 @@ const MultiplayerUserBar = React.memo(() => {
)
}),
)}
<a href='/projects' target='_blank' rel='noopener rofererrer'>
<MultiplayerAvatar
name={multiplayerInitialsFromName(myUser.name)}
color={multiplayerColorFromIndex(myUser.colorIndex)}
picture={myUser.avatar}
isOwner={amIOwner}
/>
</a>
<MultiplayerAvatar
name={multiplayerInitialsFromName(myUser.name)}
color={multiplayerColorFromIndex(myUser.colorIndex)}
picture={myUser.avatar}
isOwner={amIOwner}
/>
</div>
)
})
Expand Down

0 comments on commit d916c49

Please sign in to comment.