29 Commits

Author SHA1 Message Date
John McLear
36d61b2e29
fix: locale issues — custom strings caching, lang race, and window._() (#7454)
* fix: customLocaleStrings not applied due to aggressive locale caching

The admin panel's i18next backend used fetch with cache: "force-cache",
causing the browser to serve stale locale JSON even after the server
restarted with new customLocaleStrings in settings.json. The server
already sets appropriate Cache-Control headers (max-age based on
settings.maxAge), so the client-side force-cache was redundant and
prevented custom strings from appearing.

Fixes #6390

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: URL lang param now reliably overrides server default language

getParams() was processing server options first and URL params second,
both calling html10n.localize() for the lang setting. Since localize()
is async, the two calls raced and the result was nondeterministic.

Now processes each setting once: URL param wins if present, otherwise
falls back to server option. This eliminates the race condition.

Fixes #5510

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: window._() localization function always available for plugins

The html10n gettext shortcut window._ was only set if window._ was
undefined, but underscore.js was already setting it via the esbuild
bundle. Since internal code uses underscore via require() not window._,
it's safe to always set window._ to html10n.get so plugins can use
window._() for localization in hooks like documentReady.

Fixes #6627

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-05 01:58:33 +01:00
John McLear
09d782f695
Enforce 2-space indentation across codebase (#7426)
* Enforce 2-space indentation across codebase

Convert all 4-space indented source files to 2-space to match
.editorconfig and project contributor guidelines.

74 files converted: admin UI components, type definitions, security
modules, test files, helpers, and utilities.

No functional changes — 2882 insertions, 2882 deletions (pure
whitespace).

Fixes #7353

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* Limit admin tests to chromium and firefox

Webkit is already tested in the dedicated frontend-tests workflow.
Running it again in admin tests causes flaky failures due to slow
socket connections and external API timeouts on webkit CI runners.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-01 19:48:45 +01:00
Edge-Seven
658ae78922
Fix typos in some files (#7227)
Co-authored-by: khanhkhanhlele <namkhanh20xx@gmail.com>
2025-11-18 10:33:10 +01:00
SamTV12345
fbf8ddeaa8
chore: added react compiler and fixed url to manage pads (#7158) 2025-10-06 12:41:26 +02:00
SamTV12345
f0e7942a55
chore: use only rolldown for building (#7101) 2025-08-26 22:22:10 +02:00
SamTV12345
a5413d7272
chore: added possibility to create pads via admin menu (#7100) 2025-08-26 21:51:13 +02:00
SamTV12345
40884fa96b feat: disable stats endpoint if enableMetrics is false 2025-07-27 22:22:18 +02:00
SamTV12345
840fc982c4 Fixed comp problems 2024-12-22 16:54:56 +01:00
SamTV12345
0b26405201
fix(admin): Fixed updating plugins (#6705) 2024-10-10 18:15:48 +02:00
Stefan Müller
1ad9418a6f
Add code for revision cleanup (#6442)
* Add initial code for revision cleanup

* Some improvements - code cleanup

* Cleanup logging

* Add button in admin backend to cleanup revisions of a specific pad

* Disable cleanup by default and show errors in admin area

* Improve cleanup code

* Load revisions for cleanup in parallel

* Consider saved revisions during pad cleanup
2024-09-14 15:54:30 +02:00
SamTv12345
08f199178d Fixed admin panel 2024-09-13 15:44:19 +02:00
SamTv12345
178fe7c24d Fixed admin panel mobile view. 2024-09-13 15:36:39 +02:00
SamTV12345
221f6f2002
Added sorting for plugins (#6580) 2024-08-13 21:32:40 +02:00
SamTV12345
f7b1311e36 Fixed sorting of other pad columns 2024-08-06 20:43:10 +02:00
samyakj023
161dd72690
next-page-disabled-if-zero-page (#6457) 2024-06-18 19:28:03 +02:00
Helder Sepulveda
a637921160
Move away from using toast in the plugin search (#6441) 2024-06-10 19:00:58 +02:00
Helder Sepulveda
13e160cbe4
Clean comments (#6420)
* Add script to trigger test on utils

* Add new function to remove the comments from the settings file.
It reduces the size of the payload when we save on the admin page `.../admin/settings`

* Add     font-family: monospace; to the settings
2024-06-04 19:32:21 +02:00
SamTV12345
df3686dcad
Fixed pagination of pads (#6406) 2024-05-24 22:32:03 +02:00
SamTV12345
e12be96102
feat(admin): Added shoutout to admin panel (#6346)
* Added shoutout

* Added shoutout function

* Fixed test.

* Included feedback from review.

* Removed unnecessary file
2024-04-21 17:58:51 +02:00
SamTV12345
9d8f1f60cc
Fixed some minor admin bugs (#6335) 2024-04-16 19:48:34 +02:00
SamTV12345
a541375f7f Fixed plugin updates 2024-04-16 19:16:38 +02:00
SamTV12345
0b80e256b4
Added proxy support for axios. (#6334) 2024-04-16 19:11:05 +02:00
kekePower
39ef8f1504
LoginScreen.tsx -> Passwort -> Password (#6299)
Found a typo in LoginScreen where is says Passwort instead of Password.
2024-04-02 18:59:37 +02:00
SamTV12345
0e4937b50f Improved login admin page. 2024-03-14 22:36:53 +01:00
SamTV12345
cda40c91c2 Added eye icon. 2024-03-14 16:43:14 +01:00
SamTV12345
9575ab8457 Added better looking pad scroll. 2024-03-14 16:43:14 +01:00
SamTV12345
73dff0bfe7
Begin redesigning admin panel. (#6219)
* Begin redesigning admin panel.

* Added monaco editor.

* Fixed tests
2024-03-13 15:47:02 +01:00
SamTV12345
c2699e4528
Added playwright tests. (#6212)
* Added playwright tests.

* Added clear authorship color.

* Ported enter ts.

* Ported more tests.

* Commented helper tests.

* Fixed admin tests.

* Fixed.

* Fixed admin pages not there.

* Fixed waiting.

* Upload playwright report.

* Remove saucelabs

* Fixed waiting.

* Fixed upload artifact.

* Also install deps.

* Added retry mechanism.

* Added timeout for restart etherpad server.

* Fixed tests.

* Added frontend playwright tests.
2024-03-10 23:18:50 +01:00
SamTV12345
db46ffb63b
Feat/admin react (#6211)
* Added vite react admin ui.

* Added react i18next.

* Added pads manager.

* Fixed docker build.

* Fixed windows build.

* Fixed installOnWindows script.

* Install only if path exists.
2024-03-09 23:07:09 +01:00