From cda68a89fb2040e91bc0ce33010de99bea37f34e Mon Sep 17 00:00:00 2001 From: Jan Stabenow Date: Tue, 8 Nov 2022 21:25:24 +0100 Subject: [PATCH] Mod format --- src/misc/Changelog.js | 40 ++++-- src/misc/Player/video-js-skin-public.css | 128 +++++++++--------- src/misc/filters/video/Scale.js | 16 ++- src/views/Edit/Sources/Network.js | 4 +- src/views/Publication/Services/DLive.js | 4 +- src/views/Publication/Services/Instagram.js | 19 ++- .../Publication/Services/MediaNetwork.js | 4 +- src/views/Publication/Services/PeerTube.js | 15 +- src/views/Publication/Services/Trovo.js | 4 +- 9 files changed, 135 insertions(+), 99 deletions(-) diff --git a/src/misc/Changelog.js b/src/misc/Changelog.js index b3b3b8d..4db7914 100644 --- a/src/misc/Changelog.js +++ b/src/misc/Changelog.js @@ -65,8 +65,8 @@ export default function Changelog(props) { let copy = true; for (let i = 0; i < lines.length; i++) { - if (lines[i].startsWith('### ')) { - let version = lines[i].replace('### ', ''); + if (lines[i].startsWith('## ')) { + let version = lines[i].replace('## ', ''); if (SemverValid(version) === null) { if (copy === true) { @@ -104,12 +104,32 @@ export default function Changelog(props) { } const renderers = { - h1: (props) =>

{props.children}

, - h2: (props) =>

{props.children}

, - h3: (props) =>

{props.children}

, - h4: (props) =>

{props.children}

, - a: (props) => {props.children}, - } + h1: (props) => ( +

+ {props.children} +

+ ), + h2: (props) => ( +

+ {props.children} +

+ ), + h3: (props) => ( +

+ {props.children} +

+ ), + h4: (props) => ( +

+ {props.children} +

+ ), + a: (props) => ( + + {props.children} + + ), + }; return ( - {$data} + {$data} diff --git a/src/misc/Player/video-js-skin-public.css b/src/misc/Player/video-js-skin-public.css index c6483c1..3ce0bdd 100644 --- a/src/misc/Player/video-js-skin-public.css +++ b/src/misc/Player/video-js-skin-public.css @@ -1,111 +1,111 @@ .vjs-public { - --video-js--primary: #EAEA05; + --video-js--primary: #eaea05; } /* play btn */ .vjs-public .vjs-big-play-button { - width: 70px; - height: 70px; - background: none; - line-height: 180px; - font-size: 180px; - border: none; - top: 50%; - left: 50%; - margin-top: -90px; - margin-left: -90px; - color: rgba(255,255,255,.65); - } + width: 70px; + height: 70px; + background: none; + line-height: 180px; + font-size: 180px; + border: none; + top: 50%; + left: 50%; + margin-top: -90px; + margin-left: -90px; + color: rgba(255, 255, 255, 0.65); +} - .vjs-public:hover .vjs-big-play-button, - .vjs-public.vjs-big-play-button:focus { - background-color: transparent; - color: rgba(255,255,255,1); - } +.vjs-public:hover .vjs-big-play-button, +.vjs-public.vjs-big-play-button:focus { + background-color: transparent; + color: rgba(255, 255, 255, 1); +} /* controlbar */ .vjs-public .vjs-control-bar { - height: 70px; - padding-top: 20px; - background: none; - background-image: linear-gradient(0deg, rgba(0,0,0,.85), transparent) + height: 70px; + padding-top: 20px; + background: none; + background-image: linear-gradient(0deg, rgba(0, 0, 0, 0.85), transparent); } .vjs-public .vjs-time-tooltip { z-index: 0; } -.vjs-public .vjs-button>.vjs-icon-placeholder:before { - line-height: 50px +.vjs-public .vjs-button > .vjs-icon-placeholder:before { + line-height: 50px; } /* progressbar */ .vjs-public .vjs-play-progress:before { - display: none + display: none; } .vjs-public .vjs-progress-control { - position: absolute; - top: 0; - right: 0; - left: 15px; - width: calc(100% - 30px); - height: 20px + position: absolute; + top: 0; + right: 0; + left: 15px; + width: calc(100% - 30px); + height: 20px; } .vjs-public .vjs-progress-control .vjs-progress-holder { - position: absolute; - top: 20px; - right: 0; - left: 0; - width: 100%; - margin: 0 + position: absolute; + top: 20px; + right: 0; + left: 0; + width: 100%; + margin: 0; } .vjs-public .vjs-play-progress { - background-color: var(--video-js--primary); + background-color: var(--video-js--primary); } .vjs-public .vjs-slider { - background: rgba(255,255,255,.25); + background: rgba(255, 255, 255, 0.25); } .vjs-public .vjs-load-progress { - background: rgba(255,255,255,.25); + background: rgba(255, 255, 255, 0.25); } .vjs-public .vjs-load-progress div { - background: rgba(255,255,255,.25); + background: rgba(255, 255, 255, 0.25); } .vjs-public .vjs-remaining-time { - order: 0; - line-height: 50px; - flex: 3; - text-align: left; + order: 0; + line-height: 50px; + flex: 3; + text-align: left; } .vjs-public .vjs-live-control { - line-height: 50px; + line-height: 50px; } /* volume-panel */ .vjs-public .vjs-volume-panel .vjs-volume-control.vjs-volume-horizontal { - padding-top: 1em; + padding-top: 1em; } .vjs-public .vjs-control .vjs-volume-panel { - width: 4.5em; + width: 4.5em; } /* live display */ .vjs-public .vjs-live-display { - margin-left: 1.8em; + margin-left: 1.8em; } /* disable caps */ @@ -123,43 +123,43 @@ /* overlay */ -.vjs-public .vjs-overlay-no-background > img, .vjs-public .vjs-overlay-no-background > a > img { - max-width: 100%!important; +.vjs-public .vjs-overlay-no-background > img, +.vjs-public .vjs-overlay-no-background > a > img { + max-width: 100% !important; max-height: calc(18vw); } .vjs-public .vjs-overlay-top-left { - top: 20px!important; - left: 30px!important; + top: 20px !important; + left: 30px !important; } .vjs-public .vjs-overlay-top-right { - top: 20px!important; - right: 30px!important; + top: 20px !important; + right: 30px !important; } .vjs-public .vjs-overlay-bottom-left { - bottom: 20px!important; - left: 30px!important; + bottom: 20px !important; + left: 30px !important; } .vjs-public .vjs-overlay-bottom-right { - bottom: 20px!important; - right: 30px!important; + bottom: 20px !important; + right: 30px !important; } /* context menu */ .vjs-public .vjs-license .vjs-menu .vjs-menu-content { - background: rgba(0,0,0,.8); + background: rgba(0, 0, 0, 0.8); } .vjs-public .vjs-license-top-level-header { - background: unset!important; - border-bottom: 1px solid rgba(255,255,255,.25); + background: unset !important; + border-bottom: 1px solid rgba(255, 255, 255, 0.25); } .vjs-public .vjs-lock-open { - z-index: 1000; + z-index: 1000; } - diff --git a/src/misc/filters/video/Scale.js b/src/misc/filters/video/Scale.js index 482ef9d..b3906bb 100644 --- a/src/misc/filters/video/Scale.js +++ b/src/misc/filters/video/Scale.js @@ -41,10 +41,18 @@ function createGraph(settings) { function Mode(props) { return ( ); } diff --git a/src/views/Edit/Sources/Network.js b/src/views/Edit/Sources/Network.js index acf2164..c4fcb84 100644 --- a/src/views/Edit/Sources/Network.js +++ b/src/views/Edit/Sources/Network.js @@ -347,7 +347,9 @@ const getSRTAddress = (host, name, token, passphrase, publish) => { '://' + host + '?mode=caller&transtype=live&streamid=' + - name + ',mode:' + (publish ? 'publish' : 'request') + + name + + ',mode:' + + (publish ? 'publish' : 'request') + (token.length !== 0 ? ',token:' + encodeURIComponent(token) : ''); if (passphrase.length !== 0) { diff --git a/src/views/Publication/Services/DLive.js b/src/views/Publication/Services/DLive.js index 57b5542..4ae0af0 100644 --- a/src/views/Publication/Services/DLive.js +++ b/src/views/Publication/Services/DLive.js @@ -12,9 +12,7 @@ const id = 'dlive'; const name = 'dlive'; const version = '1.0'; const stream_key_link = 'https://dlive.tv/s/dashboard'; -const description = ( - Live-Streaming to dlive Live RTMP Service. -); +const description = Live-Streaming to dlive Live RTMP Service.; const image_copyright = ''; const author = { creator: { diff --git a/src/views/Publication/Services/Instagram.js b/src/views/Publication/Services/Instagram.js index 2d2bba3..7112f79 100644 --- a/src/views/Publication/Services/Instagram.js +++ b/src/views/Publication/Services/Instagram.js @@ -20,7 +20,8 @@ const description = ( Live-Streaming to Instagram Live RTMP Service. The stream key requires a service such as{' '} Instafeed.me - {' '} or {' '} + {' '} + or{' '} Yellow Duck @@ -94,7 +95,7 @@ function Service(props) { Stream key} value={settings.key} onChange={handleChange('key')} /> - {(!settings.service_instafeed && !settings.service_yellowduck) && ( + {!settings.service_instafeed && !settings.service_yellowduck && ( GET @@ -116,8 +117,18 @@ function Service(props) { )} - Instafeed.me} checked={settings.service_instafeed} onChange={handleChange('service_instafeed')} disabled={settings.service_yellowduck} /> - Yellow Duck} checked={settings.service_yellowduck} onChange={handleChange('service_yellowduck')} disabled={settings.service_instafeed} /> + Instafeed.me} + checked={settings.service_instafeed} + onChange={handleChange('service_instafeed')} + disabled={settings.service_yellowduck} + /> + Yellow Duck} + checked={settings.service_yellowduck} + onChange={handleChange('service_yellowduck')} + disabled={settings.service_instafeed} + /> ); diff --git a/src/views/Publication/Services/MediaNetwork.js b/src/views/Publication/Services/MediaNetwork.js index 6868b98..9f34143 100644 --- a/src/views/Publication/Services/MediaNetwork.js +++ b/src/views/Publication/Services/MediaNetwork.js @@ -12,9 +12,7 @@ const id = 'medianetwork'; const name = 'Media Network'; const version = '1.0'; const stream_key_link = 'https://www.mediaserver.express/'; -const description = ( - Live-Streaming to Media Network RTMP Service. -); +const description = Live-Streaming to Media Network RTMP Service.; const image_copyright = ''; const author = { creator: { diff --git a/src/views/Publication/Services/PeerTube.js b/src/views/Publication/Services/PeerTube.js index 0189737..bbceeb5 100644 --- a/src/views/Publication/Services/PeerTube.js +++ b/src/views/Publication/Services/PeerTube.js @@ -13,11 +13,7 @@ const id = 'peertube'; const name = 'PeerTube'; const version = '1.0'; const stream_key_link = '/videos/upload#go-live'; -const description = ( - - Live-Streaming to PeerTube v3+ RTMP/S Service. - -); +const description = Live-Streaming to PeerTube v3+ RTMP/S Service.; const image_copyright = ''; const author = { creator: { @@ -83,7 +79,14 @@ function Service(props) { return ( - Instance domain} placeholder="joinpeertube.org" value={settings.domain} onChange={handleChange('domain')} /> + Instance domain} + placeholder="joinpeertube.org" + value={settings.domain} + onChange={handleChange('domain')} + /> Stream key} value={settings.key} onChange={handleChange('key')} /> diff --git a/src/views/Publication/Services/Trovo.js b/src/views/Publication/Services/Trovo.js index 190c907..64644a1 100644 --- a/src/views/Publication/Services/Trovo.js +++ b/src/views/Publication/Services/Trovo.js @@ -12,9 +12,7 @@ const id = 'trovo'; const name = 'Trovo'; const version = '1.0'; const stream_key_link = 'https://studio.trovo.live/mychannel/stream'; -const description = ( - Live-Streaming to Trovo Live RTMP Service. -); +const description = Live-Streaming to Trovo Live RTMP Service.; const image_copyright = ''; const author = { creator: {