From f001d50885e1dca25a7f6e631071a292bec234ec Mon Sep 17 00:00:00 2001 From: somebody1234 Date: Thu, 1 Jun 2023 22:24:40 +1000 Subject: [PATCH] Remove modal from file upload flow Fixes part of cloud-v2/#483 --- .../src/dashboard/components/dashboard.tsx | 45 ++++-- .../dashboard/components/uploadFileModal.tsx | 135 ------------------ 2 files changed, 31 insertions(+), 149 deletions(-) delete mode 100644 app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/uploadFileModal.tsx diff --git a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/dashboard.tsx b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/dashboard.tsx index a80df57b0bd6..f24fa20ace06 100644 --- a/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/dashboard.tsx +++ b/app/ide-desktop/lib/dashboard/src/authentication/src/dashboard/components/dashboard.tsx @@ -1,6 +1,7 @@ /** @file Main dashboard component, responsible for listing user's projects as well as other * interactive components. */ import * as react from 'react' +import toast from 'react-hot-toast' import * as common from 'enso-common' @@ -32,7 +33,6 @@ import TopBar from './topBar' import ConfirmDeleteModal from './confirmDeleteModal' import RenameModal from './renameModal' -import UploadFileModal from './uploadFileModal' import DirectoryCreateForm from './directoryCreateForm' import FileCreateForm from './fileCreateForm' @@ -797,25 +797,42 @@ function Dashboard(props: DashboardProps) { )}
- + -
- - { - setName(event.target.value) - }} - defaultValue={name ?? file?.name ?? ''} - /> -
-
- -
-
- { - setFile(event.target.files?.[0] ?? null) - }} - /> -
-
-
{file?.name ?? 'No file selected'}
-
- {file ? fileInfo.toReadableSize(file.size) : '\u00a0'} -
-
-
{file && fileInfo.fileIcon()}
-
-
-
-
- Upload -
-
- Cancel -
-
- - - ) - } -} - -export default UploadFileModal