File manager cleanup for mobile devices
This commit is contained in:
parent
6ec2ae9df8
commit
47283700a8
9 changed files with 53 additions and 40 deletions
|
@ -11,6 +11,7 @@ import Button from '@/components/elements/Button';
|
|||
import { FileObject } from '@/api/server/files/loadDirectory';
|
||||
import useFlash from '@/plugins/useFlash';
|
||||
import useFileManagerSwr from '@/plugins/useFileManagerSwr';
|
||||
import { WithClassname } from '@/components/types';
|
||||
|
||||
interface Values {
|
||||
directoryName: string;
|
||||
|
@ -34,7 +35,7 @@ const generateDirectoryData = (name: string): FileObject => ({
|
|||
isEditable: () => false,
|
||||
});
|
||||
|
||||
export default () => {
|
||||
export default ({ className }: WithClassname) => {
|
||||
const uuid = ServerContext.useStoreState(state => state.server.data!.uuid);
|
||||
const { clearAndAddHttpError } = useFlash();
|
||||
const [ visible, setVisible ] = useState(false);
|
||||
|
@ -95,7 +96,7 @@ export default () => {
|
|||
</Modal>
|
||||
)}
|
||||
</Formik>
|
||||
<Button isSecondary css={tw`mr-2`} onClick={() => setVisible(true)}>
|
||||
<Button isSecondary onClick={() => setVisible(true)} className={className}>
|
||||
Create Directory
|
||||
</Button>
|
||||
</>
|
||||
|
|
Reference in a new issue