Procházet zdrojové kódy

added consent popup

Former-commit-id: fcd1e49b6392b1769ef01cf06d0503331f265183
Gildas před 6 roky
rodič
revize
2ab6224e56

+ 4 - 0
_locales/de/messages.json

@@ -387,6 +387,10 @@
 		"message": "Existenzberechtigung hinzufügen",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "In Google Drive speichern",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/en/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "save to Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/es/messages.json

@@ -387,6 +387,10 @@
 		"message": "añadir prueba de existencia",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "save en Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/fr/messages.json

@@ -387,6 +387,10 @@
 		"message": "ajouter une preuve d'existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirmez que vous autorisez SingleFile à envoyer à l'API de Woleet un hachage SHA256 de chaque page que vous allez enregistrer. Vous trouverez plus d'informations sur cette fonctionnalité dans la page d'aide ou en cliquant sur le point d'interrogation à côté de l'option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "sauvegarder dans Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/ja/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "Google Drive に保存",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/pl/messages.json

@@ -387,6 +387,10 @@
 		"message": "dodawaj dowód istnienia",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "zapisuj na Dysku Google",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/ru/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "сохранить на Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/uk/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "save to Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/zh_CN/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "save to Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 4 - 0
_locales/zh_TW/messages.json

@@ -387,6 +387,10 @@
 		"message": "add proof of existence",
 		"description": "Options page label: 'add proof of existence'"
 	},
+	"optionsAddProofConfirm": {
+		"message": "Confirm you allow SingleFile to send to the Woleet API a SHA256 hash of each page you are going to save. You can find more information about this feature in the help page or by clicking on the question mark next to the option.",
+		"description": "Popup text displayed wen enabling the option 'add proof of existence'"
+	},
 	"optionSaveToGDrive": {
 		"message": "save to Google Drive",
 		"description": "Options page label: 'save to Google Drive'"

+ 9 - 0
extension/ui/bg/ui-options.js

@@ -359,6 +359,15 @@
 			await browser.runtime.sendMessage({ method: "downloads.disableGDrive" });
 		}
 	}, false);
+	addProofInput.addEventListener("click", async () => {
+		if (addProofInput.checked) {
+			addProofInput.checked = false;
+			if (await confirm(browser.i18n.getMessage("optionsAddProofConfirm"))) {
+				addProofInput.checked = true;
+			}
+			await update();
+		}
+	});
 	synchronizeInput.checked = (await browser.runtime.sendMessage({ method: "config.isSync" })).sync;
 	synchronizeInput.addEventListener("click", async () => {
 		if (synchronizeInput.checked) {