Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit 703dd15

Browse files
committed
Start of channel work
1 parent b8de47e commit 703dd15

File tree

21 files changed

+838
-357
lines changed

21 files changed

+838
-357
lines changed

app/api/routes/channels/index.js

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
const channels = require('express').Router();
2+
3+
const iconPrefix = '/static/channel-icons';
4+
const configPatePathPrefix = '/captioner/settings/channels';
5+
6+
const channelsList = [
7+
{
8+
id: 'dropbox',
9+
name: 'Dropbox',
10+
iconPath: `${iconPrefix}/dropbox.png`,
11+
limit: 1,
12+
configPagePath: `${configPatePathPrefix}/dropbox`,
13+
},
14+
{
15+
id: 'vmix',
16+
name: 'vMix',
17+
iconPath: `${iconPrefix}/vmix.png`,
18+
limit: 1,
19+
configPagePath: `${configPatePathPrefix}/vmix`,
20+
},
21+
{
22+
id: 'link',
23+
name: 'Link or Embed',
24+
iconName: 'link',
25+
limit: 1,
26+
configPagePath: `${configPatePathPrefix}/link`,
27+
},
28+
{
29+
id: 'webhook',
30+
name: 'Webhook',
31+
iconName: 'plug',
32+
limit: 1,
33+
configPagePath: `${configPatePathPrefix}/webhooks`,
34+
},
35+
{
36+
id: 'obs',
37+
name: 'OBS Studio',
38+
iconPath: `${iconPrefix}/obs.svg`,
39+
showNameWithIcon: true,
40+
limit: 1,
41+
configPagePath: `${configPatePathPrefix}/obs`,
42+
},
43+
{
44+
id: 'zoom',
45+
name: 'Zoom',
46+
iconPath: `${iconPrefix}/zoom.png`,
47+
limit: 1,
48+
configPagePath: `${configPatePathPrefix}/zoom`,
49+
},
50+
{
51+
id: 'youtube',
52+
name: 'YouTube',
53+
iconPath: `${iconPrefix}/youtube.png`,
54+
limit: 1,
55+
configPagePath: `${configPatePathPrefix}/youtube`,
56+
},
57+
];
58+
59+
channels.get('/', async (req, res, next) => {
60+
// Sort alphabetically by name
61+
res.send(channelsList.sort((a, b) => a.name.localeCompare(b.name)));
62+
});
63+
64+
channels.get('/:id', async (req, res, next) => {
65+
const { id } = req.params;
66+
67+
if (!id) {
68+
return res.sendStatus(404);
69+
}
70+
71+
const foundChannel = channelsList.find((channel) => channel.id === id);
72+
73+
if (foundChannel) {
74+
res.send(foundChannel);
75+
} else {
76+
return res.sendStatus(404);
77+
}
78+
});
79+
80+
module.exports = channels;

app/api/routes/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
const routes = require('express').Router();
22

33
routes.use('/rooms', require('./rooms'));
4+
routes.use('/channels', require('./channels'));
45
routes.use('/charges', require('./charges'));
56
routes.use('/storage', require('./storage'));
67
routes.use('/fonts', require('./fonts'));

app/assets/scss/app.scss

Lines changed: 38 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -5,27 +5,26 @@
55
src: url('~static/redacted-regular.ttf');
66
}
77

8-
$font-family-sans-serif: 'Source Sans Pro',
9-
sans-serif;
10-
$headings-font-family: 'Cousine',
11-
monopsace;
8+
$font-family-sans-serif: 'Inter', sans-serif;
9+
$headings-font-family: $font-family-sans-serif;
1210
$headings-font-weight: 700;
1311

1412
$h3-font-size: 1.25rem;
1513
$h4-font-size: 1.25rem;
1614
$h5-font-size: 1rem;
1715
$h6-font-size: 0.75rem;
1816

19-
$theme-colors: (primary: #ffe200,
20-
secondary: #274de6,
21-
success: #39ad53,
22-
info: #000,
23-
warning: #ffc107,
24-
// $yellow
25-
danger: #e83f6f,
26-
light: #f4f4f4,
27-
lighter: #fafafa,
28-
dark: #292b2c,
17+
$theme-colors: (
18+
primary: #ffe200,
19+
secondary: #274de6,
20+
success: #39ad53,
21+
info: #000,
22+
warning: #ffc107,
23+
// $yellow
24+
danger: #e83f6f,
25+
light: #f4f4f4,
26+
lighter: #fafafa,
27+
dark: #292b2c,
2928
) !default;
3029

3130
$link-color: theme-color('secondary');
@@ -61,14 +60,16 @@ $navbar-light-color: #000;
6160
$navbar-light-hover-color: inherit;
6261

6362
$nav-tabs-border-color: $modal-header-border-color;
64-
$nav-tabs-link-active-border-color: $modal-header-border-color $modal-header-border-color rgba(0, 0, 0, 0);
65-
$nav-tabs-link-hover-border-color: lighten($modal-header-border-color, 5%) lighten($modal-header-border-color, 5%) rgba(0, 0, 0, 0);
63+
$nav-tabs-link-active-border-color: $modal-header-border-color
64+
$modal-header-border-color rgba(0, 0, 0, 0);
65+
$nav-tabs-link-hover-border-color: lighten($modal-header-border-color, 5%)
66+
lighten($modal-header-border-color, 5%) rgba(0, 0, 0, 0);
6667
$nav-tabs-link-active-color: #000;
6768
$nav-tabs-link-active-bg: theme-color('primary');
6869
$nav-tabs-active-link-hover-bg: theme-color('primary');
6970

70-
$nav-pills-link-active-color: #fff;
71-
$nav-pills-link-active-bg: theme-color('info');
71+
$nav-pills-link-active-bg: darken(theme-color('primary'), 5%);
72+
$nav-pills-link-active-color: #000;
7273

7374
$list-group-bg: #fff;
7475
$list-group-hover-bg: darken($list-group-bg, 5%);
@@ -80,9 +81,10 @@ $list-group-action-active-bg: darken(theme-color('secondary'), 10%);
8081
$thumbnail-bg: theme-color('primary');
8182
$thumbnail-border-color: $modal-header-border-color;
8283

83-
$container-max-widths: (sm: 540px,
84-
md: 860px,
85-
lg: 910px,
84+
$container-max-widths: (
85+
sm: 540px,
86+
md: 860px,
87+
lg: 910px,
8688
);
8789

8890
$pagination-active-bg: theme-color('secondary');
@@ -143,29 +145,18 @@ $modal-content-box-shadow-xs: $modal-content-box-shadow-sm-up;
143145

144146
@import 'bootstrap-vue/src/index.scss';
145147

146-
.logo-text {
147-
font-family: $headings-font-family;
148-
text-transform: uppercase;
149-
font-weight: bold;
150-
font-size: 1.5rem;
151-
}
152-
153148
h1,
154149
h2,
155150
.h1,
156151
.h2 {
157-
text-transform: uppercase;
152+
font-weight: 900;
158153
}
159154

160-
h3,
161-
h4,
162-
h5,
163-
h6,
164-
.h3,
165-
.h4,
166-
.h5,
167-
.h6 {
168-
font-family: $font-family-sans-serif;
155+
.logo-text {
156+
font-family: $headings-font-family;
157+
text-transform: uppercase;
158+
font-weight: bold;
159+
font-size: 1.5rem;
169160
}
170161

171162
input[type='color'] {
@@ -177,22 +168,13 @@ input[type='color'] {
177168
font-weight: bold;
178169
}
179170

180-
.btn {
181-
font-family: $headings-font-family;
182-
font-weight: 700;
183-
text-transform: uppercase;
184-
cursor: pointer;
185-
padding: 0.575rem 1rem 0.425rem 1rem;
186-
white-space: nowrap;
187-
}
188-
189171
.btn .normal-text {
190172
font-family: $font-family-sans-serif;
191173
font-weight: normal;
192174
text-transform: none;
193175
}
194176

195-
.btn-group.captioning-split-button>* {
177+
.btn-group.captioning-split-button > * {
196178
border-left: 1px solid rgba(0, 0, 0, 0.2);
197179
}
198180

@@ -229,17 +211,6 @@ input[type='color'] {
229211
z-index: 15;
230212
}
231213

232-
.nav-pills {
233-
font-family: $headings-font-family;
234-
text-transform: uppercase;
235-
font-weight: bold;
236-
}
237-
238-
.nav-link {
239-
/* Adjust for Cousine baseline issue */
240-
padding: 0.65rem 1rem 0.5rem 1rem;
241-
}
242-
243214
.btn-info:focus,
244215
.btn-info.focus {
245216
box-shadow: 0 0 0 3px theme-color('secondary');
@@ -312,10 +283,6 @@ a.nav-link.active {
312283
font-weight: bold;
313284
}
314285

315-
.rgb-label {
316-
font-family: 'Cousine';
317-
}
318-
319286
.screen-preview .screen {
320287
max-width: 100%;
321288
}
@@ -470,7 +437,7 @@ html.static-site body {
470437
display: inline-block;
471438
}
472439

473-
.lds-message>div {
440+
.lds-message > div {
474441
position: absolute;
475442
width: 24px;
476443
height: 24px;
@@ -480,35 +447,35 @@ html.static-site body {
480447
animation: lds-message 1s cubic-bezier(0.3, 0, 0.7, 1) infinite;
481448
}
482449

483-
.lds-message>div:nth-of-type(4n + 1) {
450+
.lds-message > div:nth-of-type(4n + 1) {
484451
background: #ffffff;
485452
}
486453

487-
.lds-message>div:nth-of-type(4n + 2) {
454+
.lds-message > div:nth-of-type(4n + 2) {
488455
background: #ffffff;
489456
}
490457

491-
.lds-message>div:nth-of-type(4n + 3) {
458+
.lds-message > div:nth-of-type(4n + 3) {
492459
background: #ffffff;
493460
}
494461

495-
.lds-message>div:nth-of-type(4n) {
462+
.lds-message > div:nth-of-type(4n) {
496463
background: #ffffff;
497464
}
498465

499-
.lds-message>div:nth-of-type(4n + 1) {
466+
.lds-message > div:nth-of-type(4n + 1) {
500467
left: 38px;
501468
-webkit-animation-delay: -0.666666666666667s;
502469
animation-delay: -0.666666666666667s;
503470
}
504471

505-
.lds-message>div:nth-of-type(4n + 2) {
472+
.lds-message > div:nth-of-type(4n + 2) {
506473
left: 88px;
507474
-webkit-animation-delay: -0.333333333333333s;
508475
animation-delay: -0.333333333333333s;
509476
}
510477

511-
.lds-message>div:nth-of-type(4n + 3) {
478+
.lds-message > div:nth-of-type(4n + 3) {
512479
left: 138px;
513480
-webkit-animation-delay: 0s;
514481
animation-delay: 0s;

0 commit comments

Comments
 (0)