diff --git a/.github/workflows/backend-tests.yml b/.github/workflows/backend-tests.yml index baa786f9a08..fb6c366c91c 100644 --- a/.github/workflows/backend-tests.yml +++ b/.github/workflows/backend-tests.yml @@ -24,7 +24,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 21] + node: [18, 20, 22] steps: - name: Checkout repository @@ -81,7 +81,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 21] + node: [18, 20, 22] steps: - name: Checkout repository @@ -211,7 +211,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 21 + node-version: 22 - uses: pnpm/action-setup@v4 name: Install pnpm with: diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index d3e7d5621d5..cd1143d455e 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -31,7 +31,7 @@ jobs: uses: docker/setup-buildx-action@v3 - name: Build and export to Docker - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . target: production @@ -99,7 +99,7 @@ jobs: - name: Build and push if: github.event_name == 'push' - uses: docker/build-push-action@v5 + uses: docker/build-push-action@v6 with: context: . target: production diff --git a/.github/workflows/frontend-admin-tests.yml b/.github/workflows/frontend-admin-tests.yml index c422b645049..68db8409ec2 100644 --- a/.github/workflows/frontend-admin-tests.yml +++ b/.github/workflows/frontend-admin-tests.yml @@ -11,14 +11,13 @@ permissions: jobs: withplugins: - if: ${{ github.actor != 'dependabot[bot]' }} name: with plugins runs-on: ubuntu-latest strategy: fail-fast: false matrix: - node: [20, 21] + node: [20, 22] steps: - diff --git a/.github/workflows/frontend-tests.yml b/.github/workflows/frontend-tests.yml index c1becbd3d8b..bc8c8f768db 100644 --- a/.github/workflows/frontend-tests.yml +++ b/.github/workflows/frontend-tests.yml @@ -26,7 +26,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 21 + node-version: 22 - uses: pnpm/action-setup@v4 name: Install pnpm with: @@ -92,7 +92,7 @@ jobs: uses: actions/checkout@v4 - uses: actions/setup-node@v4 with: - node-version: 21 + node-version: 22 - uses: pnpm/action-setup@v4 name: Install pnpm with: @@ -159,7 +159,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 21 + node-version: 22 - uses: pnpm/action-setup@v4 name: Install pnpm with: diff --git a/.github/workflows/rate-limit.yml b/.github/workflows/rate-limit.yml index 006399694c9..003a1000020 100644 --- a/.github/workflows/rate-limit.yml +++ b/.github/workflows/rate-limit.yml @@ -48,7 +48,7 @@ jobs: - name: docker network - run: docker network create --subnet=172.23.42.0/16 ep_net + run: docker network create --subnet=172.23.0.0/16 ep_net - name: build docker image run: | diff --git a/.github/workflows/upgrade-from-latest-release.yml b/.github/workflows/upgrade-from-latest-release.yml index 96f289bd395..43d61b9b56d 100644 --- a/.github/workflows/upgrade-from-latest-release.yml +++ b/.github/workflows/upgrade-from-latest-release.yml @@ -24,13 +24,13 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 21] + node: [18, 20, 22] steps: - name: Check out latest release uses: actions/checkout@v4 with: - ref: master + ref: develop #FIXME change to master when doing release - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 57314545ebb..4d673dba04d 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -34,7 +34,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: 21 + node-version: 22 - uses: pnpm/action-setup@v4 name: Install pnpm with: diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e7b6b56513..deaff6002e1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 2.1.1 + + +### Notable enhancements and fixes + +- Fixed failing Docker build when checked out as git submodule. Thanks to @neurolabs +- Fixed: Fallback to websocket and polling when unknown(old) config is present for socket io +- Fixed: Next page disabled if zero page by @samyakj023 +- On CTRL+CLICK bring the window back to focus by Helder Sepulveda + # 2.1.0 ### Notable enhancements and fixes diff --git a/Dockerfile b/Dockerfile index 2efca055b6c..4ed8d303db8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,7 +4,7 @@ # # Author: muxator -FROM node:alpine as adminBuild +FROM node:alpine AS adminbuild WORKDIR /opt/etherpad-lite COPY ./ ./ @@ -12,7 +12,7 @@ RUN cd ./admin && npm install -g pnpm@9.0.4 && pnpm install && pnpm run build -- RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist -FROM node:alpine as build +FROM node:alpine AS build LABEL maintainer="Etherpad team, https://github.com/ether/etherpad-lite" # Set these arguments when building the image from behind a proxy @@ -105,18 +105,18 @@ USER etherpad WORKDIR "${EP_DIR}" # etherpads version feature requires this. Only copy what is really needed -COPY --chown=etherpad:etherpad ./.git/HEAD ./.git/HEAD -COPY --chown=etherpad:etherpad ./.git/refs ./.git/refs +COPY --chown=etherpad:etherpad ./.git/HEA[D] ./.git/HEAD +COPY --chown=etherpad:etherpad ./.git/ref[s] ./.git/refs COPY --chown=etherpad:etherpad ${SETTINGS} ./settings.json COPY --chown=etherpad:etherpad ./var ./var COPY --chown=etherpad:etherpad ./bin ./bin COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./ -FROM build as development +FROM build AS development COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/ -COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin -COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc +COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin +COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc RUN bin/installDeps.sh && \ if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \ @@ -124,14 +124,14 @@ RUN bin/installDeps.sh && \ fi -FROM build as production +FROM build AS production ENV NODE_ENV=production ENV ETHERPAD_PRODUCTION=true COPY --chown=etherpad:etherpad ./src ./src -COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin -COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc +COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/admin/dist ./src/templates/admin +COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/ui/dist ./src/static/oidc RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \ if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \ diff --git a/admin/package.json b/admin/package.json index dc22daff05d..89d3240c688 100644 --- a/admin/package.json +++ b/admin/package.json @@ -1,7 +1,7 @@ { "name": "admin", "private": true, - "version": "2.1.0", + "version": "2.1.1", "type": "module", "scripts": { "dev": "vite", @@ -11,32 +11,32 @@ "preview": "vite preview" }, "dependencies": { - "@radix-ui/react-switch": "^1.0.3" + "@radix-ui/react-switch": "^1.1.0" }, "devDependencies": { - "@radix-ui/react-dialog": "^1.0.5", - "@radix-ui/react-toast": "^1.1.5", + "@radix-ui/react-dialog": "^1.1.1", + "@radix-ui/react-toast": "^1.2.1", "@types/react": "^18.3.2", "@types/react-dom": "^18.2.25", - "@typescript-eslint/eslint-plugin": "^7.11.0", - "@typescript-eslint/parser": "^7.11.0", + "@typescript-eslint/eslint-plugin": "^7.15.0", + "@typescript-eslint/parser": "^7.15.0", "@vitejs/plugin-react-swc": "^3.5.0", - "eslint": "^9.2.0", + "eslint": "^9.6.0", "eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-refresh": "^0.4.7", "i18next": "^23.11.5", "i18next-browser-languagedetector": "^8.0.0", - "lucide-react": "^0.381.0", + "lucide-react": "^0.400.0", "react": "^18.2.0", "react-dom": "^18.2.0", - "react-hook-form": "^7.51.5", + "react-hook-form": "^7.52.1", "react-i18next": "^14.1.0", - "react-router-dom": "^6.23.1", + "react-router-dom": "^6.24.1", "socket.io-client": "^4.7.5", - "typescript": "^5.4.5", - "vite": "^5.2.12", - "vite-plugin-static-copy": "^1.0.3", + "typescript": "^5.5.3", + "vite": "^5.3.3", + "vite-plugin-static-copy": "^1.0.6", "vite-plugin-svgr": "^4.2.0", - "zustand": "^4.5.2" + "zustand": "^4.5.4" } } diff --git a/admin/src/index.css b/admin/src/index.css index a7330448e7f..a038888d750 100644 --- a/admin/src/index.css +++ b/admin/src/index.css @@ -263,6 +263,7 @@ td, th { outline: none; width: 100%; resize: none; + font-family: monospace; } #response { diff --git a/admin/src/pages/HomePage.tsx b/admin/src/pages/HomePage.tsx index 8894324879d..c96b034245c 100644 --- a/admin/src/pages/HomePage.tsx +++ b/admin/src/pages/HomePage.tsx @@ -93,25 +93,20 @@ export const HomePage = () => { if (!pluginsSocket) { return } - pluginsSocket?.emit('search', searchParams) - - pluginsSocket!.on('results:search', (data: { results: PluginDef[] }) => { - if (Array.isArray(data.results) && data.results.length > 0) { - setPlugins(data.results) - } else { - useStore.getState().setToastState({ - open: true, - title: "Error retrieving plugins", - success: false - }) - } + setPlugins(data.results) + }) + pluginsSocket!.on('results:searcherror', (data: {error: string}) => { + console.log(data.error) + useStore.getState().setToastState({ + open: true, + title: "Error retrieving plugins", + success: false + }) }) - - }, [searchParams, pluginsSocket]); const uninstallPlugin = (pluginName: string)=>{ @@ -125,7 +120,6 @@ export const HomePage = () => { setPlugins(plugins.filter(plugin=>plugin.name !== pluginName)) } - useDebounce(()=>{ setSearchParams({ ...searchParams, @@ -161,12 +155,12 @@ export const HomePage = () => { })} - - + + -

- {setSearchTerm(v.target.value)}} placeholder={t('admin_plugins.available_search.placeholder')} value={searchTerm}/> +

+ {setSearchTerm(v.target.value)}} placeholder={t('admin_plugins.available_search.placeholder')} value={searchTerm}/> @@ -179,17 +173,21 @@ export const HomePage = () => { - {plugins.map((plugin) => { - return - - - - - - - })} + {(plugins.length > 0) ? + plugins.map((plugin) => { + return + + + + + + + }) + : + + }
{plugin.name}{plugin.description}{plugin.version}{plugin.time} - } onClick={() => installPlugin(plugin.name)} title={}/> -
{plugin.name}{plugin.description}{plugin.version}{plugin.time} + } onClick={() => installPlugin(plugin.name)} title={}/> +
{searchTerm == '' ? : }
diff --git a/admin/src/pages/PadPage.tsx b/admin/src/pages/PadPage.tsx index 284cba3c1e3..58c38fce06f 100644 --- a/admin/src/pages/PadPage.tsx +++ b/admin/src/pages/PadPage.tsx @@ -26,7 +26,7 @@ export const PadPage = ()=>{ const [padToDelete, setPadToDelete] = useState('') const pages = useMemo(()=>{ if(!pads){ - return [0] + return 0; } return Math.ceil(pads!.total / searchParams.limit) @@ -166,7 +166,7 @@ export const PadPage = ()=>{ offset: (Number(currentPage)-1)*searchParams.limit}) }}>Previous Page {currentPage+1} out of {pages} -