Add bots files handling logic

This commit is contained in:
2026-10-21 17:56:09 +01:00
parent b0af4db1bf
commit d17a4a7bdd
97 changed files with 5843 additions and 41 deletions
@@ -0,0 +1,25 @@
import { useContext } from "react";
import { AppContext } from "@/src/pages/__root";
import canManageCrew from "@/src/utils/rbac/can-manage-crew";
import SettingsGroup from "../../(partials)/settings-group";
import StorageQuotaForm from "../(partials)/storage-quota-form";
/**
* What bots keep on disk: the quota each of their folders gets. Only a
* crew manager sees it, since it's an install-wide limit.
*/
export default function StorageSection() {
const { pageProps } = useContext(AppContext);
if (!canManageCrew({ user_types: pageProps?.user_types })) return null;
return (
<SettingsGroup
title="Bot files Quota"
description="Bots keep the documents, images and reports they make in folders on the app's data volume, never on a computer. This is how much each folder may hold."
id="storage"
>
<StorageQuotaForm storage={pageProps?.storage_quota} />
</SettingsGroup>
);
}