Merge pull request #5281 from ethereum/desktoptitle

placement of folder name on desktop
pull/5378/head
bunsenstraat 2 weeks ago committed by GitHub
commit ea413f474a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 2
      libs/remix-ui/workspace/src/lib/components/electron-menu.tsx
  2. 11
      libs/remix-ui/workspace/src/lib/components/electron-workspace-name.tsx
  3. 4
      libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx

@ -44,7 +44,7 @@ export const ElectronMenu = () => {
> >
<div className="recentfolder pb-1"> <div className="recentfolder pb-1">
<span onClick={async () => { await openFolderElectron(folder) }} className="pl-2 recentfolder_name pr-2">{lastFolderName(folder)}</span> <span onClick={async () => { await openFolderElectron(folder) }} className="pl-2 recentfolder_name pr-2">{lastFolderName(folder)}</span>
<span onClick={async () => { await openFolderElectron(folder) }} data-id={{ folder }} className="recentfolder_path pr-2">{folder}</span> <span onClick={async () => { await openFolderElectron(folder) }} data-id={`recent_folder_${folder}`} className="recentfolder_path pr-2">{folder}</span>
<i <i
onClick={() => { onClick={() => {
global.dispatchRemoveRecentFolder(folder) global.dispatchRemoveRecentFolder(folder)

@ -23,14 +23,21 @@ export const ElectronWorkspaceName = (props: ElectronWorkspaceNameProps) => {
return ( return (
(dir === undefined || dir === '') ? <></> : (dir === undefined || dir === '') ? <></> :
<div className="d-flex align-items-baseline"> <div className="d-flex align-items-baseline mt-2">
<CustomTooltip <CustomTooltip
placement="bottom" placement="bottom"
tooltipId="workspace-name" tooltipId="workspace-name"
tooltipClasses="text-nowrap" tooltipClasses="text-nowrap"
tooltipText={dir} tooltipText={dir}
> >
<div>{parsePath()}</div> <div
style={{
overflow: 'hidden',
textOverflow: 'ellipsis',
flexGrow: 1,
}}
>{parsePath()}</div>
</CustomTooltip> </CustomTooltip>
<CustomTooltip <CustomTooltip
placement="top" placement="top"

@ -1060,7 +1060,7 @@ export function Workspace() {
<span className="d-flex"> <span className="d-flex">
<label className="pl-2 form-check-label" style={{ wordBreak: 'keep-all' }}> <label className="pl-2 form-check-label" style={{ wordBreak: 'keep-all' }}>
{(platform == appPlatformTypes.desktop) ? ( {(platform == appPlatformTypes.desktop) ? (
<ElectronWorkspaceName plugin={global.plugin} path={global.fs.browser.currentLocalFilePath} /> null
) : <FormattedMessage id='filePanel.workspace' />} ) : <FormattedMessage id='filePanel.workspace' />}
</label> </label>
{selectedWorkspace && selectedWorkspace.name === 'code-sample' && <CustomTooltip {selectedWorkspace && selectedWorkspace.name === 'code-sample' && <CustomTooltip
@ -1143,7 +1143,7 @@ export function Workspace() {
)} )}
</Dropdown.Menu> </Dropdown.Menu>
</Dropdown> </Dropdown>
):null} ):<ElectronWorkspaceName plugin={global.plugin} path={global.fs.browser.currentLocalFilePath} />}
</div> </div>
</div> </div>
</header> </header>

Loading…
Cancel
Save