2023-05-16 03:46:44 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import Indicator from './component';
|
|
|
|
import TimerService from '/imports/ui/components/timer/service';
|
2022-02-04 00:49:21 +08:00
|
|
|
import { layoutSelectInput } from '/imports/ui/components/layout/context';
|
2023-05-16 03:46:44 +08:00
|
|
|
|
|
|
|
const IndicatorContainer = (props) => {
|
2022-02-04 00:49:21 +08:00
|
|
|
const sidebarNavigation = layoutSelectInput((i) => i.sidebarNavigation);
|
|
|
|
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
|
|
|
|
const sidebarNavigationIsOpen = sidebarNavigation.isOpen;
|
|
|
|
const sidebarContentIsOpen = sidebarContent.isOpen;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Indicator
|
|
|
|
{...{
|
|
|
|
sidebarNavigationIsOpen,
|
|
|
|
sidebarContentIsOpen,
|
|
|
|
...props,
|
|
|
|
}}
|
|
|
|
/>
|
|
|
|
);
|
2023-05-16 03:46:44 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
export default withTracker(() => ({
|
|
|
|
timer: TimerService.getTimer(),
|
|
|
|
timeOffset: TimerService.getTimeOffset(),
|
|
|
|
isModerator: TimerService.isModerator(),
|
|
|
|
isTimerActive: TimerService.isActive(),
|
2021-09-14 02:16:07 +08:00
|
|
|
isMusicActive: TimerService.isMusicActive(),
|
2022-02-02 03:05:02 +08:00
|
|
|
currentTrack: TimerService.getCurrentTrack(),
|
2023-05-16 03:46:44 +08:00
|
|
|
}))(IndicatorContainer);
|