Merge branch 'soon' into support-categories

pull/1/head
ansuz 3 years ago
commit 51c56150c8

@ -135,7 +135,7 @@ Our team has limited resources, so we've chosen to introduce the new (and **expe
To enable the use of the OnlyOffice Document and Presentation editor for everyone on your instance, edit your [customize/application_config.js](https://docs.cryptpad.fr/en/admin_guide/customization.html#application-config) file to include `AppConfig.enableEarlyAccess = true;`.
If you wish to avoid a rush of support tickets from your users by limiting early access to users with custom quota increases, add another line like so `Constants.earlyAccessApps = ['doc', 'presentation'];`.
If you wish to avoid a rush of support tickets from your users by limiting early access to users with custom quota increases, add another line like so `AppConfig.premiumTypes = ['doc', 'presentation'];`.
As these editors become more stable we plan to enable them by default on third-party instances. Keep in mind, these editors may be unstable and users may lose their work. Our team will fix bugs given sufficient information to reproduce them, but we will not take the time to help you recover lost data unless you have taken a support contract with us.

@ -86,11 +86,11 @@ define([
}
} catch (e) { console.error(e); failStore(); }
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
if (typeof(Promise) !== 'function') {
setTimeout(function () {
return void setTimeout(function () {
var s = "Internet Explorer is not supported anymore, including by Microsoft.\n\nMost of CryptPad's collaborative functionality requires a modern browser to work.\n\nWe recommend Mozilla Firefox.";
window.alert(s);
});
}
require([document.querySelector('script[data-bootload]').getAttribute('data-bootload')]);
});

@ -808,7 +808,9 @@ define([
h('span.cp-toolbar-name.cp-toolbar-drawer-element', Messages.toolbar_storeInDrive)
])).click(common.prepareFeedback(type)).click(function () {
$(button).hide();
common.getSframeChannel().query("Q_AUTOSTORE_STORE", null, function (err, obj) {
common.getSframeChannel().query("Q_AUTOSTORE_STORE", {
forceOwnDrive: true,
}, function (err, obj) {
var error = err || (obj && obj.error);
if (error) {
$(button).show();

@ -974,6 +974,9 @@ define([
data.forceSave = 1;
//delete common.initialTeam;
}
if (data.forceOwnDrive) {
data.teamId = -1;
}
if (common.initialPath) {
if (!data.path) {
data.path = Array.isArray(common.initialPath) ? common.initialPath

@ -1159,7 +1159,7 @@ define([
expire = data.expire;
}
var storeLocally = data.teamId === -1;
//var storeLocally = data.teamId === -1;
if (data.teamId === -1) { data.teamId = undefined; }
// If a teamId is provided, it means we want to store the pad in a specific
@ -1170,11 +1170,8 @@ define([
// If it is stored, update its data, otherwise ask the user if they want to store it
var allData = [];
var sendTo = [];
var inMyDrive;
var inTargetDrive, inMyDrive;
getAllStores().forEach(function (s) {
if (data.teamId && s.id !== data.teamId) { return; }
if (storeLocally && s.id) { return; }
// If this is an edit link but we don't have edit rights, this entry is not useful
if (h.mode === "edit" && s.id && !s.secondaryKey) {
return;
@ -1185,16 +1182,15 @@ define([
sendTo.push(s.id);
}
// If we've just accepted ownership for a pad stored in a shared folder,
// we need to make a copy of this pad in our drive. We're going to check
// if the pad is stored in our MAIN drive.
// We only need to check this if the current manager is the target (data.teamId)
if (data.teamId === s.id) {
inMyDrive = res.some(function (obj) {
return !obj.fId;
});
// Check if the pad is already stored in the specified drive (data.teamId)
if ((!s.id && !data.teamId) || Number(s.id) === data.teamId) {
if (!inTargetDrive) {
inTargetDrive = res.length;
}
}
if (!s.id) { inMyDrive = res.length; }
Array.prototype.push.apply(allData, res);
});
var contains = allData.length !== 0;
@ -1231,7 +1227,7 @@ define([
});
// Add the pad if it does not exist in our drive
if (!contains || (data.forceSave && !inMyDrive)) {
if (!contains || (data.forceSave && !inTargetDrive)) {
var autoStore = Util.find(store.proxy, ['settings', 'general', 'autostore']);
if (autoStore !== 1 && !data.forceSave && !data.path) {
// send event to inner to display the corner popup
@ -1258,7 +1254,8 @@ define([
}, cb);
// Let inner know that dropped files shouldn't trigger the popup
postMessage(clientId, "AUTOSTORE_DISPLAY_POPUP", {
stored: true
stored: true,
inMyDrive: inMyDrive || (!contains && !data.teamId) // display "store in cryptdrive" entry
});
return;
}

@ -1181,7 +1181,8 @@ define([
title: currentTitle,
channel: secret.channel,
path: initialPathInDrive, // Where to store the pad if we don't have it in our drive
forceSave: true
forceSave: true,
forceOwnDrive: obj && obj.forceOwnDrive
};
setPadTitle(data, cb);
});

@ -669,5 +669,24 @@
"footer_product": "Producto",
"admin_flushCacheDone": "Vaciado de caché exitoso",
"admin_flushCacheButton": "Vaciar caché",
"admin_flushCacheHint": "Obligar a usuarios a descargar los recursos más nuevos para el cliente (sólo si su servidor está en modo actualizado o “fresh mode”)"
"admin_flushCacheHint": "Obligar a usuarios a descargar los recursos más nuevos para el cliente (sólo si su servidor está en modo actualizado o “fresh mode”)",
"profile_friendRequestSent": "Pedido de contacto pendiente...",
"profile_info": "Otros usuarios pueden encontrar su perfil haciendo clic en su nombre en la lista de usuarios de los documentos.",
"profile_addLink": "Añade un enlace a su sitio web",
"profile_editDescription": "Edita su descripción",
"profile_addDescription": "Añadir una descripción",
"notifications_empty": "No hay notificaciones disponibles",
"friendRequest_notification": "<b>{0}</b> le envió una solicitud de contacto",
"friendRequest_received": "<b>{0}</b> quiere ser tu contato",
"friendRequest_accepted": "<b>{0}</b> aceptó su solicitud de contacto",
"friendRequest_declined": "<b>{0}</b> rechazó su solicitud de contacto",
"friendRequest_decline": "Declinar",
"friendRequest_accept": "Aceptar (Enter)",
"friendRequest_later": "Decidir después",
"drive_activeOld": "Documentos menos recientes",
"drive_active28Days": "Últimas 4 semanas",
"drive_active7Days": "Últimos 7 dias",
"drive_active1Day": "Últimas 24 horas",
"settings_codeSpellcheckLabel": "Habilite la verificación ortográfica en el editor de código",
"settings_codeSpellcheckTitle": "Corrección ortográfica"
}

@ -964,7 +964,7 @@
"todo_move": "Votre liste de tâches est désormais dans le kanban <b>{0}</b> dans votre Drive.",
"settings_safeLinkDefault": "Les liens sécurisés sont désormais activés par défaut. Veuillez utiliser le menu <i></i> <b>Partager</b> pour copier les liens plutôt que la barre d'adresse de votre navigateur.",
"support_languagesPreamble": "L'équipe de support parle les langues suivantes :",
"info_privacyFlavour": "<a>Description de la confidentialité</a> de vos données.",
"info_privacyFlavour": "<a>Déclaration de confidentialité</a> pour cette instance",
"user_about": "À propos de CryptPad",
"info_imprintFlavour": "<a>Informations légales sur les administrateurs de cette instance</a>.",
"support_cat_all": "Tout",
@ -1427,5 +1427,14 @@
"form_exportSheet": "Exporter vers Tableur",
"form_answerChoice": "Veuillez choisir comment vous souhaitez répondre à ce formulaire :",
"bounce_danger": "Le lien sur lequel vous avez cliqué ne mène pas à une page web mais à du code ou des données qui pourraient être dangereuses.\n\n(\"{0}\")\n\nCryptPad bloque ce type de lien pour des raisons de sécurité. En cliquant sur OK, vous fermerez cet onglet.",
"bounce_confirm": "Vous êtes sur le point de quitter : {0}\n\nÊtes vous sûr de vouloir visiter \"{1}\" ?"
"bounce_confirm": "Vous êtes sur le point de quitter : {0}\n\nÊtes vous sûr de vouloir visiter \"{1}\" ?",
"info_sourceFlavour": "<a>Code source</a> de CryptPad",
"info_termsFlavour": "<a>Conditions d'utilisation</a> pour cette instance",
"footer_source": "Code source",
"admin_jurisdictionHint": "Le pays où les données chiffrées de cette instance sont hébergées",
"admin_descriptionHint": "Le texte descriptif affiché pour cette instance dans la liste des instances publiques sur cryptpad.org",
"admin_descriptionTitle": "Description de l'instance",
"admin_nameHint": "Le nom affiché pour cette instance dans la liste des instances publiques sur cryptpad.org",
"admin_nameTitle": "Nom de l'instance",
"admin_archiveNote": "Note"
}

@ -1422,5 +1422,10 @@
"form_conditional_addAnd": "「かつ」の条件を追加",
"form_conditional_add": "「あるいは」の条件を追加",
"form_condition_isnot": "等しくない",
"form_condition_is": "等しい"
"form_condition_is": "等しい",
"form_template_poll": "スケジュールの投票のテンプレート",
"bounce_danger": "クリックしたリンクは、ウェブページではなく、悪質かもしれないコードやデータに結びついています。\n\n(\"{0}\")\n\nセキュリティー上の理由で、CryptPadはこのデータをブロックしています。OKをクリックするとタブが閉じます。",
"bounce_confirm": "このページから退出しようとしています: {0}\n\n次のページを開いてよろしいですか{1}",
"form_condition_hasnot": "含まない",
"form_condition_has": "含む"
}

@ -967,9 +967,9 @@
"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 <i></i> <b>Share</b> menu to copy links rather than your browser's address bar.",
"info_imprintFlavour": "<a>Legal information about the administrators of this instance</a>.",
"info_imprintFlavour": "<a>Legal information about the administrators of this instance</a>",
"user_about": "About CryptPad",
"info_privacyFlavour": "Our <a>privacy policy</a> describes how we treat your data.",
"info_privacyFlavour": "<a>Privacy policy</a> for this instance",
"support_cat_account": "User account",
"support_cat_data": "Loss of content",
"support_cat_bug": "Bug report",
@ -1427,5 +1427,16 @@
"form_exportSheet": "Export to Sheet",
"form_answerChoice": "Please choose how you would like to answer this form:",
"bounce_confirm": "You are about to leave: {0}\n\nAre you sure you want to visit \"{1}\"?",
"bounce_danger": "The link you clicked does not lead to a web-page but to some code or data that could be malicious.\n\n(\"{0}\")\n\nCryptPad blocks these for security reasons. Clicking OK will close this tab."
"bounce_danger": "The link you clicked does not lead to a web-page but to some code or data that could be malicious.\n\n(\"{0}\")\n\nCryptPad blocks these for security reasons. Clicking OK will close this tab.",
"admin_archiveNote": "Note",
"admin_nameTitle": "Instance name",
"admin_nameHint": "The name displayed for this instance in the list of public instances on cryptpad.org",
"ui_saved": "{0} saved",
"admin_descriptionTitle": "Instance description",
"admin_descriptionHint": "The descriptive text displayed for this instance in the list of public instances on cryptpad.org",
"admin_jurisdictionTitle": "Hosting location",
"admin_jurisdictionHint": "The country where this instance's encrypted data is hosted",
"footer_source": "Source code",
"info_termsFlavour": "<a>Terms of service</a> for this instance",
"info_sourceFlavour": "<a>Source code</a> for CryptPad"
}

@ -13,6 +13,9 @@ define([
'/common/common-interface.js',
], function (nThen, ApiConfig, $, RequireConfig, SFCommonO,
Cryptpad, Util, Hash, Realtime, Constants, UI) {
if (window.top !== window) {
return void window.alert(`If you are seeing this message then somebody might be trying to compromise your CryptPad account. Please contact the CryptPad development team.`);
}
window.Cryptpad = {
Common: Cryptpad,

@ -706,7 +706,7 @@ define([
}
var day = _date && allDays[_date.getDay()];
return h('div.cp-poll-cell.cp-form-poll-option', {
title: Util.fixHTML(data)
title: data,
}, [
opts.type === 'day' ? h('span.cp-form-weekday', day) : undefined,
opts.type === 'day' ? h('span.cp-form-weekday-separator', ' - ') : undefined,
@ -865,7 +865,7 @@ define([
if (totalMax.value) {
$total.find('[data-id]').removeClass('cp-poll-best');
totalMax.data.forEach(function (k) {
$total.find('[data-id="'+k+'"]').addClass('cp-poll-best');
$total.find('[data-id="'+ (k.replace(/"/g, '\\"')) + '"]').addClass('cp-poll-best');
});
}
};
@ -986,6 +986,12 @@ define([
});
});
var linkClickHandler = function (ev) {
ev.preventDefault();
var href = ($(this).attr('href') || '').trim();
if (!href) { return; }
APP.common.openUnsafeURL(href);
};
var STATIC_TYPES = {
md: {
@ -999,6 +1005,8 @@ define([
}, opts.text);
var $tag = $(tag);
DiffMd.apply(DiffMd.render(opts.text || ''), $tag, APP.common);
$tag.find('a').click(linkClickHandler);
var cursorGetter;
return {
tag: tag,
@ -2904,6 +2912,7 @@ define([
if (content.answers.msg) {
var $desc = $(description);
DiffMd.apply(DiffMd.render(content.answers.msg), $desc, APP.common);
$desc.find('a').click(linkClickHandler);
}
var actions = h('div.cp-form-submit-actions', [

@ -10,6 +10,7 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, Cryptpad, Login, UI, Realtime, Feedback, LocalStore /*, Test */) {
if (window.top !== window) { return; }
$(function () {
var $checkImport = $('#import-recent');
if (LocalStore.isLoggedIn()) {

@ -14,6 +14,7 @@ define([
'css!/bower_components/components-font-awesome/css/font-awesome.min.css',
], function ($, Login, Cryptpad, /*Test,*/ Cred, UI, Util, Realtime, Constants, Feedback, LocalStore, h) {
if (window.top !== window) { return; }
var Messages = Cryptpad.Messages;
$(function () {
if (LocalStore.isLoggedIn()) {

Loading…
Cancel
Save