Add more events for sharing and refactor I/O, dialogs (#2443)

This commit is contained in:
Lipis 2020-12-03 17:03:02 +02:00 committed by GitHub
parent c43109a230
commit 66e5b18e4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 87 additions and 75 deletions

View file

@ -1,13 +1,13 @@
import { EVENT_IO, trackEvent } from "../analytics";
import { cleanAppStateForExport } from "../appState";
import { restore } from "./restore";
import { t } from "../i18n";
import { AppState } from "../types";
import { LibraryData, ImportedDataState } from "./types";
import { calculateScrollCenter } from "../scene";
import { MIME_TYPES } from "../constants";
import { CanvasError } from "../errors";
import { clearElementsForExport } from "../element";
import { EVENT_ACTION, trackEvent } from "../analytics";
import { CanvasError } from "../errors";
import { t } from "../i18n";
import { calculateScrollCenter } from "../scene";
import { AppState } from "../types";
import { restore } from "./restore";
import { ImportedDataState, LibraryData } from "./types";
export const parseFileContents = async (blob: Blob | File) => {
let contents: string;
@ -111,7 +111,7 @@ export const loadFromBlob = async (
localAppState,
);
trackEvent(EVENT_ACTION, "load", getMimeType(blob));
trackEvent(EVENT_IO, "load", getMimeType(blob));
return result;
} catch (error) {
console.error(error.message);