feat: Track storage usage
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Icon, Message } from 'semantic-ui-react';
|
||||
|
||||
const FileIsTooBig = React.memo(() => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
return (
|
||||
<Message visible negative size="tiny">
|
||||
<Icon name="file" />
|
||||
{t('common.uploadFailedFileIsTooBig')}
|
||||
</Message>
|
||||
);
|
||||
});
|
||||
|
||||
export default FileIsTooBig;
|
||||
@@ -0,0 +1,21 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import React from 'react';
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Icon, Message } from 'semantic-ui-react';
|
||||
|
||||
const NotEnoughStorage = React.memo(() => {
|
||||
const [t] = useTranslation();
|
||||
|
||||
return (
|
||||
<Message visible negative size="tiny">
|
||||
<Icon name="hdd" />
|
||||
{t('common.uploadFailedNotEnoughStorageSpace')}
|
||||
</Message>
|
||||
);
|
||||
});
|
||||
|
||||
export default NotEnoughStorage;
|
||||
@@ -7,9 +7,13 @@ import React from 'react';
|
||||
import { Toaster as HotToaster, ToastBar as HotToastBar } from 'react-hot-toast';
|
||||
|
||||
import ToastTypes from '../../../constants/ToastTypes';
|
||||
import FileIsTooBig from './FileIsTooBig';
|
||||
import NotEnoughStorage from './NotEnoughStorage';
|
||||
import EmptyTrashToast from './EmptyTrashToast';
|
||||
|
||||
const TOAST_BY_TYPE = {
|
||||
[ToastTypes.FILE_IS_TOO_BIG]: FileIsTooBig,
|
||||
[ToastTypes.NOT_ENOUGH_STORAGE]: NotEnoughStorage,
|
||||
[ToastTypes.EMPTY_TRASH]: EmptyTrashToast,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user