Avatar defaults and colors

This commit is contained in:
Josh Perez 2021-08-05 20:17:05 -04:00 committed by GitHub
parent a001882d58
commit 12d2b1bf7c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
140 changed files with 4212 additions and 1084 deletions

18
ts/window.d.ts vendored
View file

@ -135,12 +135,27 @@ type ConfirmationDialogViewProps = {
resolve: () => void;
};
// This is the subset of `window.FontFace` that we need. We should delete this after
// upgrading to TypeScript 4.4, which will include a full declaration in [its official
// DOM type definitions][0].
//
// [0]: https://github.com/microsoft/TypeScript/blob/03dff41c9f2038f66fb358e5c23ebd7271145978/lib/lib.dom.d.ts#L5343-L5364
declare class FontFace {
constructor(
family: string,
source: string | ArrayBuffer | ArrayBufferView,
descriptors?: unknown
);
load(): Promise<FontFace>;
}
declare global {
// We want to extend `window`'s properties, so we need an interface.
// eslint-disable-next-line no-restricted-syntax
interface Window {
startApp: () => void;
FontFace: typeof FontFace;
_: typeof Underscore;
$: typeof jQuery;
@ -339,6 +354,9 @@ declare global {
readDraftData: any;
saveAttachmentToDisk: any;
writeNewDraftData: any;
deleteAvatar: (path: string) => Promise<void>;
getAbsoluteAvatarPath: (src: string) => string;
writeNewAvatarData: (data: ArrayBuffer) => Promise<string>;
};
Types: {
Attachment: typeof Attachment;