2dd1796351
* Add encryption In order to avoid the server being able to read the content of the scene, this PR implements local encryption and decryption. This implements the algorithm described in #610. Right now the server doesn't support uploading binary files. I mocked the server with comments. @lipis, could you add support on the server and update this PR? I added a bunch of TODO: that tell you where to comment/uncomment in order to get the server flow going. To test locally right now: - Import: Open http://localhost:3000/#json=1234,5oYVOnGpWYPPTz19-PMYYw and see a square - Export: Click the export link and see the right url with the private key + the encrypted binary in the console Fixes #610 * backend_v2 * v2
26 lines
487 B
TypeScript
26 lines
487 B
TypeScript
import { ExcalidrawTextElement } from "../element/types";
|
|
|
|
export type SceneState = {
|
|
scrollX: number;
|
|
scrollY: number;
|
|
// null indicates transparent bg
|
|
viewBackgroundColor: string | null;
|
|
};
|
|
|
|
export type SceneScroll = {
|
|
scrollX: number;
|
|
scrollY: number;
|
|
};
|
|
|
|
export interface Scene {
|
|
elements: ExcalidrawTextElement[];
|
|
}
|
|
|
|
export interface PreviousScene {
|
|
id: string;
|
|
k?: string;
|
|
timestamp: number;
|
|
}
|
|
|
|
export type ExportType = "png" | "clipboard" | "backend" | "svg";
|