diff --git a/apps/client/src/features/control/message/MessageControl.module.scss b/apps/client/src/features/control/message/MessageControl.module.scss index 36e984b17..3faf87717 100644 --- a/apps/client/src/features/control/message/MessageControl.module.scss +++ b/apps/client/src/features/control/message/MessageControl.module.scss @@ -21,22 +21,6 @@ position: relative; } -.corner { - @include rotate-fourty-five; - - position: absolute; - top: 0.5rem; - right: 0.5rem; - cursor: pointer; - color: $ui-white; - transition-property: color; - transition-duration: $transition-time-action; - - &:hover { - color: $ontime-color; - } -} - .options { display: flex; flex-direction: column; diff --git a/apps/client/src/features/control/message/MessageControlExport.jsx b/apps/client/src/features/control/message/MessageControlExport.jsx index 54cd1789b..0dd7b036a 100644 --- a/apps/client/src/features/control/message/MessageControlExport.jsx +++ b/apps/client/src/features/control/message/MessageControlExport.jsx @@ -1,20 +1,21 @@ import { memo } from 'react'; -import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp'; import ErrorBoundary from '../../../common/components/error-boundary/ErrorBoundary'; import { handleLinks } from '../../../common/utils/linkUtils'; import { cx } from '../../../common/utils/styleUtils'; +import { Corner } from '../../editors/editor-utils/EditorUtils'; import MessageControl from './MessageControl'; import style from '../../editors/Editor.module.scss'; const MessageControlExport = () => { + const isExtracted = window.location.pathname.includes('/messagecontrol'); const classes = cx([style.content, style.contentColumnLayout]); return (
- handleLinks(event, 'messagecontrol')} /> + {!isExtracted && handleLinks(event, 'messagecontrol')} />}
diff --git a/apps/client/src/features/control/message/TimerPreview.tsx b/apps/client/src/features/control/message/TimerPreview.tsx index f4cd9c4e9..e0224a8ab 100644 --- a/apps/client/src/features/control/message/TimerPreview.tsx +++ b/apps/client/src/features/control/message/TimerPreview.tsx @@ -10,6 +10,7 @@ import useViewSettings from '../../../common/hooks-query/useViewSettings'; import { handleLinks } from '../../../common/utils/linkUtils'; import { cx } from '../../../common/utils/styleUtils'; import { tooltipDelayMid } from '../../../ontimeConfig'; +import { Corner } from '../../editors/editor-utils/EditorUtils'; import style from './MessageControl.module.scss'; @@ -48,7 +49,7 @@ export default function TimerPreview() { return (
- handleLinks(event, 'timer')} /> + handleLinks(event, 'timer')} />
{ + const isExtracted = window.location.pathname.includes('/timercontrol'); return (
- handleLinks(event, 'timercontrol')} /> + {!isExtracted && handleLinks(event, 'timercontrol')} />}
diff --git a/apps/client/src/features/editors/Editor.module.scss b/apps/client/src/features/editors/Editor.module.scss index bba27a6d2..4b13971ab 100644 --- a/apps/client/src/features/editors/Editor.module.scss +++ b/apps/client/src/features/editors/Editor.module.scss @@ -4,10 +4,6 @@ $min-playback-width: 27rem; $max-playback-width: 30rem; $panel-gap: 0.5rem; -.corner { - @include editor.corner; -} - .mainContainer { background-color: $ui-black; width: 100%; @@ -31,11 +27,6 @@ $panel-gap: 0.5rem; gap: $panel-gap; overflow: hidden; - .corner { - /* we show this if the component hasnt been extracted */ - display: inline; - } - .rundown, .playback, .messages { diff --git a/apps/client/src/features/editors/EditorMixin.scss b/apps/client/src/features/editors/EditorMixin.scss index 8b47104aa..7fa1d9525 100644 --- a/apps/client/src/features/editors/EditorMixin.scss +++ b/apps/client/src/features/editors/EditorMixin.scss @@ -6,23 +6,6 @@ --editor--panel__br: 8px; } -@mixin corner() { - display: none; - transform: rotate(45deg); - - position: absolute; - top: 0.5rem; - right: 0.5rem; - cursor: pointer; - color: $ui-white; - transition-property: color; - transition-duration: $transition-time-action; - - &:hover { - color: $ontime-color; - } -} - @mixin panel() { display: flex; @@ -31,9 +14,4 @@ height: 100%; background-color: $bg-container-l2; padding: 1rem; - - .corner { - /* we show this if the component hasnt been extracted */ - display: inline; - } } diff --git a/apps/client/src/features/editors/editor-utils/EditorUtils.module.scss b/apps/client/src/features/editors/editor-utils/EditorUtils.module.scss new file mode 100644 index 000000000..2be3755de --- /dev/null +++ b/apps/client/src/features/editors/editor-utils/EditorUtils.module.scss @@ -0,0 +1,22 @@ +.corner { + transform: rotate(45deg); + + position: absolute; + top: 0.5rem; + right: 0.5rem; + cursor: pointer; + color: $ui-white; + transition-property: color; + transition-duration: $transition-time-action; + border-radius: 99px; + + // similar styles to ontime-button-subtle + background-color: $gray-1050; + outline: 2px solid $gray-1050; + + &:hover { + color: $ontime-color; + background-color: $gray-1000; + outline: 2px solid $gray-1000; + } +} diff --git a/apps/client/src/features/editors/editor-utils/EditorUtils.tsx b/apps/client/src/features/editors/editor-utils/EditorUtils.tsx new file mode 100644 index 000000000..9262fe650 --- /dev/null +++ b/apps/client/src/features/editors/editor-utils/EditorUtils.tsx @@ -0,0 +1,10 @@ +import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp'; +import { type IconBaseProps } from '@react-icons/all-files/lib'; + +import { cx } from '../../../common/utils/styleUtils'; + +import style from './EditorUtils.module.scss'; + +export function Corner({ className, ...elementProps }: IconBaseProps) { + return ; +} diff --git a/apps/client/src/features/rundown/RundownExport.module.scss b/apps/client/src/features/rundown/RundownExport.module.scss index c36053f10..939d04a58 100644 --- a/apps/client/src/features/rundown/RundownExport.module.scss +++ b/apps/client/src/features/rundown/RundownExport.module.scss @@ -22,12 +22,6 @@ height: 100%; } -.corner { - @include editor.corner; - display: inline; - z-index: 2; -} - .list { @include editor.panel; height: inherit; diff --git a/apps/client/src/features/rundown/RundownExport.tsx b/apps/client/src/features/rundown/RundownExport.tsx index d3e52b9c7..272d8d932 100644 --- a/apps/client/src/features/rundown/RundownExport.tsx +++ b/apps/client/src/features/rundown/RundownExport.tsx @@ -1,11 +1,11 @@ import { memo } from 'react'; -import { IoArrowUp } from '@react-icons/all-files/io5/IoArrowUp'; import { ContextMenu } from '../../common/components/context-menu/ContextMenu'; import ErrorBoundary from '../../common/components/error-boundary/ErrorBoundary'; import { useAppMode } from '../../common/stores/appModeStore'; import { handleLinks } from '../../common/utils/linkUtils'; import { cx } from '../../common/utils/styleUtils'; +import { Corner } from '../editors/editor-utils/EditorUtils'; import EventEditor from './event-editor/EventEditor'; import RundownWrapper from './RundownWrapper'; @@ -24,7 +24,7 @@ const RundownExport = () => {
- {!isExtracted && handleLinks(event, 'rundown')} />} + {!isExtracted && handleLinks(event, 'rundown')} />} diff --git a/apps/client/src/features/rundown/event-block/EventBlockInner.tsx b/apps/client/src/features/rundown/event-block/EventBlockInner.tsx index 4adab46de..5e353b063 100644 --- a/apps/client/src/features/rundown/event-block/EventBlockInner.tsx +++ b/apps/client/src/features/rundown/event-block/EventBlockInner.tsx @@ -158,7 +158,8 @@ function TimerIcon(props: { type: TimerType; className: string }) { return ; } if (type === TimerType.TimeToEnd) { - return ; + const classes = cx([style.active, className]); + return ; } return ; }