diff --git a/resources/lang/en/activity.php b/resources/lang/en/activity.php index 64e0bb760..203115afa 100644 --- a/resources/lang/en/activity.php +++ b/resources/lang/en/activity.php @@ -61,7 +61,7 @@ return [ 'copy' => 'Created a copy of :file', 'create-directory' => 'Created a new directory :name in :directory', 'decompress' => 'Decompressed :files in :directory', - 'delete_one' => 'Deleted :directory:files', + 'delete_one' => 'Deleted :directory:files.0', 'delete_other' => 'Deleted :count files in :directory', 'download' => 'Downloaded :file', 'pull' => 'Downloaded a remote file from :url to :directory', diff --git a/resources/scripts/components/elements/Portal.tsx b/resources/scripts/components/elements/Portal.tsx new file mode 100644 index 000000000..e0be75778 --- /dev/null +++ b/resources/scripts/components/elements/Portal.tsx @@ -0,0 +1,8 @@ +import React, { useRef } from 'react'; +import { createPortal } from 'react-dom'; + +export default ({ children }: { children: React.ReactNode }) => { + const element = useRef(document.getElementById('modal-portal')); + + return createPortal(children, element!.current!); +}; diff --git a/resources/scripts/components/elements/dialog/Dialog.tsx b/resources/scripts/components/elements/dialog/Dialog.tsx index d15920973..d6dc2d4f0 100644 --- a/resources/scripts/components/elements/dialog/Dialog.tsx +++ b/resources/scripts/components/elements/dialog/Dialog.tsx @@ -44,8 +44,8 @@ const Dialog = ({ open, title, description, onClose, hideCloseIcon, children }: open={open} onClose={onClose} > -
-- This directory is too large to display in the browser, - limiting the output to the first 250 files. -
-+ This directory is too large to display in the browser, + limiting the output to the first 250 files. +
+
- { selectedFiles.slice(0, 15).map(file => (
- {file}
))
- }
- { selectedFiles.length > 15 &&
- + {selectedFiles.length - 15} other(s)
- }
-
- + Are you sure you want to delete + {selectedFiles.length} files? This is + a permanent action and the files cannot be recovered. +
+ {selectedFiles.slice(0, 15).map(file => ( +- Drag and drop files to upload. -
-+ Drag and drop files to upload. +
+