mirror of
https://github.com/streamwall/streamwall.git
synced 2026-04-14 17:52:04 -04:00
Update role names in control page checks
This commit is contained in:
@@ -722,28 +722,31 @@ function App({ wsEndpoint, role }) {
|
|||||||
) : (
|
) : (
|
||||||
<div>loading...</div>
|
<div>loading...</div>
|
||||||
)}
|
)}
|
||||||
{roleCan(role, 'set-custom-streams') && (
|
{roleCan(role, 'update-custom-stream') &&
|
||||||
<>
|
roleCan(role, 'delete-custom-stream') && (
|
||||||
<h2>Custom Streams</h2>
|
<>
|
||||||
<div>
|
<h2>Custom Streams</h2>
|
||||||
{/*
|
<div>
|
||||||
|
{/*
|
||||||
Include an empty object at the end to create an extra input for a new custom stream.
|
Include an empty object at the end to create an extra input for a new custom stream.
|
||||||
We need it to be part of the array (rather than JSX below) for DOM diffing to match the key and retain focus.
|
We need it to be part of the array (rather than JSX below) for DOM diffing to match the key and retain focus.
|
||||||
*/}
|
*/}
|
||||||
{customStreams.map(({ link, label, kind }, idx) => (
|
{customStreams.map(({ link, label, kind }, idx) => (
|
||||||
<CustomStreamInput
|
<CustomStreamInput
|
||||||
key={idx}
|
key={idx}
|
||||||
link={link}
|
link={link}
|
||||||
label={label}
|
label={label}
|
||||||
kind={kind}
|
kind={kind}
|
||||||
onChange={handleChangeCustomStream}
|
onChange={handleChangeCustomStream}
|
||||||
onDelete={handleDeleteCustomStream}
|
onDelete={handleDeleteCustomStream}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
<CreateCustomStreamInput
|
||||||
|
onCreate={handleChangeCustomStream}
|
||||||
/>
|
/>
|
||||||
))}
|
</div>
|
||||||
<CreateCustomStreamInput onCreate={handleChangeCustomStream} />
|
</>
|
||||||
</div>
|
)}
|
||||||
</>
|
|
||||||
)}
|
|
||||||
{roleCan(role, 'edit-tokens') && authState && (
|
{roleCan(role, 'edit-tokens') && authState && (
|
||||||
<>
|
<>
|
||||||
<h2>Access</h2>
|
<h2>Access</h2>
|
||||||
@@ -1076,7 +1079,7 @@ function GridControls({
|
|||||||
<SwapIcon />
|
<SwapIcon />
|
||||||
</StyledSmallButton>
|
</StyledSmallButton>
|
||||||
)}
|
)}
|
||||||
{roleCan(role, 'rotate-view') && (
|
{roleCan(role, 'rotate-stream') && (
|
||||||
<StyledSmallButton onClick={handleRotateClick} tabIndex={1}>
|
<StyledSmallButton onClick={handleRotateClick} tabIndex={1}>
|
||||||
<RotateIcon />
|
<RotateIcon />
|
||||||
</StyledSmallButton>
|
</StyledSmallButton>
|
||||||
|
|||||||
Reference in New Issue
Block a user