feat(layout/observer): Add user preference for dark theme in LayoutObserver
component. (#21255)
* feat(layout/observer): Add user preference for dark theme in `LayoutObserver` component. * feat(docs/administration): Add support for default dark theme preference parameter * refactor(settings): Remove dark theme setting from LayoutObserver and move it to Settings class.
This commit is contained in:
parent
f74a0657ba
commit
4b0cd2b522
@ -3,6 +3,7 @@ import { isEmpty } from 'radash';
|
||||
import LocalStorage from '/imports/ui/services/storage/local';
|
||||
import SessionStorage from '/imports/ui/services/storage/session';
|
||||
import { CHANGED_SETTINGS, DEFAULT_SETTINGS, SETTINGS } from './enums';
|
||||
import getFromUserSettings from '/imports/ui/services/users-settings';
|
||||
|
||||
class Settings {
|
||||
constructor(defaultValues = {}) {
|
||||
@ -32,6 +33,13 @@ class Settings {
|
||||
|| navigator.language
|
||||
|| writableDefaultValues.application.locale;
|
||||
|
||||
const showDarkThemeDefault = getFromUserSettings(
|
||||
'bbb_prefer_dark_theme',
|
||||
window.meetingClientSettings.public.app.defaultSettings.application.darkTheme,
|
||||
);
|
||||
|
||||
writableDefaultValues.application.darkTheme = showDarkThemeDefault;
|
||||
|
||||
this.setDefault(writableDefaultValues);
|
||||
this.loadChanged();
|
||||
}
|
||||
|
@ -1452,6 +1452,7 @@ The use of *more will include all shapes listed above.
|
||||
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------- | ------------- |
|
||||
| `userdata-bbb_custom_style=` | URL encoded string with custom CSS | none |
|
||||
| `userdata-bbb_custom_style_url=` | This parameter acts the same way as `userdata-bbb_custom_style` except that the CSS content comes from a hosted file | none |
|
||||
| `userdata-bbb_prefer_dark_theme=` | This parameter makes the dark theme come in as default | false |
|
||||
|
||||
#### Layout parameters
|
||||
|
||||
|
@ -112,7 +112,7 @@ Updated in 2.7:
|
||||
Updated in 3.0:
|
||||
|
||||
- **create** - **Added parameters:** `allowOverrideClientSettingsOnCreateCall`, `loginURL`. Parameter `meetingLayout` supports a few new options: CAMERAS_ONLY, PARTICIPANTS_CHAT_ONLY, PRESENTATION_ONLY; **Added POST module:** `clientSettingsOverride`; **Added:** `disabledFeatures` options `infiniteWhiteboard`;
|
||||
- **join** - **Added:** `enforceLayout`, `userdata-bbb_default_layout`, `userdata-bbb_skip_echotest_if_previous_device`. **Removed:** `defaultLayout` (replaced by `userdata-bbb_default_layout`) and removed support for all HTTP request methods except GET.
|
||||
- **join** - **Added:** `enforceLayout`, `userdata-bbb_default_layout`, `userdata-bbb_skip_echotest_if_previous_device`, `bbb_prefer_dark_theme`. **Removed:** `defaultLayout` (replaced by `userdata-bbb_default_layout`) and removed support for all HTTP request methods except GET.
|
||||
- **sendChatMessage** endpoint was first introduced.
|
||||
- **enter** endpoint was removed. It was only used internally, never part of the api documentation.
|
||||
- **html5client/check** endpoint was removed. It was used for checking the health of the server returning `{"html5clientStatus":"running"}`
|
||||
|
Loading…
Reference in New Issue
Block a user