mirror of
https://github.com/cpvalente/ontime.git
synced 2026-09-02 12:59:09 +00:00
style cleanup + tweaks
Title <> Subtitle relationships Animat ein
This commit is contained in:
@@ -0,0 +1,14 @@
|
|||||||
|
import style from './TitleCard.module.css';
|
||||||
|
|
||||||
|
export default function TitleCard(props) {
|
||||||
|
const { label, title, subtitle, presenter } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className={style.label}>{label}</div>
|
||||||
|
<div className={style.title}>{title}</div>
|
||||||
|
<div className={style.presenter}>{presenter}</div>
|
||||||
|
<div className={style.subtitle}>{subtitle}</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
.label {
|
||||||
|
font-size: 1.3vw;
|
||||||
|
color: #ff7597;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title,
|
||||||
|
.subtitle,
|
||||||
|
.presenter {
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title {
|
||||||
|
color: #ddd;
|
||||||
|
font-size: 2.5vw;
|
||||||
|
flex: 1;
|
||||||
|
font-weight: 600;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle,
|
||||||
|
.presenter {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.subtitle {
|
||||||
|
font-size: 1.5vw;
|
||||||
|
font-weight: 200;
|
||||||
|
margin-top: -0.8vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.presenter {
|
||||||
|
font-size: 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.title:after,
|
||||||
|
.presenter:after,
|
||||||
|
.subtitle:after {
|
||||||
|
content: '\200b';
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
import style from './TitleSide.module.css';
|
||||||
|
|
||||||
|
export default function TitleSide(props) {
|
||||||
|
const { type, label, title, subtitle, presenter } = props;
|
||||||
|
|
||||||
|
const titleStyle = type === 'next' ? style.nextTitle : style.nowTitle;
|
||||||
|
const subStyle = type === 'next' ? style.nextSubtitle : style.nowSubtitle;
|
||||||
|
const presStyle = type === 'next' ? style.nextPresenter : style.nowPresenter;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<>
|
||||||
|
<div className={style.label}>{label}</div>
|
||||||
|
<div className={titleStyle}>{title}</div>
|
||||||
|
<div className={presStyle}>{presenter}</div>
|
||||||
|
<div className={subStyle}>{subtitle}</div>
|
||||||
|
</>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
.label {
|
||||||
|
font-size: 1.3vw;
|
||||||
|
color: #ff7597;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowTitle,
|
||||||
|
.nextTitle {
|
||||||
|
color: #ddd;
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowSubtitle,
|
||||||
|
.nowPresenter,
|
||||||
|
.nextSubtitle,
|
||||||
|
.nextPresenter {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowTitle {
|
||||||
|
font-size: 2.5vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowPresenter {
|
||||||
|
font-size: 2vw;
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowSubtitle {
|
||||||
|
font-size: 1.2vw;
|
||||||
|
margin-top: -1vh;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nextTitle {
|
||||||
|
font-size: 2vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nextSubtitle {
|
||||||
|
margin-top: -0.8vh;
|
||||||
|
font-size: 1.1vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nextPresenter {
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.5vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.nowTitle:after,
|
||||||
|
.nowSubtitle:after,
|
||||||
|
.nowPresenter:after,
|
||||||
|
.nextTitle:after,
|
||||||
|
.nextSubtitle:after,
|
||||||
|
.nextPresenter:after {
|
||||||
|
content: '\200b';
|
||||||
|
}
|
||||||
@@ -1,16 +1,17 @@
|
|||||||
.emptyContainer {
|
.emptyContainer {
|
||||||
text-align: center;
|
|
||||||
color: rgba(0, 0, 0, 0.17);
|
|
||||||
font-weight: 600;
|
|
||||||
font-size: 2em;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: auto 0;
|
margin: auto 0;
|
||||||
|
margin-top: 10vh;
|
||||||
opacity: 0.3;
|
opacity: 0.3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.text {
|
.text {
|
||||||
text-align: center;
|
color: rgba(0, 0, 0, 0.17);
|
||||||
|
font-weight: 600;
|
||||||
|
font-size: 2em;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export default function Editor() {
|
|||||||
|
|
||||||
<div className={styles.mainContainer}>
|
<div className={styles.mainContainer}>
|
||||||
<Box className={styles.editor}>
|
<Box className={styles.editor}>
|
||||||
<Heading size='lg' style={{ paddingBottom: '0.25em' }}>
|
<Heading size='lg' paddingBottom={'0.25em'}>
|
||||||
Event List
|
Event List
|
||||||
</Heading>
|
</Heading>
|
||||||
<NumberedText number={1} text={'Manage and select event to run'} />
|
<NumberedText number={1} text={'Manage and select event to run'} />
|
||||||
@@ -29,7 +29,7 @@ export default function Editor() {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.preview} borderRadius='0.5em' overflowX='auto'>
|
<Box className={styles.preview} borderRadius='0.5em' overflowX='auto'>
|
||||||
<Heading size='lg' style={{ paddingBottom: '0.25em' }}>
|
<Heading size='lg' paddingBottom={'0.25em'}>
|
||||||
Preview Displays
|
Preview Displays
|
||||||
</Heading>
|
</Heading>
|
||||||
<NumberedText number={4} text={'Realtime screen preview'} />
|
<NumberedText number={4} text={'Realtime screen preview'} />
|
||||||
@@ -39,7 +39,7 @@ export default function Editor() {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.messages}>
|
<Box className={styles.messages}>
|
||||||
<Heading size='lg' style={{ paddingBottom: '0.25em' }}>
|
<Heading size='lg' paddingBottom={'0.25em'}>
|
||||||
Display Messages
|
Display Messages
|
||||||
</Heading>
|
</Heading>
|
||||||
<NumberedText
|
<NumberedText
|
||||||
@@ -52,7 +52,7 @@ export default function Editor() {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.playback}>
|
<Box className={styles.playback}>
|
||||||
<Heading size='lg' style={{ paddingBottom: '0.25em' }}>
|
<Heading size='lg' paddingBottom={'0.25em'}>
|
||||||
Time Control
|
Time Control
|
||||||
</Heading>
|
</Heading>
|
||||||
<NumberedText number={3} text={'Control Timer'} />
|
<NumberedText number={3} text={'Control Timer'} />
|
||||||
@@ -62,64 +62,8 @@ export default function Editor() {
|
|||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Box className={styles.settings}>
|
<Box className={styles.settings}>
|
||||||
<div
|
<div className={styles.content}>
|
||||||
style={{
|
|
||||||
display: 'flex',
|
|
||||||
flexDirection: 'column',
|
|
||||||
alignItems: 'center',
|
|
||||||
gap: '2em',
|
|
||||||
paddingTop: '3em',
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<SettingsIconBtn size='md' clickhandler={onOpen} />
|
<SettingsIconBtn size='md' clickhandler={onOpen} />
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#3b8cd8',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#3182ce',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#2778c4',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#1d6eba',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#1364b0',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
width: 35,
|
|
||||||
height: 35,
|
|
||||||
backgroundColor: '#095aa6',
|
|
||||||
borderRadius: '50%',
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</Box>
|
</Box>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -92,6 +92,10 @@
|
|||||||
|
|
||||||
.settings {
|
.settings {
|
||||||
grid-area: sett;
|
grid-area: sett;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 2.6em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
|
|||||||
@@ -1,13 +1,13 @@
|
|||||||
import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/menu';
|
import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/menu';
|
||||||
import { IconButton } from '@chakra-ui/button';
|
import { IconButton } from '@chakra-ui/button';
|
||||||
import { FiZap, FiPlus, FiMinus, FiMinusCircle, FiClock } from 'react-icons/fi';
|
import { FiZap, FiPlus, FiMinusCircle, FiClock } from 'react-icons/fi';
|
||||||
|
|
||||||
export default function ActionButtons(props) {
|
export default function ActionButtons(props) {
|
||||||
const { showDel, showAdd, showDelay, showBlock } = props;
|
const { showAdd, showDelay, showBlock } = props;
|
||||||
|
|
||||||
const menuStyle = {
|
const menuStyle = {
|
||||||
color: '#000000',
|
color: '#000000',
|
||||||
backgroundColor: 'rgba(255,255,255,0.67)',
|
backgroundColor: 'rgba(255,255,255,1)',
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -23,26 +23,28 @@ export default function ActionButtons(props) {
|
|||||||
color={'orange.500'}
|
color={'orange.500'}
|
||||||
/>
|
/>
|
||||||
<MenuList style={menuStyle}>
|
<MenuList style={menuStyle}>
|
||||||
{showDel && (
|
<MenuItem
|
||||||
<MenuItem icon={<FiMinus />} onClick={props.deleteHandler}>
|
icon={<FiPlus />}
|
||||||
Delete
|
onClick={props.addHandler}
|
||||||
</MenuItem>
|
isDisabled={!showAdd}
|
||||||
)}
|
>
|
||||||
{showAdd && (
|
Event next
|
||||||
<MenuItem icon={<FiPlus />} onClick={props.addHandler}>
|
</MenuItem>
|
||||||
Event next
|
|
||||||
</MenuItem>
|
<MenuItem
|
||||||
)}
|
icon={<FiClock />}
|
||||||
{showDelay && (
|
onClick={props.delayHandler}
|
||||||
<MenuItem icon={<FiClock />} onClick={props.delayHandler}>
|
isDisabled={!showDelay}
|
||||||
Delay next
|
>
|
||||||
</MenuItem>
|
Delay next
|
||||||
)}
|
</MenuItem>
|
||||||
{showBlock && (
|
<MenuItem
|
||||||
<MenuItem icon={<FiMinusCircle />} onClick={props.blockHandler}>
|
icon={<FiMinusCircle />}
|
||||||
Block next
|
onClick={props.blockHandler}
|
||||||
</MenuItem>
|
isDisabled={!showBlock}
|
||||||
)}
|
>
|
||||||
|
Block next
|
||||||
|
</MenuItem>
|
||||||
</MenuList>
|
</MenuList>
|
||||||
</Menu>
|
</Menu>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ import DeleteIconBtn from '../../../common/components/buttons/DeleteIconBtn';
|
|||||||
|
|
||||||
export default function EventBlock(props) {
|
export default function EventBlock(props) {
|
||||||
const { data, selected, next, delay, index, eventsHandler } = props;
|
const { data, selected, next, delay, index, eventsHandler } = props;
|
||||||
const [visible, setVisible] = useState(false);
|
|
||||||
|
|
||||||
const [more, setMore] = useState(false);
|
const [more, setMore] = useState(false);
|
||||||
|
|
||||||
@@ -53,6 +52,11 @@ export default function EventBlock(props) {
|
|||||||
updateValues('presenter', v);
|
updateValues('presenter', v);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const handleVisibleToggle = (v) => {
|
||||||
|
// setVisible(previousState => !previousState);
|
||||||
|
updateValues('isPublic', !data.isPublic);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={selected ? style.eventRowActive : style.eventRow}>
|
<div className={selected ? style.eventRowActive : style.eventRow}>
|
||||||
<span className={style.drag}>
|
<span className={style.drag}>
|
||||||
@@ -110,8 +114,8 @@ export default function EventBlock(props) {
|
|||||||
</div>
|
</div>
|
||||||
<div className={style.actionOverlay}>
|
<div className={style.actionOverlay}>
|
||||||
<VisibleIconBtn
|
<VisibleIconBtn
|
||||||
clickhandler={() => setVisible(!visible)}
|
clickhandler={handleVisibleToggle}
|
||||||
active={visible || undefined}
|
active={data.isPublic}
|
||||||
/>
|
/>
|
||||||
<DeleteIconBtn clickhandler={deleteHandler} />
|
<DeleteIconBtn clickhandler={deleteHandler} />
|
||||||
<ActionButtons
|
<ActionButtons
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { useSocket } from '../../../app/context/socketContext';
|
|||||||
import tinykeys from 'tinykeys';
|
import tinykeys from 'tinykeys';
|
||||||
import Empty from '../../../common/state/Empty';
|
import Empty from '../../../common/state/Empty';
|
||||||
import EventListItem from './EventListItem';
|
import EventListItem from './EventListItem';
|
||||||
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
|
|
||||||
export default function EventList(props) {
|
export default function EventList(props) {
|
||||||
const { events, eventsHandler } = props;
|
const { events, eventsHandler } = props;
|
||||||
@@ -78,14 +79,38 @@ export default function EventList(props) {
|
|||||||
return <Empty text='No Events' />;
|
return <Empty text='No Events' />;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// motion
|
||||||
|
const cursorVariants = {
|
||||||
|
hidden: {
|
||||||
|
scale: 0,
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
scale: 1,
|
||||||
|
transition: {
|
||||||
|
duration: 0.3,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exit: {
|
||||||
|
scale: 0,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
console.log('EventList: events in event list', events);
|
console.log('EventList: events in event list', events);
|
||||||
let cumulativeDelay = 0;
|
let cumulativeDelay = 0;
|
||||||
|
|
||||||
console.log('debug next id', next)
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.eventContainer}>
|
<div className={style.eventContainer}>
|
||||||
{cursor === -1 && <div className={style.cursor} />}
|
<AnimatePresence>
|
||||||
|
{cursor === -1 && (
|
||||||
|
<motion.div
|
||||||
|
className={style.cursor}
|
||||||
|
variants={cursorVariants}
|
||||||
|
initial='hidden'
|
||||||
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
{events.map((e, index) => {
|
{events.map((e, index) => {
|
||||||
if (e.type === 'delay') cumulativeDelay += e.duration;
|
if (e.type === 'delay') cumulativeDelay += e.duration;
|
||||||
@@ -101,7 +126,17 @@ export default function EventList(props) {
|
|||||||
eventsHandler={eventsHandler}
|
eventsHandler={eventsHandler}
|
||||||
delay={cumulativeDelay}
|
delay={cumulativeDelay}
|
||||||
/>
|
/>
|
||||||
{cursor === index && <div className={style.cursor} />}
|
<AnimatePresence>
|
||||||
|
{cursor === index && (
|
||||||
|
<motion.div
|
||||||
|
className={style.cursor}
|
||||||
|
variants={cursorVariants}
|
||||||
|
initial='hidden'
|
||||||
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ export default function EventListWrapper() {
|
|||||||
eventsNamespace,
|
eventsNamespace,
|
||||||
fetchAllEvents
|
fetchAllEvents
|
||||||
);
|
);
|
||||||
|
|
||||||
const addEvent = useMutation(requestPost, {
|
const addEvent = useMutation(requestPost, {
|
||||||
// we optimistically update here
|
// we optimistically update here
|
||||||
onMutate: async (newEvent) => {
|
onMutate: async (newEvent) => {
|
||||||
@@ -29,10 +30,13 @@ export default function EventListWrapper() {
|
|||||||
|
|
||||||
// Snapshot the previous value
|
// Snapshot the previous value
|
||||||
let previousEvents = queryClient.getQueryData(eventsNamespace);
|
let previousEvents = queryClient.getQueryData(eventsNamespace);
|
||||||
|
console.log('debug', previousEvents)
|
||||||
if (previousEvents == null) {
|
if (previousEvents == null) {
|
||||||
await queryClient.refetchQueries();
|
refetch();
|
||||||
previousEvents = queryClient.getQueryData(eventsNamespace);
|
previousEvents = queryClient.getQueryData(eventsNamespace);
|
||||||
}
|
}
|
||||||
|
console.log('debug 2', previousEvents)
|
||||||
|
|
||||||
// optimistically update object, temp ID until refetch
|
// optimistically update object, temp ID until refetch
|
||||||
let optimistic = [...previousEvents];
|
let optimistic = [...previousEvents];
|
||||||
optimistic.splice(newEvent.order, 0, {
|
optimistic.splice(newEvent.order, 0, {
|
||||||
|
|||||||
@@ -22,4 +22,6 @@
|
|||||||
background-color: #ff7597;
|
background-color: #ff7597;
|
||||||
border-radius: 2px;
|
border-radius: 2px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
|
/* transition: 1s;
|
||||||
|
transition-property: all; */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,7 +21,14 @@ export default function PreviewContainer() {
|
|||||||
|
|
||||||
<div className={styles.previewItem}>
|
<div className={styles.previewItem}>
|
||||||
<IFrameLoader title='Audience' src={`${serverURL}/public`} />
|
<IFrameLoader title='Audience' src={`${serverURL}/public`} />
|
||||||
<div className={styles.label}>Audience</div>
|
<a
|
||||||
|
href={`${serverURL}/public`}
|
||||||
|
target='_blank'
|
||||||
|
rel='noreferrer'
|
||||||
|
className={styles.label}
|
||||||
|
>
|
||||||
|
Audience
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className={styles.previewItem}>
|
<div className={styles.previewItem}>
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ import style from './StageManager.module.css';
|
|||||||
import Paginator from '../../../common/components/views/Paginator';
|
import Paginator from '../../../common/components/views/Paginator';
|
||||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||||
import { useEffect, useState } from 'react';
|
import { useEffect, useState } from 'react';
|
||||||
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
|
import TitleSide from '../../../common/components/views/TitleSide';
|
||||||
|
|
||||||
export default function StageManager(props) {
|
export default function StageManager(props) {
|
||||||
const { publ, title, time, backstageEvents, selectedId, general } = props;
|
const { publ, title, time, backstageEvents, selectedId, general } = props;
|
||||||
@@ -39,28 +41,69 @@ export default function StageManager(props) {
|
|||||||
? formatDisplay(time.currentSeconds, true)
|
? formatDisplay(time.currentSeconds, true)
|
||||||
: '';
|
: '';
|
||||||
|
|
||||||
|
// motion
|
||||||
|
const titleVariants = {
|
||||||
|
hidden: {
|
||||||
|
x: -1500,
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
x: 0,
|
||||||
|
transition: {
|
||||||
|
duration: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exit: {
|
||||||
|
x: -1500,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.container__gray}>
|
<div className={style.container__gray}>
|
||||||
<NavLogo />
|
<NavLogo />
|
||||||
|
|
||||||
<div className={style.eventTitle}>{general.title}</div>
|
<div className={style.eventTitle}>{general.title}</div>
|
||||||
{title.showNow && (
|
|
||||||
<div className={style.nowContainer}>
|
|
||||||
<div className={style.label}>Now</div>
|
|
||||||
<div className={style.nowTitle}>{title.titleNow}</div>
|
|
||||||
<div className={style.nowSubtitle}>{title.subtitleNow}</div>
|
|
||||||
<div className={style.nowPresenter}>{title.presenterNow}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{title.showNext && (
|
<AnimatePresence>
|
||||||
<div className={style.nextContainer}>
|
{title.showNow && (
|
||||||
<div className={style.label}>Next</div>
|
<motion.div
|
||||||
<div className={style.nextTitle}>{title.titleNext}</div>
|
className={style.nowContainer}
|
||||||
<div className={style.nextSubtitle}>{title.subtitleNext}</div>
|
key='now'
|
||||||
<div className={style.nextPresenter}>{title.presenterNext}</div>
|
variants={titleVariants}
|
||||||
</div>
|
initial='hidden'
|
||||||
)}
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleSide
|
||||||
|
label='Now'
|
||||||
|
type='now'
|
||||||
|
title={title.titleNow}
|
||||||
|
subtitle={title.subtitleNow}
|
||||||
|
presenter={title.presenterNow}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
|
<AnimatePresence>
|
||||||
|
{title.showNext && (
|
||||||
|
<motion.div
|
||||||
|
className={style.nextContainer}
|
||||||
|
key='next'
|
||||||
|
variants={titleVariants}
|
||||||
|
initial='hidden'
|
||||||
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleSide
|
||||||
|
label='Next'
|
||||||
|
type='next'
|
||||||
|
title={title.titleNext}
|
||||||
|
subtitle={title.subtitleNext}
|
||||||
|
presenter={title.presenterNext}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
<div className={style.todayContainer}>
|
<div className={style.todayContainer}>
|
||||||
<div className={style.label}>Today</div>
|
<div className={style.label}>Today</div>
|
||||||
|
|||||||
@@ -113,47 +113,6 @@
|
|||||||
border-radius: 0 2vw 2vw 0;
|
border-radius: 0 2vw 2vw 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nowTitle,
|
|
||||||
.nextTitle {
|
|
||||||
color: #ddd;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowSubtitle,
|
|
||||||
.nowPresenter,
|
|
||||||
.nextSubtitle,
|
|
||||||
.nextPresenter {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowTitle {
|
|
||||||
font-size: 2.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowSubtitle,
|
|
||||||
.nowPresenter {
|
|
||||||
font-size: 2vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nextTitle {
|
|
||||||
font-size: 2vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nextSubtitle,
|
|
||||||
.nextPresenter {
|
|
||||||
color: #aaa;
|
|
||||||
font-size: 1.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowTitle:after,
|
|
||||||
.nowSubtitle:after,
|
|
||||||
.nowPresenter:after,
|
|
||||||
.nextTitle:after,
|
|
||||||
.nextSubtitle:after,
|
|
||||||
.nextPresenter:after {
|
|
||||||
content: '\200b';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =================== SCHEDULE ===================*/
|
/* =================== SCHEDULE ===================*/
|
||||||
|
|
||||||
.todayContainer {
|
.todayContainer {
|
||||||
|
|||||||
@@ -2,6 +2,8 @@ import QRCode from 'react-qr-code';
|
|||||||
import style from './Public.module.css';
|
import style from './Public.module.css';
|
||||||
import Paginator from '../../../common/components/views/Paginator';
|
import Paginator from '../../../common/components/views/Paginator';
|
||||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||||
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
|
import TitleSide from '../../../common/components/views/TitleSide';
|
||||||
|
|
||||||
export default function StageManager(props) {
|
export default function StageManager(props) {
|
||||||
const { publ, title, time, events, selectedId, general } = props;
|
const { publ, title, time, events, selectedId, general } = props;
|
||||||
@@ -9,28 +11,69 @@ export default function StageManager(props) {
|
|||||||
// Format messages
|
// Format messages
|
||||||
const showPubl = publ.text !== '' && publ.visible;
|
const showPubl = publ.text !== '' && publ.visible;
|
||||||
|
|
||||||
|
// motion
|
||||||
|
const titleVariants = {
|
||||||
|
hidden: {
|
||||||
|
x: -1500,
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
x: 0,
|
||||||
|
transition: {
|
||||||
|
duration: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exit: {
|
||||||
|
x: -1500,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={style.container__gray}>
|
<div className={style.container__gray}>
|
||||||
<NavLogo />
|
<NavLogo />
|
||||||
|
|
||||||
<div className={style.eventTitle}>{general.title}</div>
|
<div className={style.eventTitle}>{general.title}</div>
|
||||||
{title.showNow && (
|
|
||||||
<div className={style.nowContainer}>
|
|
||||||
<div className={style.label}>Now</div>
|
|
||||||
<div className={style.nowTitle}>{title.titleNow}</div>
|
|
||||||
<div className={style.nowSubtitle}>{title.subtitleNow}</div>
|
|
||||||
<div className={style.nowPresenter}>{title.presenterNow}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{title.showNext && (
|
<AnimatePresence>
|
||||||
<div className={style.nextContainer}>
|
{title.showNow && (
|
||||||
<div className={style.label}>Next</div>
|
<motion.div
|
||||||
<div className={style.nextTitle}>{title.titleNext}</div>
|
className={style.nowContainer}
|
||||||
<div className={style.nextSubtitle}>{title.subtitleNext}</div>
|
key='now'
|
||||||
<div className={style.nextPresenter}>{title.presenterNext}</div>
|
variants={titleVariants}
|
||||||
</div>
|
initial='hidden'
|
||||||
)}
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleSide
|
||||||
|
label='Now'
|
||||||
|
type='now'
|
||||||
|
title={title.titleNow}
|
||||||
|
subtitle={title.subtitleNow}
|
||||||
|
presenter={title.presenterNow}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
|
<AnimatePresence>
|
||||||
|
{title.showNext && (
|
||||||
|
<motion.div
|
||||||
|
className={style.nextContainer}
|
||||||
|
key='next'
|
||||||
|
variants={titleVariants}
|
||||||
|
initial='hidden'
|
||||||
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleSide
|
||||||
|
label='Next'
|
||||||
|
type='next'
|
||||||
|
title={title.titleNext}
|
||||||
|
subtitle={title.subtitleNext}
|
||||||
|
presenter={title.presenterNext}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
<div className={style.todayContainer}>
|
<div className={style.todayContainer}>
|
||||||
<div className={style.label}>Today</div>
|
<div className={style.label}>Today</div>
|
||||||
|
|||||||
@@ -112,47 +112,6 @@
|
|||||||
border-radius: 0 2vw 2vw 0;
|
border-radius: 0 2vw 2vw 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nowTitle,
|
|
||||||
.nextTitle {
|
|
||||||
color: #ddd;
|
|
||||||
font-weight: 400;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowSubtitle,
|
|
||||||
.nowPresenter,
|
|
||||||
.nextSubtitle,
|
|
||||||
.nextPresenter {
|
|
||||||
color: #aaa;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowTitle {
|
|
||||||
font-size: 2.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowSubtitle,
|
|
||||||
.nowPresenter {
|
|
||||||
font-size: 2vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nextTitle {
|
|
||||||
font-size: 2vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nextSubtitle,
|
|
||||||
.nextPresenter {
|
|
||||||
color: #aaa;
|
|
||||||
font-size: 1.5vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.nowTitle:after,
|
|
||||||
.nowSubtitle:after,
|
|
||||||
.nowPresenter:after,
|
|
||||||
.nextTitle:after,
|
|
||||||
.nextSubtitle:after,
|
|
||||||
.nextPresenter:after {
|
|
||||||
content: '\200b';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =================== SCHEDULE ===================*/
|
/* =================== SCHEDULE ===================*/
|
||||||
|
|
||||||
.todayContainer {
|
.todayContainer {
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
import { AnimatePresence, motion } from 'framer-motion';
|
||||||
import Countdown from '../../../common/components/countdown/Countdown';
|
import Countdown from '../../../common/components/countdown/Countdown';
|
||||||
import MyProgressBar from '../../../common/components/myProgressBar/MyProgressBar';
|
import MyProgressBar from '../../../common/components/myProgressBar/MyProgressBar';
|
||||||
import NavLogo from '../../../common/components/nav/NavLogo';
|
import NavLogo from '../../../common/components/nav/NavLogo';
|
||||||
|
import TitleCard from '../../../common/components/views/TitleCard';
|
||||||
import style from './PresenterView.module.css';
|
import style from './PresenterView.module.css';
|
||||||
|
|
||||||
export default function PresenterView(props) {
|
export default function PresenterView(props) {
|
||||||
@@ -9,6 +11,22 @@ export default function PresenterView(props) {
|
|||||||
const showOverlay = pres.text !== '' && pres.visible;
|
const showOverlay = pres.text !== '' && pres.visible;
|
||||||
const isPlaying = time.playstate === 'start';
|
const isPlaying = time.playstate === 'start';
|
||||||
|
|
||||||
|
// motion
|
||||||
|
const titleVariants = {
|
||||||
|
hidden: {
|
||||||
|
y: 500,
|
||||||
|
},
|
||||||
|
visible: {
|
||||||
|
y: 0,
|
||||||
|
transition: {
|
||||||
|
duration: 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
exit: {
|
||||||
|
y: 500,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
className={
|
className={
|
||||||
@@ -54,23 +72,45 @@ export default function PresenterView(props) {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
|
|
||||||
{title.showNow && (
|
<AnimatePresence>
|
||||||
<div className={style.nowContainer}>
|
{title.showNow && (
|
||||||
<div className={style.label}>Now</div>
|
<motion.div
|
||||||
<div className={style.title}>{title.titleNow}</div>
|
className={style.nowContainer}
|
||||||
<div className={style.subtitle}>{title.subtitleNow}</div>
|
key='now'
|
||||||
<div className={style.presenter}>{title.presenterNow}</div>
|
variants={titleVariants}
|
||||||
</div>
|
initial='hidden'
|
||||||
)}
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleCard
|
||||||
|
label='Now'
|
||||||
|
title={title.titleNow}
|
||||||
|
subtitle={title.subtitleNow}
|
||||||
|
presenter={title.presenterNow}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
|
||||||
{title.showNext && (
|
<AnimatePresence>
|
||||||
<div className={style.nextContainer}>
|
{title.showNext && (
|
||||||
<div className={style.label}>Next</div>
|
<motion.div
|
||||||
<div className={style.title}>{title.titleNext}</div>
|
className={style.nextContainer}
|
||||||
<div className={style.subtitle}>{title.subtitleNext}</div>
|
key='next'
|
||||||
<div className={style.presenter}>{title.presenterNext}</div>
|
variants={titleVariants}
|
||||||
</div>
|
initial='hidden'
|
||||||
)}
|
animate='visible'
|
||||||
|
exit='exit'
|
||||||
|
>
|
||||||
|
<TitleCard
|
||||||
|
label='Next'
|
||||||
|
title={title.titleNext}
|
||||||
|
subtitle={title.subtitleNext}
|
||||||
|
presenter={title.presenterNext}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -57,32 +57,6 @@
|
|||||||
grid-area: next;
|
grid-area: next;
|
||||||
}
|
}
|
||||||
|
|
||||||
.title,
|
|
||||||
.subtitle,
|
|
||||||
.presenter {
|
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
|
||||||
text-overflow: ellipsis;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title {
|
|
||||||
color: #ddd;
|
|
||||||
font-size: 2.5vw;
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
.subtitle,
|
|
||||||
.presenter {
|
|
||||||
color: #aaa;
|
|
||||||
font-size: 2vw;
|
|
||||||
}
|
|
||||||
|
|
||||||
.title:after,
|
|
||||||
.presenter:after,
|
|
||||||
.subtitle:after {
|
|
||||||
content: '\200b';
|
|
||||||
}
|
|
||||||
|
|
||||||
/* =================== MAIN ===================*/
|
/* =================== MAIN ===================*/
|
||||||
|
|
||||||
.timerContainer,
|
.timerContainer,
|
||||||
@@ -111,11 +85,13 @@
|
|||||||
width: 80%;
|
width: 80%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
transition: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.countdownPaused,
|
.countdownPaused,
|
||||||
.progressContainerPaused {
|
.progressContainerPaused {
|
||||||
opacity: 0.6;
|
opacity: 0.6;
|
||||||
|
transition: 0.5s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.container__grayFinished {
|
.container__grayFinished {
|
||||||
|
|||||||
Reference in New Issue
Block a user