File tree Expand file tree Collapse file tree 4 files changed +13
-15
lines changed
packages/app/src/app/pages/Sandbox/Editor Expand file tree Collapse file tree 4 files changed +13
-15
lines changed Original file line number Diff line number Diff line change @@ -32,7 +32,6 @@ import { HeaderProps } from './types';
3232
3333export const Header = observer ( ( { zenMode } : HeaderProps ) => {
3434 const store = useStore ( ) ;
35- const sandbox = store . editor . currentSandbox ;
3635 const vscode = store . preferences . settings . experimentVSCode ;
3736
3837 return (
@@ -49,11 +48,9 @@ export const Header = observer(({ zenMode }: HeaderProps) => {
4948 { vscode ? < MenuBar /> : < SaveAllButton /> }
5049 </ Left >
5150
52- { sandbox . owned && (
53- < Centered >
54- < SandboxName />
55- </ Centered >
56- ) }
51+ < Centered >
52+ < SandboxName />
53+ </ Centered >
5754
5855 < Right >
5956 { store . updateStatus === 'available' && < RefreshButton /> }
Original file line number Diff line number Diff line change @@ -80,11 +80,12 @@ export const SandboxName = observer(() => {
8080 opacity : updatingName ? 0 : 1 ,
8181 pointerEvents : updatingName ? 'none' : 'initial' ,
8282 } ) ;
83+ const { customTemplate, owned } = currentSandbox ;
8384
8485 return (
8586 < Main >
8687 < Container >
87- { ! currentSandbox . customTemplate && (
88+ { ! customTemplate && owned && (
8889 < animated . div style = { spring } >
8990 < Folder >
9091 { isLoggedIn ? (
@@ -117,7 +118,9 @@ export const SandboxName = observer(() => {
117118 />
118119 </ Form >
119120 ) : (
120- < Name onClick = { handleNameClick } > { sandboxName } </ Name >
121+ < Name owned = { owned } onClick = { owned ? handleNameClick : null } >
122+ { sandboxName }
123+ </ Name >
121124 ) }
122125 { template ? (
123126 < Tooltip
@@ -134,9 +137,7 @@ export const SandboxName = observer(() => {
134137 </ >
135138 }
136139 >
137- < TemplateBadge color = { currentSandbox . customTemplate . color } >
138- Template
139- </ TemplateBadge >
140+ < TemplateBadge color = { customTemplate . color } > Template</ TemplateBadge >
140141 </ Tooltip >
141142 ) : null }
142143 </ Container >
Original file line number Diff line number Diff line change @@ -59,11 +59,11 @@ export const NameInput = styled(AutosizeInput)`
5959 }
6060` ;
6161
62- export const Name = styled . span `
63- ${ ( { theme } ) => css `
62+ export const Name = styled . span < { owned ?: boolean } > `
63+ ${ ( { theme, owned } ) => css `
6464 color: ${ theme . light ? 'black' : 'white' } ;
6565 margin-left: 0.25rem;
66- cursor: pointer;
66+ cursor: ${ owned ? ' pointer' : 'initial' } ;
6767 text-overflow: ellipsis;
6868 ` }
6969` ;
Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ export const Project = observer(({ editable }: IProjectProps) => {
114114 </ PrivacyContainer >
115115 </ PropertyValue >
116116 </ Item >
117- { ! isPatron && (
117+ { ! isPatron && editable && (
118118 < Explanation style = { { marginTop : '-1rem' } } >
119119 You can change privacy of a sandbox as a{ ' ' }
120120 < a href = { patronUrl ( ) } target = "_blank" >
You can’t perform that action at this time.
0 commit comments