From b25605307f88e8da74f37ef6f97e8b7fd6e58ae5 Mon Sep 17 00:00:00 2001 From: NoelKova Date: Thu, 1 Aug 2024 08:16:17 +0200 Subject: [PATCH 1/2] layout_issues_for_long_paths --- apps/sensenet/adminUI.ps1 | 31 +++++++++++++++++++ apps/sensenet/src/components/Breadcrumbs.tsx | 4 +-- .../src/components/ContentBreadcrumbs.tsx | 11 +++++-- .../src/components/content/Explore.tsx | 1 - .../src/services/content-context-service.ts | 2 +- 5 files changed, 42 insertions(+), 7 deletions(-) create mode 100644 apps/sensenet/adminUI.ps1 diff --git a/apps/sensenet/adminUI.ps1 b/apps/sensenet/adminUI.ps1 new file mode 100644 index 000000000..3fbecc1fe --- /dev/null +++ b/apps/sensenet/adminUI.ps1 @@ -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." diff --git a/apps/sensenet/src/components/Breadcrumbs.tsx b/apps/sensenet/src/components/Breadcrumbs.tsx index f8289d2ca..f6ce22575 100644 --- a/apps/sensenet/src/components/Breadcrumbs.tsx +++ b/apps/sensenet/src/components/Breadcrumbs.tsx @@ -27,7 +27,7 @@ export function Breadcrumbs(props: BreadcrumbProps) return ( <> @@ -50,8 +50,8 @@ export function Breadcrumbs(props: BreadcrumbProps) ))} + - {contextMenuItem ? ( { 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', }, }) }) @@ -55,7 +60,7 @@ export const ContentBreadcrumbs = (pr }, [selectionService.selection]) return ( - <> +
items={[ ...ancestors.map((content) => ({ @@ -140,6 +145,6 @@ export const ContentBreadcrumbs = (pr
) : null} - + ) } diff --git a/apps/sensenet/src/components/content/Explore.tsx b/apps/sensenet/src/components/content/Explore.tsx index cf5bd08ca..8dae4f739 100644 --- a/apps/sensenet/src/components/content/Explore.tsx +++ b/apps/sensenet/src/components/content/Explore.tsx @@ -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', diff --git a/apps/sensenet/src/services/content-context-service.ts b/apps/sensenet/src/services/content-context-service.ts index 37d5789c8..ecdc6b21b 100644 --- a/apps/sensenet/src/services/content-context-service.ts +++ b/apps/sensenet/src/services/content-context-service.ts @@ -185,7 +185,7 @@ export function getPrimaryActionUrl({ return getUrlForContent({ content, uiSettings, location, action: 'image', snRoute, removePath }) } - if ((content.Type === 'File' || repository.schemas.isContentFromType(content, 'File'))) { + if (content.Type === 'File' || repository.schemas.isContentFromType(content, 'File')) { return getUrlForContent({ content, uiSettings, location, action: 'browse', snRoute, removePath }) } From 31ee2a78c4768bbd4c15ca2d99706563800f50f9 Mon Sep 17 00:00:00 2001 From: NoelKova Date: Thu, 1 Aug 2024 08:25:13 +0200 Subject: [PATCH 2/2] delete_build_script --- apps/sensenet/adminUI.ps1 | 31 ------------------------------- 1 file changed, 31 deletions(-) delete mode 100644 apps/sensenet/adminUI.ps1 diff --git a/apps/sensenet/adminUI.ps1 b/apps/sensenet/adminUI.ps1 deleted file mode 100644 index 3fbecc1fe..000000000 --- a/apps/sensenet/adminUI.ps1 +++ /dev/null @@ -1,31 +0,0 @@ -# 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."