Skip to content

Commit 523b5b5

Browse files
committed
Merge branch 'develop'
2 parents c45b7a3 + 8a9bda7 commit 523b5b5

36 files changed

+1564
-1887
lines changed

.github/workflows/backend-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
node: [18, 20, 21]
27+
node: [18, 20, 22]
2828
steps:
2929
-
3030
name: Checkout repository
@@ -81,7 +81,7 @@ jobs:
8181
strategy:
8282
fail-fast: false
8383
matrix:
84-
node: [18, 20, 21]
84+
node: [18, 20, 22]
8585
steps:
8686
-
8787
name: Checkout repository
@@ -211,7 +211,7 @@ jobs:
211211
-
212212
uses: actions/setup-node@v4
213213
with:
214-
node-version: 21
214+
node-version: 22
215215
- uses: pnpm/action-setup@v4
216216
name: Install pnpm
217217
with:

.github/workflows/docker.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
uses: docker/setup-buildx-action@v3
3232
-
3333
name: Build and export to Docker
34-
uses: docker/build-push-action@v5
34+
uses: docker/build-push-action@v6
3535
with:
3636
context: .
3737
target: production
@@ -99,7 +99,7 @@ jobs:
9999
-
100100
name: Build and push
101101
if: github.event_name == 'push'
102-
uses: docker/build-push-action@v5
102+
uses: docker/build-push-action@v6
103103
with:
104104
context: .
105105
target: production

.github/workflows/frontend-admin-tests.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,13 @@ permissions:
1111

1212
jobs:
1313
withplugins:
14-
if: ${{ github.actor != 'dependabot[bot]' }}
1514
name: with plugins
1615
runs-on: ubuntu-latest
1716

1817
strategy:
1918
fail-fast: false
2019
matrix:
21-
node: [20, 21]
20+
node: [20, 22]
2221

2322
steps:
2423
-

.github/workflows/frontend-tests.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
-
2727
uses: actions/setup-node@v4
2828
with:
29-
node-version: 21
29+
node-version: 22
3030
- uses: pnpm/action-setup@v4
3131
name: Install pnpm
3232
with:
@@ -92,7 +92,7 @@ jobs:
9292
uses: actions/checkout@v4
9393
- uses: actions/setup-node@v4
9494
with:
95-
node-version: 21
95+
node-version: 22
9696
- uses: pnpm/action-setup@v4
9797
name: Install pnpm
9898
with:
@@ -159,7 +159,7 @@ jobs:
159159
-
160160
uses: actions/setup-node@v4
161161
with:
162-
node-version: 21
162+
node-version: 22
163163
- uses: pnpm/action-setup@v4
164164
name: Install pnpm
165165
with:

.github/workflows/rate-limit.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
4949
-
5050
name: docker network
51-
run: docker network create --subnet=172.23.42.0/16 ep_net
51+
run: docker network create --subnet=172.23.0.0/16 ep_net
5252
-
5353
name: build docker image
5454
run: |

.github/workflows/upgrade-from-latest-release.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ jobs:
2424
strategy:
2525
fail-fast: false
2626
matrix:
27-
node: [18, 20, 21]
27+
node: [18, 20, 22]
2828
steps:
2929
-
3030
name: Check out latest release
3131
uses: actions/checkout@v4
3232
with:
33-
ref: master
33+
ref: develop #FIXME change to master when doing release
3434
-
3535
uses: actions/setup-node@v4
3636
with:

.github/workflows/windows.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
-
3535
uses: actions/setup-node@v4
3636
with:
37-
node-version: 21
37+
node-version: 22
3838
- uses: pnpm/action-setup@v4
3939
name: Install pnpm
4040
with:

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
# 2.1.1
2+
3+
4+
### Notable enhancements and fixes
5+
6+
- Fixed failing Docker build when checked out as git submodule. Thanks to @neurolabs
7+
- Fixed: Fallback to websocket and polling when unknown(old) config is present for socket io
8+
- Fixed: Next page disabled if zero page by @samyakj023
9+
- On CTRL+CLICK bring the window back to focus by Helder Sepulveda
10+
111
# 2.1.0
212

313
### Notable enhancements and fixes

Dockerfile

+10-10
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
#
55
# Author: muxator
66

7-
FROM node:alpine as adminBuild
7+
FROM node:alpine AS adminbuild
88

99
WORKDIR /opt/etherpad-lite
1010
COPY ./ ./
1111
RUN cd ./admin && npm install -g [email protected] && pnpm install && pnpm run build --outDir ./dist
1212
RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist
1313

1414

15-
FROM node:alpine as build
15+
FROM node:alpine AS build
1616
LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite"
1717

1818
# Set these arguments when building the image from behind a proxy
@@ -105,33 +105,33 @@ USER etherpad
105105
WORKDIR "${EP_DIR}"
106106

107107
# etherpads version feature requires this. Only copy what is really needed
108-
COPY --chown=etherpad:etherpad ./.git/HEAD ./.git/HEAD
109-
COPY --chown=etherpad:etherpad ./.git/refs ./.git/refs
108+
COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD
109+
COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs
110110
COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json
111111
COPY --chown=etherpad:etherpad ./var ./var
112112
COPY --chown=etherpad:etherpad ./bin ./bin
113113
COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./
114114

115-
FROM build as development
115+
FROM build AS development
116116

117117
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/
118-
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
119-
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc
118+
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin
119+
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc
120120

121121
RUN bin/installDeps.sh && \
122122
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
123123
pnpm run plugins i ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
124124
fi
125125

126126

127-
FROM build as production
127+
FROM build AS production
128128

129129
ENV NODE_ENV=production
130130
ENV ETHERPAD_PRODUCTION=true
131131

132132
COPY --chown=etherpad:etherpad ./src ./src
133-
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
134-
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc
133+
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin
134+
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc
135135

136136
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
137137
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \

admin/package.json

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "admin",
33
"private": true,
4-
"version": "2.1.0",
4+
"version": "2.1.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -11,32 +11,32 @@
1111
"preview": "vite preview"
1212
},
1313
"dependencies": {
14-
"@radix-ui/react-switch": "^1.0.3"
14+
"@radix-ui/react-switch": "^1.1.0"
1515
},
1616
"devDependencies": {
17-
"@radix-ui/react-dialog": "^1.0.5",
18-
"@radix-ui/react-toast": "^1.1.5",
17+
"@radix-ui/react-dialog": "^1.1.1",
18+
"@radix-ui/react-toast": "^1.2.1",
1919
"@types/react": "^18.3.2",
2020
"@types/react-dom": "^18.2.25",
21-
"@typescript-eslint/eslint-plugin": "^7.11.0",
22-
"@typescript-eslint/parser": "^7.11.0",
21+
"@typescript-eslint/eslint-plugin": "^7.15.0",
22+
"@typescript-eslint/parser": "^7.15.0",
2323
"@vitejs/plugin-react-swc": "^3.5.0",
24-
"eslint": "^9.2.0",
24+
"eslint": "^9.6.0",
2525
"eslint-plugin-react-hooks": "^4.6.0",
2626
"eslint-plugin-react-refresh": "^0.4.7",
2727
"i18next": "^23.11.5",
2828
"i18next-browser-languagedetector": "^8.0.0",
29-
"lucide-react": "^0.381.0",
29+
"lucide-react": "^0.400.0",
3030
"react": "^18.2.0",
3131
"react-dom": "^18.2.0",
32-
"react-hook-form": "^7.51.5",
32+
"react-hook-form": "^7.52.1",
3333
"react-i18next": "^14.1.0",
34-
"react-router-dom": "^6.23.1",
34+
"react-router-dom": "^6.24.1",
3535
"socket.io-client": "^4.7.5",
36-
"typescript": "^5.4.5",
37-
"vite": "^5.2.12",
38-
"vite-plugin-static-copy": "^1.0.3",
36+
"typescript": "^5.5.3",
37+
"vite": "^5.3.3",
38+
"vite-plugin-static-copy": "^1.0.6",
3939
"vite-plugin-svgr": "^4.2.0",
40-
"zustand": "^4.5.2"
40+
"zustand": "^4.5.4"
4141
}
4242
}

admin/src/index.css

+1
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,7 @@ td, th {
263263
outline: none;
264264
width: 100%;
265265
resize: none;
266+
font-family: monospace;
266267
}
267268

268269
#response {

admin/src/pages/HomePage.tsx

+28-30
Original file line numberDiff line numberDiff line change
@@ -93,25 +93,20 @@ export const HomePage = () => {
9393
if (!pluginsSocket) {
9494
return
9595
}
96-
9796
pluginsSocket?.emit('search', searchParams)
98-
99-
10097
pluginsSocket!.on('results:search', (data: {
10198
results: PluginDef[]
10299
}) => {
103-
if (Array.isArray(data.results) && data.results.length > 0) {
104-
setPlugins(data.results)
105-
} else {
106-
useStore.getState().setToastState({
107-
open: true,
108-
title: "Error retrieving plugins",
109-
success: false
110-
})
111-
}
100+
setPlugins(data.results)
101+
})
102+
pluginsSocket!.on('results:searcherror', (data: {error: string}) => {
103+
console.log(data.error)
104+
useStore.getState().setToastState({
105+
open: true,
106+
title: "Error retrieving plugins",
107+
success: false
108+
})
112109
})
113-
114-
115110
}, [searchParams, pluginsSocket]);
116111

117112
const uninstallPlugin = (pluginName: string)=>{
@@ -125,7 +120,6 @@ export const HomePage = () => {
125120
setPlugins(plugins.filter(plugin=>plugin.name !== pluginName))
126121
}
127122

128-
129123
useDebounce(()=>{
130124
setSearchParams({
131125
...searchParams,
@@ -161,12 +155,12 @@ export const HomePage = () => {
161155
</td>
162156
</tr>
163157
})}
164-
</tbody>
165-
</table>
158+
</tbody>
159+
</table>
166160

167161

168-
<h2><Trans i18nKey="admin_plugins.available"/></h2>
169-
<SearchField onChange={v=>{setSearchTerm(v.target.value)}} placeholder={t('admin_plugins.available_search.placeholder')} value={searchTerm}/>
162+
<h2><Trans i18nKey="admin_plugins.available"/></h2>
163+
<SearchField onChange={v=>{setSearchTerm(v.target.value)}} placeholder={t('admin_plugins.available_search.placeholder')} value={searchTerm}/>
170164

171165
<table id="available-plugins">
172166
<thead>
@@ -179,17 +173,21 @@ export const HomePage = () => {
179173
</tr>
180174
</thead>
181175
<tbody style={{overflow: 'auto'}}>
182-
{plugins.map((plugin) => {
183-
return <tr key={plugin.name}>
184-
<td><a rel="noopener noreferrer" href={`https://npmjs.com/${plugin.name}`} target="_blank">{plugin.name}</a></td>
185-
<td>{plugin.description}</td>
186-
<td>{plugin.version}</td>
187-
<td>{plugin.time}</td>
188-
<td>
189-
<IconButton icon={<Download/>} onClick={() => installPlugin(plugin.name)} title={<Trans i18nKey="admin_plugins.available_install.value"/>}/>
190-
</td>
191-
</tr>
192-
})}
176+
{(plugins.length > 0) ?
177+
plugins.map((plugin) => {
178+
return <tr key={plugin.name}>
179+
<td><a rel="noopener noreferrer" href={`https://npmjs.com/${plugin.name}`} target="_blank">{plugin.name}</a></td>
180+
<td>{plugin.description}</td>
181+
<td>{plugin.version}</td>
182+
<td>{plugin.time}</td>
183+
<td>
184+
<IconButton icon={<Download/>} onClick={() => installPlugin(plugin.name)} title={<Trans i18nKey="admin_plugins.available_install.value"/>}/>
185+
</td>
186+
</tr>
187+
})
188+
:
189+
<tr><td colSpan={5}>{searchTerm == '' ? <Trans i18nKey="pad.loading"/>: <Trans i18nKey="admin_plugins.available_not-found"/>}</td></tr>
190+
}
193191
</tbody>
194192
</table>
195193
</div>

admin/src/pages/PadPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const PadPage = ()=>{
2626
const [padToDelete, setPadToDelete] = useState<string>('')
2727
const pages = useMemo(()=>{
2828
if(!pads){
29-
return [0]
29+
return 0;
3030
}
3131

3232
return Math.ceil(pads!.total / searchParams.limit)
@@ -166,7 +166,7 @@ export const PadPage = ()=>{
166166
offset: (Number(currentPage)-1)*searchParams.limit})
167167
}}><ChevronLeft/><span>Previous Page</span></button>
168168
<span>{currentPage+1} out of {pages}</span>
169-
<button disabled={pages == currentPage+1} onClick={()=>{
169+
<button disabled={pages == 0 || pages == currentPage+1} onClick={()=>{
170170
const newCurrentPage = currentPage+1
171171
setCurrentPage(newCurrentPage)
172172
setSearchParams({

admin/src/pages/SettingsPage.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {useStore} from "../store/store.ts";
2-
import {isJSONClean} from "../utils/utils.ts";
2+
import {isJSONClean, cleanComments} from "../utils/utils.ts";
33
import {Trans} from "react-i18next";
44
import {IconButton} from "../components/IconButton.tsx";
55
import {RotateCw, Save} from "lucide-react";
66

77
export const SettingsPage = ()=>{
88
const settingsSocket = useStore(state=>state.settingsSocket)
9-
const settings = useStore(state=>state.settings)
9+
const settings = cleanComments(useStore(state=>state.settings))
1010

1111
return <div className="settings-page">
1212
<h1><Trans i18nKey="admin_settings.current"/></h1>

0 commit comments

Comments
 (0)