-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from nebulabroadcast/rundown_view
Experimental: Scheduling in the web interface
- Loading branch information
Showing
43 changed files
with
1,566 additions
and
89 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled from 'styled-components' | ||
|
||
const StyledIcon = styled.span` | ||
user-select: none !important; | ||
user-drag: none !important; | ||
` | ||
|
||
const Icon = ({ icon, style }) => { | ||
return ( | ||
<StyledIcon className="icon material-symbols-outlined" style={style}> | ||
{icon} | ||
</StyledIcon> | ||
) | ||
} | ||
|
||
export default Icon |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { useMemo } from 'react' | ||
import styled from 'styled-components' | ||
import defaultTheme from './theme' | ||
import BaseInput from './BaseInput' | ||
|
||
const BaseColorInput = styled(BaseInput)` | ||
width: 30px; | ||
` | ||
|
||
const COLOR_PRESETS = [ | ||
'#dc8a78', | ||
'#dd7878', | ||
'#ea76cb', | ||
'#8839ef', | ||
'#d20f39', | ||
'#e64553', | ||
'#fe640b', | ||
'#df8e1d', | ||
'#40a02b', | ||
'#179299', | ||
'#04a5e5', | ||
'#209fb5', | ||
'#1e66f5', | ||
'#7287fd', | ||
'#4c4f69', | ||
] | ||
|
||
const InputColor = ({ value, onChange, tooltip, ...props }) => { | ||
/* | ||
Nebula stores color as integer so we need to convert it to hex | ||
*/ | ||
|
||
const hexValue = useMemo(() => { | ||
if (!value) return '#7287fd' | ||
return `#${value.toString(16).padStart(6, '0')}` | ||
}, [value]) | ||
|
||
const setColor = (hex) => { | ||
if (!hex) return null | ||
onChange(parseInt(hex.slice(1), 16)) | ||
} | ||
|
||
return ( | ||
<> | ||
<BaseColorInput | ||
type="color" | ||
value={hexValue} | ||
title={tooltip} | ||
list="presetColors" | ||
onChange={(e) => setColor(e.target.value)} | ||
{...props} | ||
/> | ||
<datalist id="presetColors"> | ||
{COLOR_PRESETS.map((color) => ( | ||
<option key={color} value={color} /> | ||
))} | ||
</datalist> | ||
</> | ||
) | ||
} | ||
|
||
export default InputColor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import { forwardRef } from 'react' | ||
import styled from 'styled-components' | ||
import defaultTheme from './theme' | ||
|
||
const StyledRange = styled.input` | ||
border: 0; | ||
border-radius: ${(props) => props.theme.inputBorderRadius}; | ||
background: ${(props) => props.theme.inputBackground}; | ||
-webkit-appearance: none; | ||
appearance: none; | ||
background: transparent; | ||
cursor: pointer; | ||
width: 150px; | ||
outline: none; | ||
&::-webkit-slider-thumb { | ||
-webkit-appearance: none; | ||
appearance: none; | ||
width: 14px; | ||
height: 14px; | ||
border-radius: 50%; | ||
background: ${(props) => props.theme.colors.surface08}; | ||
} | ||
&::-webkit-slider-runnable-track { | ||
width: 100%; | ||
cursor: pointer; | ||
background: ${(props) => props.theme.colors.surface04}; | ||
border-radius: 8px; | ||
} | ||
` | ||
|
||
StyledRange.defaultProps = { | ||
theme: defaultTheme, | ||
type: 'range', | ||
} | ||
|
||
const RangeSlider = forwardRef((props, ref) => { | ||
return <StyledRange ref={ref} type="range" {...props} /> | ||
}) | ||
|
||
export default RangeSlider |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.