feat(web): avatar thumbnails with original preview, registration avatar, pure-JS crypto fallback for http [CI]
ci/woodpecker/push/web-build Pipeline was successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/dev-image Pipeline was successful

This commit is contained in:
justme committed 2026-10-17 14:35:42 +08:00
1 parent 283196938e
commit d66c93fe98
36 files changed
+735 -60

No files matched your search

+5 -1
View File
@@ -2,7 +2,8 @@ import type { AccountProfile } from '../generated/api';
export interface InvitationKeyPair { publicKey: JsonWebKey; privateKey: JsonWebKey }
export interface SigningKeyPair { publicKey: JsonWebKey; privateKey: JsonWebKey }
/** Account vault v2: credentials and cached metadata, encrypted before transport. */
export type PersonalProfile = Pick<AccountProfile, 'displayName' | 'modifiedAt'> & { avatar?: string };
/** avatar 只在加密线程里有(发消息要带头像快照);界面这边通过 hasAvatar 判断,头像另取 */
export type PersonalProfile = Pick<AccountProfile, 'displayName' | 'modifiedAt'> & { avatar?: string; hasAvatar?: boolean };
export interface ResourceDelete { id: string; modifiedAt: number }
export interface VaultResource {
domainKeys?: Record<string, string>;
@@ -25,3 +26,6 @@ export interface VaultResource {
state?: 'draft' | 'sealed';
}
export interface VaultProfile { v: 3; keys: InvitationKeyPair & { signing: SigningKeyPair }; resources: VaultResource[]; deletes: ResourceDelete[] }
/** 资料里头像的修改:换成新的(原图 + 缩略图)、保持不变、或移除(不传) */
export type AvatarChange = { avatar: string; thumb: string } | 'keep' | undefined;