Skip to content

Add PWA support#5571

Open
NightWatcher314 wants to merge 1 commit into
NginxProxyManager:developfrom
NightWatcher314:feature/pwa-support
Open

Add PWA support#5571
NightWatcher314 wants to merge 1 commit into
NginxProxyManager:developfrom
NightWatcher314:feature/pwa-support

Conversation

@NightWatcher314
Copy link
Copy Markdown

Why

This adds basic Progressive Web App support to the web UI so administrators can install Nginx Proxy Manager from supported browsers and launch it like a standalone app.

The implementation keeps the management behavior online-first:

  • adds a complete web app manifest with valid icon paths and app metadata
  • registers a production-only service worker
  • caches only the app shell and static frontend assets
  • keeps /api/ requests network-only so management data and mutations are not served from stale cache
  • provides an offline fallback page that explains management actions require the NPM server
  • shows a toast when an updated service worker is ready to activate

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Code refactoring
  • API changes
  • Performance improvement
  • Test addition or update

Testing

  • yarn lint in frontend/
  • yarn build in frontend/

AI Usage

  • AI was used to write this
  • AI was used to review this

@nginxproxymanagerci
Copy link
Copy Markdown

CI Error:

/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8): No such file or directory
certbot-node: Pulling from nginxproxymanager/nginx-full
6b47fc290b0d: Pulling fs layer
35051b2020bc: Pulling fs layer
5195c0a6999c: Pulling fs layer
4aa87763f805: Pulling fs layer
148a68cf7435: Pulling fs layer
4e373f43fd8a: Pulling fs layer
c0981f521423: Pulling fs layer
73c065b08cd7: Pulling fs layer
66ef3b476f18: Pulling fs layer
349a96dfbd1c: Pulling fs layer
8cdc88635292: Pulling fs layer
8b938b0affe6: Pulling fs layer
236bab010eb7: Pulling fs layer
70a1d188dd54: Pulling fs layer
19e2563285cb: Pulling fs layer
5b4d6ff92fc4: Pulling fs layer
9a809c201155: Pulling fs layer
36d2f5442e72: Pulling fs layer
dc9ae129122b: Pulling fs layer
5df8c4ae9676: Pulling fs layer
340ed91682be: Download complete
349a96dfbd1c: Download complete
4aa87763f805: Download complete
6b47fc290b0d: Download complete
8b938b0affe6: Download complete
4e373f43fd8a: Download complete
19e2563285cb: Download complete
35051b2020bc: Download complete
148a68cf7435: Download complete
66ef3b476f18: Download complete
dc9ae129122b: Download complete
9a809c201155: Download complete
236bab010eb7: Download complete
8cdc88635292: Download complete
70a1d188dd54: Download complete
5df8c4ae9676: Download complete
36d2f5442e72: Download complete
5b4d6ff92fc4: Download complete
66ef3b476f18: Pull complete
5b4d6ff92fc4: Pull complete
73c065b08cd7: Download complete
8b938b0affe6: Pull complete
236bab010eb7: Pull complete
36d2f5442e72: Pull complete
35051b2020bc: Pull complete
9a809c201155: Pull complete
5195c0a6999c: Download complete
5195c0a6999c: Pull complete
4aa87763f805: Pull complete
349a96dfbd1c: Pull complete
70a1d188dd54: Pull complete
4e373f43fd8a: Pull complete
5df8c4ae9676: Pull complete
73c065b08cd7: Pull complete
148a68cf7435: Pull complete
8cdc88635292: Pull complete
c0981f521423: Download complete
6b47fc290b0d: Pull complete
19e2563285cb: Pull complete
dc9ae129122b: Pull complete
c0981f521423: Pull complete
Digest: sha256:0a1fdfc728f5b0adb63aa2240187df00ab04709c6ac6265e8e858f28eb9e5160
Status: Downloaded newer image for nginxproxymanager/nginx-full:certbot-node
docker.io/nginxproxymanager/nginx-full:certbot-node
�[1;34m❯ �[1;36mBuilding Frontend ...�[0m
yarn install v1.22.22
[1/4] Resolving packages...
[2/4] Fetching packages...
[3/4] Linking dependencies...
warning " > @uiw/react-textarea-code-editor@3.1.1" has unmet peer dependency "@babel/runtime@>=7.10.0".
[4/4] Building fresh packages...
Done in 72.27s.
yarn run v1.22.22
$ biome lint
Checked 228 files in 109ms. No fixes applied.
Done in 0.20s.
yarn run v1.22.22
$ formatjs compile-folder src/locale/src src/locale/lang
Done in 0.34s.
yarn run v1.22.22
$ /app/frontend/node_modules/.bin/vitest run --no-color

 RUN  v4.1.6 /app/frontend

 ❯ src/locale/Utils.test.tsx (0 test)

⎯⎯⎯⎯⎯⎯ Failed Suites 1 ⎯⎯⎯⎯⎯⎯⎯

 FAIL  src/locale/Utils.test.tsx [ src/locale/Utils.test.tsx ]
Error: EOF while parsing a value at line 1 column 0
  Plugin: builtin:vite-json
  File: [object Object]
⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯⎯[1/1]⎯


 Test Files  1 failed (1)
      Tests  no tests
   Start at  10:10:45
   Duration  469ms (transform 61ms, setup 73ms, import 0ms, tests 0ms, environment 222ms)

$ formatjs compile-folder src/locale/src src/locale/lang

$ ./src/locale/scripts/locale-sort.sh
bg.json is already sorted
cs.json is already sorted
de.json is already sorted
en.json is already sorted
es.json is already sorted
et.json is already sorted
fr.json is already sorted
ga.json is already sorted
hu.json is already sorted
id.json is already sorted
it.json is already sorted
ja.json is already sorted
ko.json is already sorted
nl.json is already sorted
no.json is already sorted
pl.json is already sorted
pt.json is already sorted
ru.json is already sorted
sk.json is already sorted
tr.json is already sorted
vi.json is already sorted
zh.json is already sorted

info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant