Skip to content

Commit

Permalink
layout_issues_for_long_paths
Browse files Browse the repository at this point in the history
  • Loading branch information
NoelKova committed Aug 1, 2024
1 parent bdb97c6 commit b256053
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 7 deletions.
31 changes: 31 additions & 0 deletions apps/sensenet/adminUI.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Define the paths
$snClientPath = "C:\Users\kovacsn\Desktop\SenseNet\sn-client"
$sensenetAppPath = "C:\Users\kovacsn\Desktop\SenseNet\sn-client\apps\sensenet"
$desktopPath = "C:\Users\kovacsn\Desktop"

# Navigate to the sn-client directory and run yarn build
Write-Host "Navigating to $snClientPath and running yarn build..."
Set-Location -Path $snClientPath
yarn build

# Check if the build succeeded
if ($LASTEXITCODE -ne 0) {
Write-Host "yarn build failed."
exit $LASTEXITCODE
}

# Navigate to the sensenet app directory and run npm start
Write-Host "Navigating to $sensenetAppPath and running npm start..."
Set-Location -Path $sensenetAppPath
npm start

# Check the exit code of npm start
if ($LASTEXITCODE -ne 0) {
Write-Host "npm start failed."
exit $LASTEXITCODE
}

# Navigate back to the desktop
Write-Host "Navigating back to $desktopPath..."
Set-Location -Path $desktopPath
Write-Host "Script completed."
4 changes: 2 additions & 2 deletions apps/sensenet/src/components/Breadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function Breadcrumbs<T extends GenericContent>(props: BreadcrumbProps<T>)
return (
<>
<MUIBreadcrumbs
maxItems={5}
maxItems={15}
aria-label="breadcrumb"
style={{ marginLeft: '8.5px' }}
classes={{ separator: 'bread-crumbs-separator' }}>
Expand All @@ -50,8 +50,8 @@ export function Breadcrumbs<T extends GenericContent>(props: BreadcrumbProps<T>)
</Tooltip>
</DropFileArea>
))}
<CopyPath copyText={props.items[props.items.length - 1].title} />
</MUIBreadcrumbs>
<CopyPath copyText={props.items[props.items.length - 1].title} />
{contextMenuItem ? (
<ContentContextMenu
isOpened={isContextMenuOpened}
Expand Down
11 changes: 8 additions & 3 deletions apps/sensenet/src/components/ContentBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@ import { useDialog } from './dialogs'
const useStyles = makeStyles((theme: Theme) => {
return createStyles({
batchActionWrapper: {
marginRight: '7.5%',
' & .MuiIconButton-root': {
color: theme.palette.type === 'light' ? theme.palette.common.black : theme.palette.common.white,
},
marginLeft: 'auto',
display: 'flex',
marginRight: '8px',
},
buttonsWrapper: {
display: 'flex',
alignItems: 'center',
},
})
})
Expand Down Expand Up @@ -55,7 +60,7 @@ export const ContentBreadcrumbs = <T extends GenericContent = GenericContent>(pr
}, [selectionService.selection])

return (
<>
<div className={classes.buttonsWrapper}>
<Breadcrumbs<T>
items={[
...ancestors.map((content) => ({
Expand Down Expand Up @@ -140,6 +145,6 @@ export const ContentBreadcrumbs = <T extends GenericContent = GenericContent>(pr
</Tooltip>
</div>
) : null}
</>
</div>
)
}
1 change: 0 additions & 1 deletion apps/sensenet/src/components/content/Explore.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const useStyles = makeStyles((theme: Theme) => {
flexDirection: 'column',
},
breadcrumbsWrapper: {
height: globals.common.drawerItemHeight,
boxSizing: 'border-box',
borderBottom: theme.palette.type === 'light' ? '1px solid #DBDBDB' : '1px solid rgba(255, 255, 255, 0.11)',
justifyContent: 'start',
Expand Down
2 changes: 1 addition & 1 deletion apps/sensenet/src/services/content-context-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ export function getPrimaryActionUrl({
return getUrlForContent({ content, uiSettings, location, action: 'image', snRoute, removePath })
}

if ((content.Type === 'File' || repository.schemas.isContentFromType<ContentType>(content, 'File'))) {
if (content.Type === 'File' || repository.schemas.isContentFromType<ContentType>(content, 'File')) {
return getUrlForContent({ content, uiSettings, location, action: 'browse', snRoute, removePath })
}

Expand Down

0 comments on commit b256053

Please sign in to comment.