2024-10-22 21:22:42 +08:00
|
|
|
import React, { useEffect, useState } from 'react';
|
2018-09-14 02:09:30 +08:00
|
|
|
import getFromUserSettings from '/imports/ui/services/users-settings';
|
2024-08-22 01:58:32 +08:00
|
|
|
import { isDarkThemeEnabled } from '/imports/ui/components/app/service';
|
2017-07-12 21:18:26 +08:00
|
|
|
import UserList from './component';
|
2024-06-06 21:50:03 +08:00
|
|
|
import { useStorageKey } from '../../services/storage/hooks';
|
2016-05-20 02:22:56 +08:00
|
|
|
|
2024-06-06 21:50:03 +08:00
|
|
|
const UserListContainer = (props) => {
|
|
|
|
const CustomLogoUrl = useStorageKey('CustomLogoUrl', 'session');
|
2024-08-22 01:58:32 +08:00
|
|
|
const CustomDarkLogoUrl = useStorageKey('CustomDarkLogoUrl', 'session');
|
2024-10-22 21:22:42 +08:00
|
|
|
const [DarkModeIsEnabled, setDarkModeIsEnabled] = useState(isDarkThemeEnabled());
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
const handleDarkModeChange = (event) => {
|
|
|
|
setDarkModeIsEnabled(event.detail.enabled);
|
|
|
|
};
|
|
|
|
|
|
|
|
window.addEventListener('darkmodechange', handleDarkModeChange);
|
|
|
|
|
|
|
|
return () => {
|
|
|
|
window.removeEventListener('darkmodechange', handleDarkModeChange);
|
|
|
|
};
|
|
|
|
}, []);
|
2024-08-22 01:58:32 +08:00
|
|
|
|
2024-06-06 21:50:03 +08:00
|
|
|
return (
|
2024-06-11 02:59:32 +08:00
|
|
|
<UserList
|
|
|
|
CustomLogoUrl={CustomLogoUrl}
|
2024-08-22 01:58:32 +08:00
|
|
|
CustomDarkLogoUrl={CustomDarkLogoUrl}
|
|
|
|
DarkModeIsEnabled={DarkModeIsEnabled}
|
2024-06-11 02:59:32 +08:00
|
|
|
{...props}
|
|
|
|
showBranding={getFromUserSettings('bbb_display_branding_area', window.meetingClientSettings.public.app.branding.displayBrandingArea)}
|
|
|
|
/>
|
2024-06-06 21:50:03 +08:00
|
|
|
);
|
|
|
|
};
|
2016-05-20 02:22:56 +08:00
|
|
|
|
2024-06-11 02:59:32 +08:00
|
|
|
export default UserListContainer;
|