fix(core): remove quota modal (#12586)

<!-- This is an auto-generated comment: release notes by coderabbit.ai -->
## Summary by CodeRabbit

- **Removed Features**
  - Removed all quota-reached modal dialogs, including both cloud and local storage quota notifications.
  - Users will no longer see modal alerts when storage limits are reached in workspaces.
- **User Interface**
  - Quota-reached modals and related styles have been removed from workspace layouts on both desktop and mobile.
- **Other Changes**
  - Quota notification logic and related settings have been eliminated from the application.
  - Maximum blob size enforcement and related callbacks have been removed from blob management.
  - Localization entries related to file upload size limits and quota tips have been removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
EYHN
2025-05-28 08:04:22 +00:00
parent 274319dd6c
commit b847de4980
10 changed files with 3 additions and 274 deletions
@@ -36,11 +36,6 @@ export class BlobFrontend {
async set(blob: BlobRecord) {
await this.waitForConnected();
if (blob.data.byteLength > this.maxBlobSize) {
for (const cb of this.onReachedMaxBlobSizeCallbacks) {
cb(blob.data.byteLength);
}
}
await using lock = await this.lock.lock('blob', blob.key);
await this.storage.set(blob);
await lock[Symbol.asyncDispose]();
@@ -77,20 +72,6 @@ export class BlobFrontend {
return this.sync.fullDownload(peerId, signal);
}
private maxBlobSize = 1024 * 1024 * 100; // 100MB
private readonly onReachedMaxBlobSizeCallbacks: Set<
(byteSize: number) => void
> = new Set();
setMaxBlobSize(max: number) {
this.maxBlobSize = max;
}
onReachedMaxBlobSize(cb: (byteSize: number) => void): () => void {
this.onReachedMaxBlobSizeCallbacks.add(cb);
return () => this.onReachedMaxBlobSizeCallbacks.delete(cb);
}
private waitForConnected(signal?: AbortSignal) {
return this.storage.connection.waitForConnected(signal);
}