mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-04-23 08:56:17 -04:00
Feat/bundle js (#6511)
* Added minify * Added POC for browser * Moved first js files to ts * Fixed caret positioning * Added support for plugins * Fixed get undefined. * Removed require of socketio, l10n, html10n and error reporter * Added minify * Added POC for browser * Moved first js files to ts * Fixed caret positioning * Added support for plugins * Fixed get undefined. * Removed require of socketio, l10n, html10n and error reporter * Fixed popup not showing * Fixed timeslider * Reworked paths * Fixed loading * Don't generate sources map in production mode * Non working hmr * Added live reloading. * Fixed timeslider when hot reloading * Removed eval * Fixed. * Fixed env * Fixed frontend tests. * Added minifying via lightningcss * Added minify via esbuild * Fixed diagnostic url * Removed lightningcss * Fixed types * Fixed alias * Fixed loadtest * Fixed * Fixed loading ep_font_color3 * Restructure windows build * Fixed windows build * Fixed pnpm lock --------- Co-authored-by: SamTv12345 <samtv12345@samtv12345.com>
This commit is contained in:
parent
33b388b14c
commit
d6d636955c
53 changed files with 2764 additions and 1763 deletions
|
@ -24,12 +24,15 @@
|
|||
|
||||
let socket;
|
||||
|
||||
|
||||
// These jQuery things should create local references, but for now `require()`
|
||||
// assigns to the global `$` and augments it with plugins.
|
||||
require('./vendors/jquery');
|
||||
require('./vendors/farbtastic');
|
||||
require('./vendors/gritter');
|
||||
|
||||
import html10n from './vendors/html10n'
|
||||
|
||||
const Cookies = require('./pad_utils').Cookies;
|
||||
const chat = require('./chat').chat;
|
||||
const getCollabClient = require('./collab_client').getCollabClient;
|
||||
|
@ -136,7 +139,8 @@ const getParameters = [
|
|||
name: 'lang',
|
||||
checkVal: null,
|
||||
callback: (val) => {
|
||||
window.html10n.localize([val, 'en']);
|
||||
console.log('Val is', val)
|
||||
html10n.localize([val, 'en']);
|
||||
Cookies.set('language', val);
|
||||
},
|
||||
},
|
||||
|
@ -281,6 +285,7 @@ const handshake = async () => {
|
|||
}
|
||||
});
|
||||
|
||||
|
||||
socket.on('error', (error) => {
|
||||
// pad.collabClient might be null if the error occurred before the hanshake completed.
|
||||
if (pad.collabClient != null) {
|
||||
|
@ -313,6 +318,15 @@ const handshake = async () => {
|
|||
() => $.ajax('../_extendExpressSessionLifetime', {method: 'PUT'}).catch(() => {});
|
||||
setInterval(ping, window.clientVars.sessionRefreshInterval);
|
||||
}
|
||||
if(window.clientVars.mode === "development") {
|
||||
console.warn('Enabling development mode with live update')
|
||||
socket.on('liveupdate', ()=>{
|
||||
|
||||
console.log('Live reload update received')
|
||||
location.reload()
|
||||
})
|
||||
}
|
||||
|
||||
} else if (obj.disconnect) {
|
||||
padconnectionstatus.disconnected(obj.disconnect);
|
||||
socket.disconnect();
|
||||
|
@ -713,7 +727,7 @@ const pad = {
|
|||
$.ajax(
|
||||
{
|
||||
type: 'post',
|
||||
url: 'ep/pad/connection-diagnostic-info',
|
||||
url: '../ep/pad/connection-diagnostic-info',
|
||||
data: {
|
||||
diagnosticInfo: JSON.stringify(pad.diagnosticInfo),
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue