Merge branch 'staging' of github.com:xwiki-labs/cryptpad into staging
This commit is contained in:
commit
6cb331887e
@ -3,7 +3,7 @@
|
|||||||
<head>
|
<head>
|
||||||
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
<meta content="text/html; charset=utf-8" http-equiv="content-type"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||||
<script data-main="main" src="/bower_components/requirejs/require.js"></script>
|
<script data-bootload="main.js" data-main="/common/boot.js" src="/bower_components/requirejs/require.js"></script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|||||||
@ -103,11 +103,13 @@ define([
|
|||||||
return;
|
return;
|
||||||
};
|
};
|
||||||
|
|
||||||
var feedback = common.feedback = function (action) {
|
var feedback = common.feedback = function (action, force) {
|
||||||
if (!action) { return; }
|
if (force !== true) {
|
||||||
try {
|
if (!action) { return; }
|
||||||
if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
|
try {
|
||||||
} catch (e) { return void console.error(e); }
|
if (!getStore().getProxy().proxy.allowUserFeedback) { return; }
|
||||||
|
} catch (e) { return void console.error(e); }
|
||||||
|
}
|
||||||
|
|
||||||
var href = '/common/feedback.html?' + action + '=' + (+new Date());
|
var href = '/common/feedback.html?' + action + '=' + (+new Date());
|
||||||
console.log('[feedback] %s', href);
|
console.log('[feedback] %s', href);
|
||||||
@ -304,12 +306,12 @@ define([
|
|||||||
// Get the pads from localStorage to migrate them to the object store
|
// Get the pads from localStorage to migrate them to the object store
|
||||||
var getLegacyPads = common.getLegacyPads = function (cb) {
|
var getLegacyPads = common.getLegacyPads = function (cb) {
|
||||||
require(['/customize/store.js'], function(Legacy) { // TODO DEPRECATE_F
|
require(['/customize/store.js'], function(Legacy) { // TODO DEPRECATE_F
|
||||||
feedback('MIGRATE_LEGACY_STORE');
|
|
||||||
Legacy.ready(function (err, legacy) {
|
Legacy.ready(function (err, legacy) {
|
||||||
if (err) { cb(err, null); return; }
|
if (err) { cb(err, null); return; }
|
||||||
legacy.get(storageKey, function (err2, recentPads) {
|
legacy.get(storageKey, function (err2, recentPads) {
|
||||||
if (err2) { cb(err2, null); return; }
|
if (err2) { cb(err2, null); return; }
|
||||||
if (Array.isArray(recentPads)) {
|
if (Array.isArray(recentPads)) {
|
||||||
|
feedback('MIGRATE_LEGACY_STORE');
|
||||||
cb(void 0, migrateRecentPads(recentPads));
|
cb(void 0, migrateRecentPads(recentPads));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -81,6 +81,7 @@ define([
|
|||||||
proxy.edPrivate = result.edPrivate;
|
proxy.edPrivate = result.edPrivate;
|
||||||
proxy.edPublic = result.edPublic;
|
proxy.edPublic = result.edPublic;
|
||||||
|
|
||||||
|
Cryptpad.feedback('LOGIN', true);
|
||||||
Cryptpad.whenRealtimeSyncs(result.realtime, function() {
|
Cryptpad.whenRealtimeSyncs(result.realtime, function() {
|
||||||
Cryptpad.login(result.userHash, result.userName, function () {
|
Cryptpad.login(result.userHash, result.userName, function () {
|
||||||
if (sessionStorage.redirectTo) {
|
if (sessionStorage.redirectTo) {
|
||||||
|
|||||||
@ -67,11 +67,7 @@ define([
|
|||||||
proxy.edPublic = result.edPublic;
|
proxy.edPublic = result.edPublic;
|
||||||
proxy.edPrivate = result.edPrivate;
|
proxy.edPrivate = result.edPrivate;
|
||||||
|
|
||||||
// feedback API won't work because proxy wasn't loaded
|
Cryptpad.feedback('REGISTRATION', true);
|
||||||
$.ajax({
|
|
||||||
type: 'HEAD',
|
|
||||||
url: '/common/feedback.html?REGISTRATION=' + (+new Date()),
|
|
||||||
});
|
|
||||||
|
|
||||||
Cryptpad.whenRealtimeSyncs(result.realtime, function () {
|
Cryptpad.whenRealtimeSyncs(result.realtime, function () {
|
||||||
Cryptpad.login(result.userHash, result.userName, function () {
|
Cryptpad.login(result.userHash, result.userName, function () {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user