feat(canvas): 画布资源 - 缩略图字段与缓存加载支持

This commit is contained in:
ddcat666
2026-09-27 22:26:32 +08:00
parent a0ba303b02
commit e10f32ecaf
9 changed files with 312 additions and 101 deletions

View File

@@ -104,7 +104,7 @@ const resourceCache = new Map<string, RemoteResource>();
const resourceRequests = new Map<string, Promise<RemoteResource>>();
const missingResourceIds = new Set<string>();
export type ResourceAccessPurpose = "display" | "copy" | "download" | "browser-process" | "provider-input";
export type ResourceAccessVariant = "original" | "playback";
export type ResourceAccessVariant = "original" | "playback" | "thumbnail";
export type ResourceAccess = {
resourceId: string;
requestedVariant: ResourceAccessVariant;
@@ -116,6 +116,8 @@ export type ResourceAccess = {
refreshAt: string;
revision: string;
fallbackReason?: string;
originalWidth?: number;
originalHeight?: number;
};
type ResourceAccessBatchItem = { resourceId: string; access?: ResourceAccess; error?: { msg?: string } };