From 4e1cee2aa2b3a030f6557f1bfe7afb19d276d47e Mon Sep 17 00:00:00 2001 From: Rostislav Dugin Date: Fri, 3 Apr 2026 09:36:45 +0300 Subject: [PATCH] FEATURE (storage): Add storages warning --- .../storages/ui/StoragesComponent.tsx | 27 ++++++++++++++++ .../storages/ui/edit/EditStorageComponent.tsx | 32 ++++++++++++++++++- .../storages/EditLocalStorageComponent.tsx | 14 ++++++++ 3 files changed, 72 insertions(+), 1 deletion(-) create mode 100644 frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx diff --git a/frontend/src/features/storages/ui/StoragesComponent.tsx b/frontend/src/features/storages/ui/StoragesComponent.tsx index 1b6312b..534cb8d 100644 --- a/frontend/src/features/storages/ui/StoragesComponent.tsx +++ b/frontend/src/features/storages/ui/StoragesComponent.tsx @@ -1,6 +1,8 @@ +import { ExclamationCircleOutlined } from '@ant-design/icons'; import { Button, Modal, Spin } from 'antd'; import { useEffect, useState } from 'react'; +import { IS_CLOUD } from '../../../constants'; import { storageApi } from '../../../entity/storages'; import type { Storage } from '../../../entity/storages'; import type { UserProfile } from '../../../entity/users'; @@ -100,6 +102,31 @@ export const StoragesComponent = ({ > {storages.length >= 5 && isCanManageStorages && addStorageButton} + {!IS_CLOUD && ( +
+
+ + Self-hosted notice +
+ +
+ Do not forget to backup the storage itself as it contains all your backups. +
Or you can use cloud{"'"}s build-in{' '} + unlimited storage with double reservation. We care about security, + maintainance and 24x7 uptime +
+ + + Use cloud storage from $9 + +
+ )} + {storages.map((storage) => ( )} + + {storage?.type === StorageType.LOCAL && } + + +
+ {!IS_CLOUD && ( +
+
+ + Self-hosted notice +
+ +
+ Do not forget to backup the storage itself as it contains all your backups. +
Or you can use cloud{"'"}s build-in{' '} + unlimited storage with double reservation. We care about security, maintainance + and 24x7 uptime for you +
+ + + Use cloud storage from $9 + +
+ )}
diff --git a/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx b/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx new file mode 100644 index 0000000..75f1f62 --- /dev/null +++ b/frontend/src/features/storages/ui/edit/storages/EditLocalStorageComponent.tsx @@ -0,0 +1,14 @@ +import { ExclamationCircleOutlined } from '@ant-design/icons'; + +export function EditLocalStorageComponent() { + return ( + <> +
+ Be careful: with local storage you may run out of ROM memory. + It is recommended to use S3 or unlimited storages +
+ +
+ + ); +}