Skip to content

Commit

Permalink
End to end encryption description (excalidraw#731)
Browse files Browse the repository at this point in the history
* 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 <[email protected]>
  • Loading branch information
vjeux and dwelle authored Feb 8, 2020
1 parent f359a1e commit e6d03ae
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 24 deletions.
1 change: 0 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
2 changes: 1 addition & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/nb-no.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/pt.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions src/locales/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@
"couldNotCreateShareableLink": "Не удалось создать общедоступную ссылку.",
"importBackendFailed": "Не удалось импортировать из бэкэнда.",
"cannotExportEmptyCanvas": "Не может экспортировать пустой холст.",
"couldNotCopyToClipboard": "Не удалось скопировать в буфер обмена. Попробуйте использовать веб-браузер Chrome.",
"copiedToClipboard": "Скопировано в буфер обмена: {{url}}"
"couldNotCopyToClipboard": "Не удалось скопировать в буфер обмена. Попробуйте использовать веб-браузер Chrome."
},
"toolBar": {
"selection": "Выделение области",
Expand Down
12 changes: 2 additions & 10 deletions src/scene/data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down Expand Up @@ -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"));
}
Expand Down

0 comments on commit e6d03ae

Please sign in to comment.