').html(cMsg));
+ var msg;
+ if (common.isLoggedIn()) {
+ msg = Pages.setHTML(h('div'), Messages.movedToTrash);
+ $(msg).find('a').attr('href', '/drive/');
+ common.fixLinks(msg);
+ } else {
+ msg = h('div', Messages.deleted);
+ }
UI.alert(msg);
callback();
return;
@@ -2715,7 +2721,7 @@ define([
common.openURL(priv.accounts.donateURL);
Feedback.send('CROWDFUNDING_YES');
});
- $(modal.popup).find('a').click(function (e) {
+ $(modal.popup).find('a').click(function (e) { // XXX do we really need both a link and a button? (the link is the less popular option)
e.stopPropagation();
e.preventDefault();
modal.delete();
@@ -2761,7 +2767,7 @@ define([
priv.pathname.indexOf('/drive/') !== -1 ? Messages.autostore_sf :
Messages.autostore_pad;
var text = Messages._getKey('autostore_notstored', [typeMsg]);
- var footer = Messages.autostore_settings;
+ var footer = Pages.setHTML(h('span'), Messages.autostore_settings);
var hide = h('button.cp-corner-cancel', Messages.autostore_hide);
var store = h('button.cp-corner-primary', Messages.autostore_store);
diff --git a/www/common/feedback-main.js b/www/common/feedback-main.js
index f9726c689..d31fd6876 100644
--- a/www/common/feedback-main.js
+++ b/www/common/feedback-main.js
@@ -1,5 +1,10 @@
define([
'/common/common-language.js',
+ 'less!/customize/src/less2/pages/page-feedback.less',
], function (Language) {
Language.applyTranslation();
+ var optoutLink = document.querySelector('#optout a');
+ if (optoutLink) {
+ optoutLink.setAttribute('href', '/settings/');
+ }
});
diff --git a/www/common/feedback.html b/www/common/feedback.html
index 20954e262..4025fd357 100644
--- a/www/common/feedback.html
+++ b/www/common/feedback.html
@@ -11,9 +11,9 @@ body {
-
If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions
+
If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions.
We care about your privacy, and at the same time we want CryptPad to be very easy to use.
We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.
-
If you would like to opt out, visit your user settings page, where you'll find a checkbox to enable or disable user feedback
+
If you would like to opt out, visit your user settings page, where you'll find a checkbox to enable or disable user feedback.
diff --git a/www/common/notifications.js b/www/common/notifications.js
index 478b765c7..10831b353 100644
--- a/www/common/notifications.js
+++ b/www/common/notifications.js
@@ -7,7 +7,8 @@ define([
'/common/common-util.js',
'/common/common-constants.js',
'/customize/messages.js',
-], function($, h, Hash, UI, UIElements, Util, Constants, Messages) {
+ '/customize/pages.js',
+], function($, h, Hash, UI, UIElements, Util, Constants, Messages, Pages) {
var handlers = {};
@@ -395,7 +396,10 @@ define([
handlers['SAFE_LINKS_DEFAULT'] = function (common, data) {
var content = data.content;
content.getFormatText = function () {
- return Messages.settings_safeLinkDefault;
+ var msg = Pages.setHTML(h('span'), Messages.settings_safeLinkDefault);
+ var i = msg.querySelector('i');
+ if (i) { i.classList = 'fa fa-shhare-alt'; }
+ return msg.innerHTML;
};
content.handler = function () {
diff --git a/www/common/sframe-common.js b/www/common/sframe-common.js
index c46a0641d..f75d5afd3 100644
--- a/www/common/sframe-common.js
+++ b/www/common/sframe-common.js
@@ -16,6 +16,7 @@ define([
'/common/metadata-manager.js',
'/customize/application_config.js',
+ '/customize/pages.js',
'/common/common-realtime.js',
'/common/common-util.js',
'/common/common-hash.js',
@@ -23,7 +24,8 @@ define([
'/common/common-interface.js',
'/common/common-feedback.js',
'/common/common-language.js',
- '/bower_components/localforage/dist/localforage.min.js'
+ '/bower_components/localforage/dist/localforage.min.js',
+ '/common/hyperscript.js',
], function (
$,
nThen,
@@ -41,6 +43,7 @@ define([
MT,
MetadataMgr,
AppConfig,
+ Pages,
CommonRealtime,
Util,
Hash,
@@ -48,7 +51,8 @@ define([
UI,
Feedback,
Language,
- localForage
+ localForage,
+ h
) {
// Chainpad Netflux Inner
var funcs = {};
@@ -765,7 +769,14 @@ define([
UI.addTooltips();
ctx.sframeChan.on("EV_PAD_NODATA", function () {
- UI.errorLoadingScreen(Messages.safeLinks_error);
+ var error = Pages.setHTML(h('span'), Messages.safeLinks_error);
+ var i = error.querySelector('i');
+ if (i) { i.classList = 'fa fa-shhare-alt'; }
+ var a = error.querySelector('a');
+ if (a) {
+ a.setAttribute('href', "https://docs.cryptpad.fr/en/user_guide/user_account.html#confidentiality");
+ }
+ UI.errorLoadingScreen(error);
});
ctx.sframeChan.on("EV_PAD_PASSWORD", function (cfg) {
diff --git a/www/common/toolbar.js b/www/common/toolbar.js
index 172cb9e40..46afd310a 100644
--- a/www/common/toolbar.js
+++ b/www/common/toolbar.js
@@ -11,8 +11,9 @@ define([
'/common/hyperscript.js',
'/common/messenger-ui.js',
'/customize/messages.js',
+ '/customize/pages.js',
], function ($, Config, ApiConfig, UIElements, UI, Hash, Util, Feedback, MT, h,
-MessengerUI, Messages) {
+MessengerUI, Messages, Pages) {
var Common;
var Bar = {
@@ -958,15 +959,24 @@ MessengerUI, Messages) {
var todo = function (e, overLimit) {
if (e) { return void console.error("Unable to get the pinned usage", e); }
if (overLimit) {
- var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert
- if (!ApiConfig.allowSubscriptions) {
- key = 'pinLimitReachedAlertNoAccounts'; // Msg.pinLimitReachedAlertNoAccounts
- }
$limit.show().click(function () {
- UI.alert(Messages._getKey(key, [encodeURIComponent(l.hostname)]), null, true);
+ if (ApiConfig.allowSubscriptions && Config.upgradeURL) {
+ var key = 'pinLimitReachedAlert'; // Msg.pinLimitReachedAlert
+ var msg = Pages.setHTML(h('span'), Messages.pinLimitReachedAlert);
+ $(msg).find('a').attr({
+ target: '_blank',
+ href: Config.upgradeURL,
+ });
+
+ UI.alert(msg);
+ } else {
+ UI.alert(Messages.pinLimitReachedAlertNoAccounts);
+ }
});
}
};
+ //todo(void 0, true);
+
Common.isOverPinLimit(todo);
return $limit;
diff --git a/www/common/translations/messages.json b/www/common/translations/messages.json
index ceec7b35f..f1c11c5c3 100644
--- a/www/common/translations/messages.json
+++ b/www/common/translations/messages.json
@@ -70,7 +70,7 @@
"formattedGB": "{0} GB",
"formattedKB": "{0} KB",
"pinLimitReached": "You've reached your storage limit",
- "pinLimitReachedAlert": "You've reached your storage limit. New pads won't be stored in your CryptDrive.
You can either remove pads from your CryptDrive or
subscribe to a premium offer to increase your limit.",
+ "pinLimitReachedAlert": "You've reached your storage limit. New pads won't be stored in your CryptDrive.
You can either remove pads from your CryptDrive or
subscribe to a premium offer to increase your limit.",
"pinLimitReachedAlertNoAccounts": "You've reached your storage limit",
"pinLimitNotPinned": "You've reached your storage limit.
This pad is not stored in your CryptDrive.",
"pinLimitDrive": "You've reached your storage limit.
You can't create new pads.",
@@ -87,7 +87,7 @@
"saveTitle": "Save the title (enter)",
"forgetButton": "Delete",
"forgetPrompt": "Clicking OK will move this pad to your trash. Are you sure?",
- "movedToTrash": "That pad has been moved to the trash.
Access my Drive",
+ "movedToTrash": "That pad has been moved to the trash.
Access my Drive",
"shareButton": "Share",
"shareSuccess": "Copied link to clipboard",
"userListButton": "User list",
@@ -342,7 +342,7 @@
"login_invalPass": "Password required",
"login_unhandledError": "An unexpected error occurred :(",
"register_importRecent": "Import documents from your unregistered session",
- "register_acceptTerms": "I accept
the terms of service",
+ "register_acceptTerms": "I accept
the terms of service",
"register_passwordsDontMatch": "Passwords do not match!",
"register_passwordTooShort": "Passwords must be at least {0} characters long.",
"register_mustAcceptTerms": "You must accept the terms of service.",
@@ -350,7 +350,7 @@
"register_header": "Register",
"register_writtenPassword": "I have written down my username and password, proceed",
"register_cancel": "Cancel",
- "register_warning": "
Warning",
+ "register_warning": "Warning",
"register_alreadyRegistered": "This user already exists, do you want to log in?",
"register_emailWarning0": "It looks like you submitted your email as your username.",
"register_emailWarning1": "You can do that if you want, but it won't be sent to our server.",
@@ -519,7 +519,7 @@
"whatis_drive": "Organization with CryptDrive",
"policy_title": "CryptPad Privacy Policy",
"policy_whatweknow": "What we know about you",
- "policy_whatweknow_p1": "As an application that is hosted on the web, CryptPad has access to metadata exposed by the HTTP protocol. This includes your IP address, and various other HTTP headers that can be used to identify your particular browser. You can see what information your browser is sharing by visiting
WhatIsMyBrowser.com.",
+ "policy_whatweknow_p1": "As an application that is hosted on the web, CryptPad has access to metadata exposed by the HTTP protocol. This includes your IP address, and various other HTTP headers that can be used to identify your particular browser. You can see what information your browser is sharing by visiting
WhatIsMyBrowser.com.",
"policy_howweuse": "How we use what we learn",
"policy_howweuse_p1": "We use this information to make better decisions about promoting CryptPad, by evaluating which of our past efforts were successful. Information about your location lets us know whether we should consider providing better support for languages other than English.",
"policy_howweuse_p2": "Information about your browser (whether it's a desktop or mobile operating system) helps us make decisions when prioritizing feature improvements. Our development team is small, and we try to make choices that will improve as many users' experience as possible.",
@@ -531,7 +531,7 @@
"policy_ads_p1": "We do not display any online advertising, though we may link to the bodies which are financing our research.",
"policy_choices": "Choices you have",
"policy_choices_open": "Our code is open source, so you always have the option of hosting your own instance of CryptPad.",
- "policy_choices_vpn": "If you want to use our hosted instance, but don't want to expose your IP address, you can protect your IP using the
Tor browser bundle, or a
VPN.",
+ "policy_choices_vpn": "If you want to use our hosted instance, but don't want to expose your IP address, you can protect your IP using the
Tor browser bundle.",
"features": "Features",
"features_title": "Features",
"features_anon": "Non-registered",
@@ -599,9 +599,9 @@
"readme_cat3_l1": "With CryptPad code editor, you can collaborate on code like Javascript and markdown like HTML and Markdown",
"readme_cat3_l2": "With CryptPad slide editor, you can make quick presentations using Markdown",
"readme_cat3_l3": "With CryptPoll you can take quick votes, especially for scheduling meetings which fit with everybody's calendar",
- "feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions",
+ "feedback_about": "If you're reading this, you were probably curious why CryptPad is requesting web pages when you perform certain actions.",
"feedback_privacy": "We care about your privacy, and at the same time we want CryptPad to be very easy to use. We use this file to figure out which UI features matter to our users, by requesting it along with a parameter specifying which action was taken.",
- "feedback_optout": "If you would like to opt out, visit
your user settings page, where you'll find a checkbox to enable or disable user feedback",
+ "feedback_optout": "If you would like to opt out, visit
your user settings page, where you'll find a checkbox to enable or disable user feedback.",
"creation_404": "This pad no longer exists. Use the following form to create a new pad.",
"creation_owned": "Owned pad",
"creation_owned1": "An
owned item can be destroyed whenever the owner wants. Destroying an owned item makes it unavailable from other users' CryptDrives.",
@@ -657,7 +657,7 @@
"autostore_sf": "folder",
"autostore_pad": "pad",
"autostore_notstored": "This {0} is not in your CryptDrive. Do you want to store it now?",
- "autostore_settings": "You can enable automatic pad storage in your
Settings page!",
+ "autostore_settings": "You can enable automatic pad storage in your
Settings page!",
"autostore_store": "Store",
"autostore_hide": "Don't store",
"autostore_error": "Unexpected error: we were unable to store this pad, please try again.",
@@ -748,7 +748,7 @@
"support_disabledHint": "This CryptPad instance is not yet configured to use a support form.",
"support_cat_new": "New ticket",
"support_formTitle": "New Ticket",
- "support_formHint": "Use this form to securely contact the administrators about issues and questions.
Please note that some issues/questions may already be addressed in the
CryptPad User Guide. Please do not create a new ticket if you already have an open ticket about the same issue. Instead, reply to your original message with any additional information.",
+ "support_formHint": "Use this form to securely contact the administrators about issues and questions.
Please note that some issues/questions may already be addressed in the
CryptPad User Guide. Please do not create a new ticket if you already have an open ticket about the same issue. Instead, reply to your original message with any additional information.",
"support_formButton": "Send",
"support_formTitleError": "Error: title is empty",
"support_formContentError": "Error: content is empty",
@@ -922,7 +922,7 @@
"settings_cat_security": "Confidentiality",
"settings_safeLinksTitle": "Safe Links",
"settings_safeLinksCheckbox": "Enable safe links",
- "safeLinks_error": "This link was copied from the browser's address bar and does not provide access to the document. Please use the
Share menu to share directly with contacts or copy the link.
Read more about the Safe Links feature.\n",
+ "safeLinks_error": "This link was copied from the browser's address bar and does not provide access to the document. Please use the
Share menu to share directly with contacts or copy the link.
Read more about the Safe Links feature.",
"dontShowAgain": "Don't show again",
"profile_login": "You need to log in to add this user to your contacts",
"settings_safeLinksHint": "CryptPad includes the keys to decrypt your pads in their links. Anyone with access to your browsing history can potentially read your data. This includes intrusive browser extensions and browsers that sync your history across devices. Enabling \"safe links\" prevents the keys from entering your browsing history or being displayed in your address bar whenever possible. We strongly recommend that you enable this feature and use the {0} Share menu.",
@@ -1005,7 +1005,7 @@
"slide_backCol": "Background color",
"slide_textCol": "Text color",
"support_languagesPreamble": "The support team speaks the following languages:",
- "settings_safeLinkDefault": "Safe Links are now turned on by default. Please use the
Share menu to copy links rather than your browser's address bar.",
+ "settings_safeLinkDefault": "Safe Links are now turned on by default. Please use the
Share menu to copy links rather than your browser's address bar.",
"info_imprintFlavour": "
Legal information about the administrators of this instance.",
"user_about": "About CryptPad",
"info_privacyFlavour": "Our
privacy policy describes how we treat your data.",
@@ -1138,9 +1138,9 @@
"home_privacy_text": "CryptPad is built to enable collaboration while keeping data private. All content is encrypted and decrypted by your browser. This means documents, chats, and files are unreadable outside of the session where you are logged in. Even the service administrators do not have access to your information.",
"home_host_title": "About this instance",
"home_opensource_title": "Open Source",
- "home_opensource": "Anyone can host CryptPad and offer the service in a personal or professional capacity. The source code is available on
Github.",
+ "home_opensource": "Anyone can host CryptPad and offer the service in a personal or professional capacity. The source code is available on
Github.",
"home_support_title": "Support CryptPad",
- "home_support": "
The development team does not profit from user data in any way. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, we aim to build a sustainable model funded willingly by users.
You can support the project by making a one-time or recurring donation through our Open Collective. Our budget is transparent and updates are published regularly. There are also a number of non-financial ways to contribute.
",
+ "home_support": "
The development team does not profit from user data in any way. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, we aim to build a sustainable model funded willingly by users.
You can support the project by making a one-time or recurring donation through our Open Collective. Our budget is transparent and updates are published regularly. There are also a number of non-financial ways to contribute.
",
"register_notes_title": "Important notes",
"register_notes": "
- Your password is the secret key that encrypts all of your documents. If you lose it there is no way we can recover your data.
- If you are using a shared computer, remember to log out when you are done. Only closing the browser window leaves your account exposed.
- To keep the documents you created and/or stored without being logged in, tick \"Import documents from your anonymous session\".
",
"register_warning_note": "Due to the encrypted nature of CryptPad, the service administrators will not be able to recover data in case you forget your username and/or password. Please save them in a safe place.",
@@ -1151,7 +1151,7 @@
"whatis_model": "Business model",
"whatis_model_info": "
CryptPad has been supported since 2016 by French and European research grants such as BPI France, NLNet Foundation, NGI Trust, Mozilla Open Source Support, as well as donations and subscriptions to cryptpad.fr. We believe that public money should fund public code, so the service is fully open source. This means anyone can use, host, and modify the software.
CryptPad does not profit from user data. This is part of a vision for online services that respect privacy. Unlike the big platforms that pretend to be \"free\" while making profits from personal information, CryptPad aims to build a sustainable model funded willingly by users.
We offer CryptPad's functionality for free because we believe everyone deserves personal privacy, not just people with disposable income. If you are in a position to support the project, you will contribute new features, improvements and maintenance that benefit all users.
Now that the feasibility of the project has been established, the next goal is to make it financially sustainable through user funding. If you would like to support CryptPad and help make it a sustainable alternative to the big platforms, please consider making a one-time or recurring donation.
",
"whatis_xwiki": "Made at XWiki",
- "whatis_xwiki_info": "
CryptPad is made at XWiki, a company based in Paris, France that has been making open-source software for over 15 years. We have extensive experience making collaborative software to organise information. Our track record shows we are committed to the long-term development and maintenance of CryptPad.
",
+ "whatis_xwiki_info": "
CryptPad is made at XWiki, a company based in Paris, France that has been making open-source software for over 15 years. We have extensive experience making collaborative software to organise information. Our track record shows we are committed to the long-term development and maintenance of CryptPad.
",
"creation_expiresIn": "Expires in",
"creation_helperText": "Open in documentation",
"docs_link": "Documentation",
diff --git a/www/register/main.js b/www/register/main.js
index 3c77d0f53..b241fd4e5 100644
--- a/www/register/main.js
+++ b/www/register/main.js
@@ -102,7 +102,11 @@ define([
setTimeout(function () {
var span = h('span', [
- UI.setHTML(h('h2'), Messages.register_warning), // TODO remove the icon from this translation string and pass it separately
+ h('h2', [
+ h('i.fa.fa-warning'),
+ ' ',
+ Messages.register_warning,
+ ]),
Messages.register_warning_note
]);
diff --git a/www/support/inner.js b/www/support/inner.js
index 0c70e7900..7e3e56253 100644
--- a/www/support/inner.js
+++ b/www/support/inner.js
@@ -168,6 +168,11 @@ define([
create['form'] = function () {
var key = 'form';
var $div = makeBlock(key, true); // Msg.support_formHint, .support_formTitle, .support_formButton
+ $div.find('a').attr({
+ rel: 'noopener noreferrer',
+ target: '_blank',
+ href: 'https://docs.cryptpad.fr/en/user_guide/index.html',
+ });
var form = APP.support.makeForm();