From 102194b82c0a34882a18f57e0bccee0df4f5f67c Mon Sep 17 00:00:00 2001 From: devklick Date: Sat, 21 Oct 2023 23:49:34 +0100 Subject: [PATCH 1/2] Fix flex gap in InputField --- src/components/InputField/styles.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/InputField/styles.ts b/src/components/InputField/styles.ts index b32c99d..eb06079 100644 --- a/src/components/InputField/styles.ts +++ b/src/components/InputField/styles.ts @@ -6,7 +6,7 @@ export const StyledContainer = styled.div` justify-content: center; align-items: flex-start; width: 100%; - gap: 10; + gap: 10px; `; export const StyledInput = styled.input` From 32a6e7787e157afad9274e2b5d59f88d007e7986 Mon Sep 17 00:00:00 2001 From: devklick Date: Sun, 22 Oct 2023 00:21:54 +0100 Subject: [PATCH 2/2] Fixes to renaming FSObjects --- src/components/BorderedApp/BorderedApp.tsx | 1 - .../BottomBar/Launcher/Launcher.tsx | 2 - src/components/Button/Button.tsx | 10 ++- src/hooks/useLocalFSWithHistory.ts | 1 + .../DirectoryOrFile/DirectoryOrFile.tsx | 8 ++- .../FileBrowser/DirectoryOrFile/styles.ts | 4 +- src/programs/FileBrowser/FileBrowser.tsx | 6 +- .../FileBrowser/MainContent/MainContent.tsx | 6 +- src/stores/localFS.ts | 67 +++++++++++-------- src/stores/windowManagerStore.ts | 1 - 10 files changed, 63 insertions(+), 43 deletions(-) diff --git a/src/components/BorderedApp/BorderedApp.tsx b/src/components/BorderedApp/BorderedApp.tsx index dbef6fd..10125d4 100644 --- a/src/components/BorderedApp/BorderedApp.tsx +++ b/src/components/BorderedApp/BorderedApp.tsx @@ -74,7 +74,6 @@ function BorderedApp({ function onClickClose() { winMan.closeWindow(type, id); } - console.log("Bordered app, hidden", String(hidden)); return ( void; width?: string | number; + disabled?: boolean; } -function Button({ name, width = "100%", onClick }: ButtonProps) { +function Button({ + name, + width = "100%", + disabled = false, + onClick, +}: ButtonProps) { return ( - + {name} ); diff --git a/src/hooks/useLocalFSWithHistory.ts b/src/hooks/useLocalFSWithHistory.ts index d217960..bccd694 100644 --- a/src/hooks/useLocalFSWithHistory.ts +++ b/src/hooks/useLocalFSWithHistory.ts @@ -62,6 +62,7 @@ function useLocalFSWithHistory(currentPath: string) { getDirOrDefault, navForward, navBack, + getNameFromPath: fs.getLastFromPath, }; } diff --git a/src/programs/FileBrowser/DirectoryOrFile/DirectoryOrFile.tsx b/src/programs/FileBrowser/DirectoryOrFile/DirectoryOrFile.tsx index 0b54783..76b46da 100644 --- a/src/programs/FileBrowser/DirectoryOrFile/DirectoryOrFile.tsx +++ b/src/programs/FileBrowser/DirectoryOrFile/DirectoryOrFile.tsx @@ -85,7 +85,7 @@ function DirectoryOrFile({ /> )} {isFSDirectory(fsObject) ? ( - + ) : null} {fsObject.name} @@ -155,7 +155,11 @@ function RenamePopup({