From e6d03aeeea0ce33058cbd220098797e315ba8983 Mon Sep 17 00:00:00 2001 From: Christopher Chedeau Date: Sat, 8 Feb 2020 01:43:59 -0800 Subject: [PATCH] End to end encryption description (#731) * End to end encryption description This PR updates the url upload description to mention that it is end to end encrypted. I used a very similar message as whatsapp so that it is familar to people. I also removed the automatic copying and turned the alert into prompt. This should be less awkward than the current implementation. * capitalize excalidraw Co-authored-by: David Luzar --- src/locales/de.json | 1 - src/locales/en.json | 2 +- src/locales/es.json | 3 +-- src/locales/fr.json | 3 +-- src/locales/nb-no.json | 3 +-- src/locales/pl.json | 3 +-- src/locales/pt.json | 3 +-- src/locales/ru.json | 3 +-- src/scene/data.ts | 12 ++---------- 9 files changed, 9 insertions(+), 24 deletions(-) diff --git a/src/locales/de.json b/src/locales/de.json index f81e53a4..981c5195 100644 --- a/src/locales/de.json +++ b/src/locales/de.json @@ -2,7 +2,6 @@ "alerts": { "cannotExportEmptyCanvas": "Leere Zeichenfläche kann nicht exportiert werden.", "clearReset": "Dies wird die ganze Zeichenfläche löschen. Bist du dir sicher?", - "copiedToClipboard": "In Zwischenablage kopiert: {{url}}", "couldNotCopyToClipboard": "Konnte nicht in die Zwischenablage kopieren. Versuch es mit dem Chrome Browser.", "couldNotCreateShareableLink": "Konnte keinen teilbaren Link erstellen.", "importBackendFailed": "Import vom Server ist fehlgeschlagen." diff --git a/src/locales/en.json b/src/locales/en.json index f58d1b48..7aac9b78 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -61,7 +61,7 @@ "importBackendFailed": "Importing from backend failed.", "cannotExportEmptyCanvas": "Cannot export empty canvas.", "couldNotCopyToClipboard": "Couldn't copy to clipboard. Try using Chrome browser.", - "copiedToClipboard": "Copied to clipboard: {{url}}" + "uploadedSecurly": "The upload has been secured with end-to-end encryption, which means that Excalidraw server and third parties can't read the content." }, "toolBar": { "selection": "Selection", diff --git a/src/locales/es.json b/src/locales/es.json index e636f217..0b6f91e7 100644 --- a/src/locales/es.json +++ b/src/locales/es.json @@ -60,8 +60,7 @@ "couldNotCreateShareableLink": "No se pudo crear un enlace para compartir.", "importBackendFailed": "La importación falló.", "cannotExportEmptyCanvas": "No se puede exportar un lienzo vació", - "couldNotCopyToClipboard": "No se ha podido copiar al portapapeles, intente usar Chrome como navegador.", - "copiedToClipboard": "Copiado en el portapapeles: {{url}}" + "couldNotCopyToClipboard": "No se ha podido copiar al portapapeles, intente usar Chrome como navegador." }, "toolBar": { "selection": "Selección", diff --git a/src/locales/fr.json b/src/locales/fr.json index 341f50bb..f877cb4f 100644 --- a/src/locales/fr.json +++ b/src/locales/fr.json @@ -54,8 +54,7 @@ "couldNotCreateShareableLink": "Impossible de créer un lien de partage.", "importBackendFailed": "L'import depuis le backend a échoué.", "cannotExportEmptyCanvas": "Impossible d'exporter un canvas vide.", - "couldNotCopyToClipboard": "Impossible de copier dans le presse-papier. Essayez d'utiliser le navigateur Chrome.", - "copiedToClipboard": "Copié dans le presse-papier: {{url}}" + "couldNotCopyToClipboard": "Impossible de copier dans le presse-papier. Essayez d'utiliser le navigateur Chrome." }, "toolBar": { "selection": "Sélection", diff --git a/src/locales/nb-no.json b/src/locales/nb-no.json index 043b1278..36b9bf4f 100644 --- a/src/locales/nb-no.json +++ b/src/locales/nb-no.json @@ -60,8 +60,7 @@ "couldNotCreateShareableLink": "Kunne ikke lage delbar lenke.", "importBackendFailed": "Importering av backend feilet.", "cannotExportEmptyCanvas": "Kan ikke eksportere et tomt lerret.", - "couldNotCopyToClipboard": "Kunne ikke kopiere til utklippstavlen. Prøv med nettleseren Chrome.", - "copiedToClipboard": "Kopierte til utklippstavlen: {{url}}" + "couldNotCopyToClipboard": "Kunne ikke kopiere til utklippstavlen. Prøv med nettleseren Chrome." }, "toolBar": { "selection": "Velg", diff --git a/src/locales/pl.json b/src/locales/pl.json index fa59c435..c33a7c0a 100644 --- a/src/locales/pl.json +++ b/src/locales/pl.json @@ -60,8 +60,7 @@ "couldNotCreateShareableLink": "Wystąpił błąd przy generowaniu linka do udostępniania.", "importBackendFailed": "Wystąpił błąd podczas importowania pliku.", "cannotExportEmptyCanvas": "Najpierw musisz coś narysować, aby zapisać dokument.", - "couldNotCopyToClipboard": "Błąd podczas kopiowania. Spróbuj użyć Google Chrome.", - "copiedToClipboard": "Skopiowano link: {{url}}" + "couldNotCopyToClipboard": "Błąd podczas kopiowania. Spróbuj użyć Google Chrome." }, "toolBar": { "selection": "Zaznaczenie", diff --git a/src/locales/pt.json b/src/locales/pt.json index 56b48e20..524ac53b 100644 --- a/src/locales/pt.json +++ b/src/locales/pt.json @@ -54,8 +54,7 @@ "couldNotCreateShareableLink": "Não foi possível criar um link de partilha.", "importBackendFailed": "O carregamento no servidor falhou.", "cannotExportEmptyCanvas": "Não é possível exportar um canvas vazío.", - "couldNotCopyToClipboard": "Não foi possível copiar no clipboard. Experimente no navegador Chrome.", - "copiedToClipboard": "Copiado no clipboard: {{url}}" + "couldNotCopyToClipboard": "Não foi possível copiar no clipboard. Experimente no navegador Chrome." }, "toolBar": { "selection": "Seleção", diff --git a/src/locales/ru.json b/src/locales/ru.json index 568effc3..e20a0f0e 100644 --- a/src/locales/ru.json +++ b/src/locales/ru.json @@ -59,8 +59,7 @@ "couldNotCreateShareableLink": "Не удалось создать общедоступную ссылку.", "importBackendFailed": "Не удалось импортировать из бэкэнда.", "cannotExportEmptyCanvas": "Не может экспортировать пустой холст.", - "couldNotCopyToClipboard": "Не удалось скопировать в буфер обмена. Попробуйте использовать веб-браузер Chrome.", - "copiedToClipboard": "Скопировано в буфер обмена: {{url}}" + "couldNotCopyToClipboard": "Не удалось скопировать в буфер обмена. Попробуйте использовать веб-браузер Chrome." }, "toolBar": { "selection": "Выделение области", diff --git a/src/scene/data.ts b/src/scene/data.ts index 2f31cc94..add3bd42 100644 --- a/src/scene/data.ts +++ b/src/scene/data.ts @@ -15,10 +15,7 @@ import { getCommonBounds, normalizeDimensions } from "../element"; import { Point } from "roughjs/bin/geometry"; import { t } from "../i18n"; -import { - copyTextToSystemClipboard, - copyCanvasToClipboardAsPng, -} from "../clipboard"; +import { copyCanvasToClipboardAsPng } from "../clipboard"; const LOCAL_STORAGE_KEY = "excalidraw"; const LOCAL_STORAGE_SCENE_PREVIOUS_KEY = "excalidraw-previos-scenes"; @@ -191,12 +188,7 @@ export async function exportToBackend( url.hash = `json=${json.id},${exportedKey.k!}`; const urlString = url.toString(); - try { - await copyTextToSystemClipboard(urlString); - window.alert(t("alerts.copiedToClipboard", { url: urlString })); - } catch (err) { - // TODO: link will be displayed for user to copy manually in later PR - } + window.prompt(t("alerts.uploadedSecurly"), urlString); } else { window.alert(t("alerts.couldNotCreateShareableLink")); }