mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 20:16:55 +01:00
fix constants.js, colorize channel names
This commit is contained in:
@@ -54,6 +54,11 @@ export const RADIO_CHANNELS = [
|
||||
freq: 1213,
|
||||
color: '#a52a2a',
|
||||
},
|
||||
{
|
||||
name: 'SyndicateTeam',
|
||||
freq: 1244,
|
||||
color: '#a52a2a',
|
||||
},
|
||||
{
|
||||
name: 'Red Team',
|
||||
freq: 1215,
|
||||
@@ -65,8 +70,8 @@ export const RADIO_CHANNELS = [
|
||||
color: '#3434fd',
|
||||
},
|
||||
{
|
||||
name: 'CentCom',
|
||||
freq: 1337,
|
||||
name: 'ERT',
|
||||
freq: 1345,
|
||||
color: '#2681a5',
|
||||
},
|
||||
{
|
||||
@@ -106,7 +111,7 @@ export const RADIO_CHANNELS = [
|
||||
},
|
||||
{
|
||||
name: 'AI Private',
|
||||
freq: 1447,
|
||||
freq: 1343,
|
||||
color: '#d65d95',
|
||||
},
|
||||
{
|
||||
|
||||
@@ -22,6 +22,13 @@ export const Radio = (props, context) => {
|
||||
} = data;
|
||||
const tunedChannel = RADIO_CHANNELS
|
||||
.find(channel => channel.freq === frequency);
|
||||
let colorMap = [];
|
||||
let rc = [];
|
||||
let i = 0;
|
||||
for (i=0; i < RADIO_CHANNELS.length; i++) {
|
||||
rc = RADIO_CHANNELS[i];
|
||||
colorMap[rc["name"]] = rc["color"];
|
||||
}
|
||||
const channels = map((value, key) => ({
|
||||
name: key,
|
||||
status: !!value,
|
||||
@@ -111,10 +118,13 @@ export const Radio = (props, context) => {
|
||||
<Button
|
||||
icon={channel.status ? 'check-square-o' : 'square-o'}
|
||||
selected={channel.status}
|
||||
content={channel.name}
|
||||
content=""
|
||||
onClick={() => act('channel', {
|
||||
channel: channel.name,
|
||||
})} />
|
||||
<Box inline color={colorMap[channel.name]}>
|
||||
{channel.name}
|
||||
</Box>
|
||||
</Box>
|
||||
))}
|
||||
</LabeledList.Item>
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user