Skip to content

Commit 1c459b3

Browse files
committed
Merge branch 'develop'
2 parents c7e2b57 + 4034ee1 commit 1c459b3

37 files changed

+3327
-1360
lines changed

CHANGELOG.md

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
# 2.2.5
2+
3+
### Notable enhancements and fixes
4+
5+
- Fixed timeslider not scrolling when the revision count is a multiple of 100
6+
- Added new Restful API for version 2 of Etherpad. It is available at /api-docs
7+
8+
19
# 2.2.4
210

311
### Notable enhancements and fixes

admin/package.json

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "admin",
33
"private": true,
4-
"version": "2.2.4",
4+
"version": "2.2.5",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -16,25 +16,25 @@
1616
"devDependencies": {
1717
"@radix-ui/react-dialog": "^1.1.1",
1818
"@radix-ui/react-toast": "^1.2.1",
19-
"@types/react": "^18.3.5",
19+
"@types/react": "^18.3.8",
2020
"@types/react-dom": "^18.2.25",
21-
"@typescript-eslint/eslint-plugin": "^8.4.0",
22-
"@typescript-eslint/parser": "^8.4.0",
21+
"@typescript-eslint/eslint-plugin": "^8.6.0",
22+
"@typescript-eslint/parser": "^8.6.0",
2323
"@vitejs/plugin-react-swc": "^3.5.0",
24-
"eslint": "^9.9.1",
24+
"eslint": "^9.10.0",
2525
"eslint-plugin-react-hooks": "^4.6.0",
26-
"eslint-plugin-react-refresh": "^0.4.11",
27-
"i18next": "^23.14.0",
26+
"eslint-plugin-react-refresh": "^0.4.12",
27+
"i18next": "^23.15.1",
2828
"i18next-browser-languagedetector": "^8.0.0",
29-
"lucide-react": "^0.439.0",
29+
"lucide-react": "^0.441.0",
3030
"react": "^18.2.0",
3131
"react-dom": "^18.2.0",
3232
"react-hook-form": "^7.53.0",
33-
"react-i18next": "^15.0.1",
34-
"react-router-dom": "^6.26.1",
33+
"react-i18next": "^15.0.2",
34+
"react-router-dom": "^6.26.2",
3535
"socket.io-client": "^4.7.5",
36-
"typescript": "^5.5.4",
37-
"vite": "^5.4.3",
36+
"typescript": "^5.6.2",
37+
"vite": "^5.4.7",
3838
"vite-plugin-static-copy": "^1.0.6",
3939
"vite-plugin-svgr": "^4.2.0",
4040
"zustand": "^4.5.5"

admin/public/ep_admin_pads/de.json

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"ep_adminpads2_autoupdate.title": "Aktiviert oder deaktiviert automatische Aktualisierungen für die aktuelle Abfrage.",
1515
"ep_adminpads2_confirm": "Willst du das Pad {{padID}} wirklich löschen?",
1616
"ep_adminpads2_delete.value": "Löschen",
17+
"ep_adminpads2_cleanup": "Historie aufräumen",
1718
"ep_adminpads2_last-edited": "Zuletzt bearbeitet",
1819
"ep_adminpads2_loading": "Lädt...",
1920
"ep_adminpads2_manage-pads": "Pads verwalten",

admin/public/ep_admin_pads/en.json

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"ep_adminpads2_autoupdate.title": "Enables or disables automatic updates for the current query.",
55
"ep_adminpads2_confirm": "Do you really want to delete the pad {{padID}}?",
66
"ep_adminpads2_delete.value": "Delete",
7+
"ep_adminpads2_cleanup": "Cleanup revisions",
78
"ep_adminpads2_last-edited": "Last edited",
89
"ep_adminpads2_loading": "Loading…",
910
"ep_adminpads2_manage-pads": "Manage pads",

admin/src/App.tsx

+90-84
Original file line numberDiff line numberDiff line change
@@ -1,112 +1,118 @@
1-
import {useEffect} from 'react'
1+
import {useEffect, useState} from 'react'
22
import './App.css'
33
import {connect} from 'socket.io-client'
44
import {isJSONClean} from './utils/utils.ts'
55
import {NavLink, Outlet, useNavigate} from "react-router-dom";
66
import {useStore} from "./store/store.ts";
77
import {LoadingScreen} from "./utils/LoadingScreen.tsx";
88
import {Trans, useTranslation} from "react-i18next";
9-
import {Cable, Construction, Crown, NotepadText, Wrench, PhoneCall} from "lucide-react";
9+
import {Cable, Construction, Crown, NotepadText, Wrench, PhoneCall, LucideMenu} from "lucide-react";
1010

11-
const WS_URL = import.meta.env.DEV? 'http://localhost:9001' : ''
12-
export const App = ()=> {
13-
const setSettings = useStore(state => state.setSettings);
14-
const {t} = useTranslation()
15-
const navigate = useNavigate()
11+
const WS_URL = import.meta.env.DEV ? 'http://localhost:9001' : ''
12+
export const App = () => {
13+
const setSettings = useStore(state => state.setSettings);
14+
const {t} = useTranslation()
15+
const navigate = useNavigate()
16+
const [sidebarOpen, setSidebarOpen] = useState<boolean>(true)
1617

17-
useEffect(() => {
18-
fetch('/admin-auth/', {
19-
method: 'POST'
20-
}).then((value)=>{
21-
if(!value.ok){
22-
navigate('/login')
23-
}
24-
}).catch(()=>{
25-
navigate('/login')
26-
})
27-
}, []);
18+
useEffect(() => {
19+
fetch('/admin-auth/', {
20+
method: 'POST'
21+
}).then((value) => {
22+
if (!value.ok) {
23+
navigate('/login')
24+
}
25+
}).catch(() => {
26+
navigate('/login')
27+
})
28+
}, []);
2829

29-
useEffect(() => {
30-
document.title = t('admin.page-title')
30+
useEffect(() => {
31+
document.title = t('admin.page-title')
3132

32-
useStore.getState().setShowLoading(true);
33-
const settingSocket = connect(`${WS_URL}/settings`, {
34-
transports: ['websocket'],
35-
});
33+
useStore.getState().setShowLoading(true);
34+
const settingSocket = connect(`${WS_URL}/settings`, {
35+
transports: ['websocket'],
36+
});
3637

37-
const pluginsSocket = connect(`${WS_URL}/pluginfw/installer`, {
38-
transports: ['websocket'],
39-
})
38+
const pluginsSocket = connect(`${WS_URL}/pluginfw/installer`, {
39+
transports: ['websocket'],
40+
})
4041

41-
pluginsSocket.on('connect', () => {
42-
useStore.getState().setPluginsSocket(pluginsSocket);
43-
});
42+
pluginsSocket.on('connect', () => {
43+
useStore.getState().setPluginsSocket(pluginsSocket);
44+
});
4445

4546

46-
settingSocket.on('connect', () => {
47-
useStore.getState().setSettingsSocket(settingSocket);
48-
useStore.getState().setShowLoading(false)
49-
settingSocket.emit('load');
50-
console.log('connected');
51-
});
47+
settingSocket.on('connect', () => {
48+
useStore.getState().setSettingsSocket(settingSocket);
49+
useStore.getState().setShowLoading(false)
50+
settingSocket.emit('load');
51+
console.log('connected');
52+
});
5253

53-
settingSocket.on('disconnect', (reason) => {
54-
// The settingSocket.io client will automatically try to reconnect for all reasons other than "io
55-
// server disconnect".
56-
useStore.getState().setShowLoading(true)
57-
if (reason === 'io server disconnect') {
58-
settingSocket.connect();
59-
}
60-
});
54+
settingSocket.on('disconnect', (reason) => {
55+
// The settingSocket.io client will automatically try to reconnect for all reasons other than "io
56+
// server disconnect".
57+
useStore.getState().setShowLoading(true)
58+
if (reason === 'io server disconnect') {
59+
settingSocket.connect();
60+
}
61+
});
6162

62-
settingSocket.on('settings', (settings) => {
63-
/* Check whether the settings.json is authorized to be viewed */
64-
if (settings.results === 'NOT_ALLOWED') {
65-
console.log('Not allowed to view settings.json')
66-
return;
67-
}
63+
settingSocket.on('settings', (settings) => {
64+
/* Check whether the settings.json is authorized to be viewed */
65+
if (settings.results === 'NOT_ALLOWED') {
66+
console.log('Not allowed to view settings.json')
67+
return;
68+
}
6869

69-
/* Check to make sure the JSON is clean before proceeding */
70-
if (isJSONClean(settings.results)) {
71-
setSettings(settings.results);
72-
} else {
73-
alert('Invalid JSON');
74-
}
75-
useStore.getState().setShowLoading(false);
76-
});
70+
/* Check to make sure the JSON is clean before proceeding */
71+
if (isJSONClean(settings.results)) {
72+
setSettings(settings.results);
73+
} else {
74+
alert('Invalid JSON');
75+
}
76+
useStore.getState().setShowLoading(false);
77+
});
7778

78-
settingSocket.on('saveprogress', (status)=>{
79-
console.log(status)
80-
})
79+
settingSocket.on('saveprogress', (status) => {
80+
console.log(status)
81+
})
8182

82-
return () => {
83-
settingSocket.disconnect();
84-
pluginsSocket.disconnect()
85-
}
86-
}, []);
83+
return () => {
84+
settingSocket.disconnect();
85+
pluginsSocket.disconnect()
86+
}
87+
}, []);
8788

88-
return <div id="wrapper">
89-
<LoadingScreen/>
90-
<div className="menu">
91-
<div className="inner-menu">
92-
<span>
89+
return <div id="wrapper" className={`${sidebarOpen ? '': 'closed' }`}>
90+
<LoadingScreen/>
91+
<div className="menu">
92+
<div className="inner-menu">
93+
<span>
9394
<Crown width={40} height={40}/>
9495
<h1>Etherpad</h1>
9596
</span>
96-
<ul>
97-
<li><NavLink to="/plugins"><Cable/><Trans i18nKey="admin_plugins"/></NavLink></li>
98-
<li><NavLink to={"/settings"}><Wrench/><Trans i18nKey="admin_settings"/></NavLink></li>
99-
<li><NavLink to={"/help"}> <Construction/> <Trans i18nKey="admin_plugins_info"/></NavLink></li>
100-
<li><NavLink to={"/pads"}><NotepadText/><Trans
101-
i18nKey="ep_admin_pads:ep_adminpads2_manage-pads"/></NavLink></li>
102-
<li><NavLink to={"/shout"}><PhoneCall/>Communication</NavLink></li>
103-
</ul>
104-
</div>
105-
</div>
106-
<div className="innerwrapper">
107-
<Outlet/>
108-
</div>
97+
<ul onClick={()=>{
98+
setSidebarOpen(false)
99+
}}>
100+
<li><NavLink to="/plugins"><Cable/><Trans i18nKey="admin_plugins"/></NavLink></li>
101+
<li><NavLink to={"/settings"}><Wrench/><Trans i18nKey="admin_settings"/></NavLink></li>
102+
<li><NavLink to={"/help"}> <Construction/> <Trans i18nKey="admin_plugins_info"/></NavLink></li>
103+
<li><NavLink to={"/pads"}><NotepadText/><Trans
104+
i18nKey="ep_admin_pads:ep_adminpads2_manage-pads"/></NavLink></li>
105+
<li><NavLink to={"/shout"}><PhoneCall/>Communication</NavLink></li>
106+
</ul>
107+
</div>
109108
</div>
109+
<button id="icon-button" onClick={() => {
110+
setSidebarOpen(!sidebarOpen)
111+
}}><LucideMenu/></button>
112+
<div className="innerwrapper">
113+
<Outlet/>
114+
</div>
115+
</div>
110116
}
111117

112118
export default App

0 commit comments

Comments
 (0)