Paul Donald db91dbcdf7 luci-static: fix race condition when probing features
follow-up to a2fce95248

hasSystemFeature() inspects the cached result of
probeSystemFeatures() which needs to have completed.

Once all of the legacy (Lua) stuff is ready, this block
runs:

initDOM() {
	...
	L.loaded = true;
	document.dispatchEvent(new CustomEvent('luci-loaded'));
},

This commit now calls View.load() once system feature
probing has completed, and LuCI itself has loaded. This
ensures that the following load paradigm succeeds:

return view.extend({
	load() {
		return Promise.all([
			...,
			L.hasSystemFeature('x'),
		]);
	}, ...

The luci-loaded check prevents waiting when LuCI is already
loaded (the common case after initial page load), but the
listener handles the race condition where a View is
instantiated before initDOM() completes.

The flow:

If L.loaded is true: initDOM() already ran --> skip waiting,
proceed immediately.

If L.loaded is false: initDOM() hasn't run yet --> add
listener --> wait for it to complete.

Signed-off-by: Paul Donald <newtwen+github@gmail.com>
2025-12-24 17:34:16 +01:00
2025-12-20 16:53:01 +02:00
2024-11-22 22:39:46 +01:00
2025-06-08 20:41:25 +02:00
2019-11-07 12:39:24 +01:00
2025-10-11 18:59:19 +03:00
2025-11-07 14:36:39 +01:00

OpenWrt luci feed

Translation status

Description

This is the OpenWrt "luci"-feed containing LuCI - OpenWrt Configuration Interface.

Usage

This feed is enabled by default. Your feeds.conf.default (or feeds.conf) should contain a line like:

src-git luci https://github.com/openwrt/luci.git

To install all its package definitions, run:

./scripts/feeds update luci
./scripts/feeds install -a -p luci

API Reference

You can browse the generated API documentation directly on Github.

Development

Documentation for developing and extending LuCI can be found in the Wiki

License

See LICENSE file.

Package Guidelines

See CONTRIBUTING.md file.

Translation status

Use Weblate instead of direct editing of the *.po files.

Translation status

Description
LuCI - OpenWrt Configuration Interface
Readme Apache-2.0 470 MiB
Languages
JavaScript 59.2%
C 18.4%
Lua 11.2%
CSS 3.8%
HTML 2.3%
Other 5%