feat: remove attached files button from files view (#1193)

This commit is contained in:
Aman Harwara
2022-07-02 17:21:51 +05:30
committed by GitHub
parent f437ed6ce4
commit f3a6aaaf2e
6 changed files with 237 additions and 184 deletions

View File

@@ -5,32 +5,13 @@ import { useCallback } from 'react'
import FileOptionsPanel from '../FileContextMenu/FileOptionsPanel'
import { FilesController } from '@/Controllers/FilesController'
import { SelectedItemsController } from '@/Controllers/SelectedItemsController'
import { WebApplication } from '@/Application/Application'
import { FeaturesController } from '@/Controllers/FeaturesController'
import { FilePreviewModalController } from '@/Controllers/FilePreviewModalController'
import { NavigationController } from '@/Controllers/Navigation/NavigationController'
import { NotesController } from '@/Controllers/NotesController'
import AttachedFilesButton from '../AttachedFilesPopover/AttachedFilesButton'
type Props = {
application: WebApplication
featuresController: FeaturesController
filePreviewModalController: FilePreviewModalController
filesController: FilesController
navigationController: NavigationController
notesController: NotesController
selectionController: SelectedItemsController
}
const MultipleSelectedFiles = ({
application,
filesController,
featuresController,
filePreviewModalController,
navigationController,
notesController,
selectionController,
}: Props) => {
const MultipleSelectedFiles = ({ filesController, selectionController }: Props) => {
const count = selectionController.selectedFilesCount
const cancelMultipleSelection = useCallback(() => {
@@ -41,18 +22,7 @@ const MultipleSelectedFiles = ({
<div className="flex h-full flex-col items-center">
<div className="flex w-full items-center justify-between p-4">
<h1 className="m-0 text-lg font-bold">{count} selected files</h1>
<div className="flex">
<div className="mr-3">
<AttachedFilesButton
application={application}
featuresController={featuresController}
filePreviewModalController={filePreviewModalController}
filesController={filesController}
navigationController={navigationController}
notesController={notesController}
selectionController={selectionController}
/>
</div>
<div>
<FileOptionsPanel filesController={filesController} selectionController={selectionController} />
</div>
</div>