Skip to content

Commit

Permalink
Bug fix: unable to add files or folders to newly created folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zachhannum committed Jun 28, 2022
1 parent c540b04 commit e41cbe4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
5 changes: 2 additions & 3 deletions app/renderer/components/Pane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const StyledResizer = styled.div<StyledResizerProps>`
position: absolute;
cursor: col-resize;
height: 100%;
width: 5px;
width: 2px;
z-index: 2;
${(p) =>
p.invert
? css`
Expand All @@ -52,12 +53,10 @@ const StyledResizer = styled.div<StyledResizerProps>`
&:hover {
width: 10px;
background-color: ${(p) => p.hoverColor};
z-index: 2;
}
&:active {
width: 10px;
background-color: ${(p) => p.hoverColor};
z-index: 2;
}
transition: background-color 100ms ease-in-out, width 100ms ease-in-out;
`;
Expand Down
5 changes: 4 additions & 1 deletion app/renderer/components/TreeView/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,10 @@ export const addSectionAt = (
newItem.children = addSectionAt(val, item.children, atId);
}
if (item.id === atId && newItem.canHaveChildren) {
newItem.children.push(val);
if(newItem.children.length === 0) {
newItem.children = [];
}
newItem.children.push({...val});
newItem.collapsed = false;
}
newItems.push(newItem);
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/theme/theme.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { DefaultTheme } from 'styled-components';

const sidebarOpacity = window.windowApi.os() === 'darwin' ? 0.3 : 1;
const sidebarOpacity = window.windowApi.os() === 'darwin' ? 0.5 : 1;

const theme: DefaultTheme = {
mainBg: 'rgba(41, 41, 46, 1)',
Expand Down
2 changes: 1 addition & 1 deletion release/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "calamus",
"version": "0.5.4-pre-alpha",
"version": "0.5.5-pre-alpha",
"description": "Write and Publish Books with Ease",
"main": "./dist/main/main.js",
"author": {
Expand Down

0 comments on commit e41cbe4

Please sign in to comment.