mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-25 09:56:15 -04:00
how did it conflict on that?
This commit is contained in:
commit
183b765df0
12 changed files with 1324 additions and 1314 deletions
|
@ -49,7 +49,7 @@ exports.init = async () => await new Promise((resolve, reject) => {
|
|||
}
|
||||
|
||||
// everything ok, set up Promise-based methods
|
||||
['get', 'set', 'findKeys', 'getSub', 'setSub', 'remove', 'doShutdown'].forEach((fn) => {
|
||||
['get', 'set', 'findKeys', 'getSub', 'setSub', 'remove'].forEach((fn) => {
|
||||
exports[fn] = util.promisify(db[fn].bind(db));
|
||||
});
|
||||
|
||||
|
@ -73,6 +73,6 @@ exports.init = async () => await new Promise((resolve, reject) => {
|
|||
});
|
||||
|
||||
exports.shutdown = async (hookName, context) => {
|
||||
await exports.doShutdown();
|
||||
await util.promisify(db.close.bind(db))();
|
||||
console.log('Database closed');
|
||||
};
|
||||
|
|
28
src/package-lock.json
generated
28
src/package-lock.json
generated
|
@ -4179,9 +4179,9 @@
|
|||
"dev": true
|
||||
},
|
||||
"needle": {
|
||||
"version": "2.5.2",
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.5.2.tgz",
|
||||
"integrity": "sha512-LbRIwS9BfkPvNwNHlsA41Q29kL2L/6VaOJ0qisM5lLWsTV3nP15abO5ITL6L81zqFhzjRKDAYjpcBcwM0AVvLQ==",
|
||||
"version": "2.6.0",
|
||||
"resolved": "https://registry.npmjs.org/needle/-/needle-2.6.0.tgz",
|
||||
"integrity": "sha512-KKYdza4heMsEfSWD7VPUIz3zX2XDwOyX2d+geb4vrERZMT5RMU6ujjaD+I5Yr54uZxQ2w6XRTAhHBbSCyovZBg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"debug": "^3.2.6",
|
||||
|
@ -4236,9 +4236,9 @@
|
|||
}
|
||||
},
|
||||
"node-addon-api": {
|
||||
"version": "2.0.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-2.0.0.tgz",
|
||||
"integrity": "sha512-ASCL5U13as7HhOExbT6OlWJJUV/lLzL2voOSP1UVehpRD8FbSrSDjfScK/KwAvVTI5AS6r4VwbOMlIqtvRidnA==",
|
||||
"version": "3.1.0",
|
||||
"resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-3.1.0.tgz",
|
||||
"integrity": "sha512-flmrDNB06LIl5lywUz7YlNGZH/5p0M7W28k8hzd9Lshtdh1wshD2Y+U4h9LD6KObOy1f+fEVdgprPrEymjM5uw==",
|
||||
"optional": true
|
||||
},
|
||||
"node-environment-flags": {
|
||||
|
@ -8858,12 +8858,12 @@
|
|||
"integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw="
|
||||
},
|
||||
"sqlite3": {
|
||||
"version": "5.0.0",
|
||||
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.0.tgz",
|
||||
"integrity": "sha512-rjvqHFUaSGnzxDy2AHCwhHy6Zp6MNJzCPGYju4kD8yi6bze4d1/zMTg6C7JI49b7/EM7jKMTvyfN/4ylBKdwfw==",
|
||||
"version": "5.0.1",
|
||||
"resolved": "https://registry.npmjs.org/sqlite3/-/sqlite3-5.0.1.tgz",
|
||||
"integrity": "sha512-kh2lTIcYNfmVcvhVJihsYuPj9U0xzBbh6bmqILO2hkryWSC9RRhzYmkIDtJkJ+d8Kg4wZRJ0T1reyHUEspICfg==",
|
||||
"optional": true,
|
||||
"requires": {
|
||||
"node-addon-api": "2.0.0",
|
||||
"node-addon-api": "^3.0.0",
|
||||
"node-gyp": "3.x",
|
||||
"node-pre-gyp": "^0.11.0"
|
||||
}
|
||||
|
@ -9358,9 +9358,9 @@
|
|||
}
|
||||
},
|
||||
"ueberdb2": {
|
||||
"version": "1.1.7",
|
||||
"resolved": "https://registry.npmjs.org/ueberdb2/-/ueberdb2-1.1.7.tgz",
|
||||
"integrity": "sha512-Fxvpei4MVYOlCWZ67I5iibYyaHIb40ZLwN0OsjPEuMpcWYBXuwkl+svFyA2nYgk9/1Nk9eL/zdsXbwm7BLMKsg==",
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/ueberdb2/-/ueberdb2-1.2.1.tgz",
|
||||
"integrity": "sha512-b1WeG5KinxddpFAkHcFJW5tDuoGMonI3AyZgqmmHKnvF7CJTprPX17n0AOi3iQcu97uoxz9nb56KEQ4gHQOCJQ==",
|
||||
"requires": {
|
||||
"async": "^3.2.0",
|
||||
"cassandra-driver": "^4.5.1",
|
||||
|
@ -9371,7 +9371,7 @@
|
|||
"elasticsearch": "^16.7.1",
|
||||
"mocha": "^7.1.2",
|
||||
"mongodb": "^3.6.3",
|
||||
"mssql": "7.0.0-alpha.4",
|
||||
"mssql": "^7.0.0-alpha.4",
|
||||
"mysql": "2.18.1",
|
||||
"nano": "^8.2.2",
|
||||
"pg": "^8.0.3",
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
"threads": "^1.4.0",
|
||||
"tiny-worker": "^2.3.0",
|
||||
"tinycon": "0.0.1",
|
||||
"ueberdb2": "^1.1.7",
|
||||
"ueberdb2": "^1.2.1",
|
||||
"underscore": "1.8.3",
|
||||
"unorm": "1.4.1"
|
||||
},
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
'use strict';
|
||||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
|
|
|
@ -1,8 +1,4 @@
|
|||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
// THIS FILE IS ALSO AN APPJET MODULE: etherpad.collab.ace.domline
|
||||
// %APPJET%: import("etherpad.admin.plugins");
|
||||
|
@ -166,7 +162,7 @@ domline.createDomLine = function (nonEmpty, doesWrap, optBrowser, optDocument) {
|
|||
lineClass = domline.addToLineClass(lineClass, cls);
|
||||
} else if (txt) {
|
||||
if (href) {
|
||||
urn_schemes = new RegExp('^(about|geo|mailto|tel):');
|
||||
const urn_schemes = new RegExp('^(about|geo|mailto|tel):');
|
||||
if (!~href.indexOf('://') && !urn_schemes.test(href)) // if the url doesn't include a protocol prefix, assume http
|
||||
{
|
||||
href = `http://${href}`;
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
// Farbtastic 2.0 alpha
|
||||
// edited by Sebastian Castro <sebastian.castro@protonmail.com> on 2020-04-06
|
||||
(function ($) {
|
||||
|
@ -158,12 +160,12 @@ $._farbtastic = function (container, options) {
|
|||
m.lineWidth = w / r;
|
||||
m.scale(r, r);
|
||||
// Each segment goes from angle1 to angle2.
|
||||
for (var i = 0; i <= n; ++i) {
|
||||
for (let i = 0; i <= n; ++i) {
|
||||
var d2 = i / n,
|
||||
angle2 = d2 * Math.PI * 2,
|
||||
// Endpoints
|
||||
x1 = Math.sin(angle1), y1 = -Math.cos(angle1);
|
||||
x2 = Math.sin(angle2), y2 = -Math.cos(angle2),
|
||||
const x2 = Math.sin(angle2), y2 = -Math.cos(angle2),
|
||||
// Midpoint chosen so that the endpoints are tangent to the circle.
|
||||
am = (angle1 + angle2) / 2,
|
||||
tan = 1 / Math.cos((angle2 - angle1) / 2),
|
||||
|
@ -171,37 +173,16 @@ $._farbtastic = function (container, options) {
|
|||
// New color
|
||||
color2 = fb.pack(fb.HSLToRGB([d2, 1, 0.5]));
|
||||
if (i > 0) {
|
||||
if (browser.msie) {
|
||||
// IE's gradient calculations mess up the colors. Correct along the diagonals.
|
||||
var corr = (1 + Math.min(Math.abs(Math.tan(angle1)), Math.abs(Math.tan(Math.PI / 2 - angle1)))) / n;
|
||||
color1 = fb.pack(fb.HSLToRGB([d1 - 0.15 * corr, 1, 0.5]));
|
||||
color2 = fb.pack(fb.HSLToRGB([d2 + 0.15 * corr, 1, 0.5]));
|
||||
// Create gradient fill between the endpoints.
|
||||
var grad = m.createLinearGradient(x1, y1, x2, y2);
|
||||
grad.addColorStop(0, color1);
|
||||
grad.addColorStop(1, color2);
|
||||
m.fillStyle = grad;
|
||||
// Draw quadratic curve segment as a fill.
|
||||
var r1 = (r + w / 2) / r, r2 = (r - w / 2) / r; // inner/outer radius.
|
||||
m.beginPath();
|
||||
m.moveTo(x1 * r1, y1 * r1);
|
||||
m.quadraticCurveTo(xm * r1, ym * r1, x2 * r1, y2 * r1);
|
||||
m.lineTo(x2 * r2, y2 * r2);
|
||||
m.quadraticCurveTo(xm * r2, ym * r2, x1 * r2, y1 * r2);
|
||||
m.fill();
|
||||
}
|
||||
else {
|
||||
// Create gradient fill between the endpoints.
|
||||
var grad = m.createLinearGradient(x1, y1, x2, y2);
|
||||
grad.addColorStop(0, color1);
|
||||
grad.addColorStop(1, color2);
|
||||
m.strokeStyle = grad;
|
||||
// Draw quadratic curve segment.
|
||||
m.beginPath();
|
||||
m.moveTo(x1, y1);
|
||||
m.quadraticCurveTo(xm, ym, x2, y2);
|
||||
m.stroke();
|
||||
}
|
||||
// Create gradient fill between the endpoints.
|
||||
var grad = m.createLinearGradient(x1, y1, x2, y2);
|
||||
grad.addColorStop(0, color1);
|
||||
grad.addColorStop(1, color2);
|
||||
m.strokeStyle = grad;
|
||||
// Draw quadratic curve segment.
|
||||
m.beginPath();
|
||||
m.moveTo(x1, y1);
|
||||
m.quadraticCurveTo(xm, ym, x2, y2);
|
||||
m.stroke();
|
||||
}
|
||||
// Prevent seams where curves join.
|
||||
angle1 = angle2 - nudge; color1 = color2; d1 = d2;
|
||||
|
@ -245,7 +226,7 @@ $._farbtastic = function (container, options) {
|
|||
var ctx = buffer.getContext('2d');
|
||||
var frame = ctx.getImageData(0, 0, sz + 1, sz + 1);
|
||||
|
||||
var i = 0;
|
||||
let i = 0;
|
||||
calculateMask(sz, sz, function (x, y, c, a) {
|
||||
frame.data[i++] = frame.data[i++] = frame.data[i++] = c * 255;
|
||||
frame.data[i++] = a * 255;
|
||||
|
@ -320,7 +301,7 @@ $._farbtastic = function (container, options) {
|
|||
|
||||
// Update the overlay canvas.
|
||||
fb.ctxOverlay.clearRect(-fb.mid, -fb.mid, sz, sz);
|
||||
for (i in circles) {
|
||||
for (let i in circles) {
|
||||
var c = circles[i];
|
||||
fb.ctxOverlay.lineWidth = c.lw;
|
||||
fb.ctxOverlay.strokeStyle = c.c;
|
||||
|
|
|
@ -1,11 +1,5 @@
|
|||
'use strict';
|
||||
|
||||
/**
|
||||
* This code is mostly from the old Etherpad. Please help us to comment this code.
|
||||
* This helps other people to understand this code better and helps them to improve it.
|
||||
* TL;DR COMMENTS ON THIS FILE ARE HIGHLY APPRECIATED
|
||||
*/
|
||||
|
||||
/**
|
||||
* Copyright 2009 Google Inc.
|
||||
*
|
||||
|
@ -546,7 +540,6 @@ const paduserlist = (function () {
|
|||
}
|
||||
|
||||
$('#myswatch').css({'background-color': myUserInfo.colorId});
|
||||
|
||||
$('li[data-key=showusers] > a').css({'box-shadow': `inset 0 0 30px ${myUserInfo.colorId}`});
|
||||
},
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue