Skip to content

Commit

Permalink
Add indicators for the on play mode in the rundown
Browse files Browse the repository at this point in the history
Signed-off-by: Axel Boberg <[email protected]>
  • Loading branch information
axelboberg committed Apr 23, 2024
1 parent 510274c commit d044dc2
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 5 deletions.
10 changes: 10 additions & 0 deletions plugins/rundown/app/assets/icons/arrow-down-play.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions plugins/rundown/app/assets/icons/arrow-down-secondary.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions plugins/rundown/app/assets/icons/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@
//
// SPDX-License-Identifier: MIT

import arrowDownSecondary from './arrow-down-secondary.svg'
import arrowDownPlay from './arrow-down-play.svg'
import arrowDown from './arrow-down.svg'
import warning from './warning.svg'
import empty from './empty.svg'

export default {
arrowDownSecondary,
arrowDownPlay,
arrowDown,
warning,
empty
Expand Down
13 changes: 13 additions & 0 deletions plugins/rundown/app/components/RundownItem/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ import { RundownItemProgress } from '../RundownItemProgress'
import * as Layout from '../Layout'
import { Icon } from '../Icon'

const ON_PLAY_ENUM = {
'SELECT_NEXT_ITEM': '2',
'PLAY_NEXT_ITEM': '1'
}

/**
* An index of type properties
* used for quick returns when
Expand Down Expand Up @@ -152,6 +157,14 @@ export function RundownItem ({ index, item }) {
}
</div>
<div className='RundownItem-section RundownItem-section--icons'>
{
item?.data?.onPlay === ON_PLAY_ENUM.SELECT_NEXT_ITEM &&
<span className='RundownItem-icon'><Icon name='arrowDownSecondary' /></span>
}
{
item?.data?.onPlay === ON_PLAY_ENUM.PLAY_NEXT_ITEM &&
<span className='RundownItem-icon'><Icon name='arrowDownPlay' /></span>
}
{
Object.keys(item?.issues ?? {}).length > 0 &&
<span className='RundownItem-icon'><Icon name='warning' /></span>
Expand Down
15 changes: 10 additions & 5 deletions plugins/rundown/app/components/RundownItem/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -18,14 +18,23 @@
}

.RundownItem-section--icons {
height: 1em;
height: 1.2em;
width: 100px;

justify-content: flex-end;

overflow: hidden;
}

.RundownItem-icon {
display: inline-block;
width: 1.2em;
}

.RundownItem-icon:not(:last-child) {
margin-right: 5px;
}

.RundownItem-section--right {
justify-content: flex-end;
}
Expand Down Expand Up @@ -85,7 +94,3 @@
opacity: 0.3;
z-index: -1;
}

.RundownItem-icon {
width: 1em;
}

0 comments on commit d044dc2

Please sign in to comment.