mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-18 06:47:02 +08:00
feat(workspace): add blob and storage limit (#5535)
close TOV-343 AFF-508 TOV-461 TOV-460 TOV-419 Add `isOverCapacity ` status to detect if blob usage exceeds limits. Add `onCapacityChange` and `onBlobSet` to monitor if the storage or blob exceeds the capacity limit. Global modals `LocalQuotaModal` and `CloudQuotaModal` have been added, with the upload size of the blob being limited within the modal components. The notification component has been adjusted, now you can pass in `action` click events and `actionLabel` .
This commit is contained in:
@@ -905,6 +905,7 @@ export const workspaceQuotaQuery = {
|
||||
query workspaceQuota($id: String!) {
|
||||
workspace(id: $id) {
|
||||
quota {
|
||||
humanReadableName
|
||||
storageQuota
|
||||
usedSize
|
||||
blobLimit
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
query workspaceQuota($id: String!) {
|
||||
workspace(id: $id) {
|
||||
quota {
|
||||
humanReadableName
|
||||
storageQuota
|
||||
usedSize
|
||||
blobLimit
|
||||
|
||||
@@ -18,3 +18,5 @@ export function getBaseUrl(): string {
|
||||
}
|
||||
|
||||
export const fetcher = gqlFetcherFactory(getBaseUrl() + '/graphql');
|
||||
|
||||
export { GraphQLError } from 'graphql';
|
||||
|
||||
@@ -854,6 +854,7 @@ export type WorkspaceQuotaQuery = {
|
||||
__typename?: 'WorkspaceType';
|
||||
quota: {
|
||||
__typename?: 'QuotaQueryType';
|
||||
humanReadableName: string;
|
||||
storageQuota: number;
|
||||
usedSize: number;
|
||||
blobLimit: number;
|
||||
|
||||
Reference in New Issue
Block a user