From 671763ba15e14571d8e79240306b02201eb08ea9 Mon Sep 17 00:00:00 2001 From: Pavlo Buidenkov Date: Tue, 23 Feb 2021 19:47:10 +0200 Subject: [PATCH] ready for v1.0.8 --- CHANGELOG.md | 10 +++ .../__snapshots__/index.spec.tsx.snap | 24 +------ .../components/PlayerControlPanel/index.css | 3 + .../components/PlayerControlPanel/index.tsx | 29 +++++--- .../__snapshots__/index.spec.tsx.snap | 24 +------ .../peerConnectionHandlePeer.ts | 68 ------------------- .../ChooseAppOrScreenOverlay.tsx | 1 + .../ChooseAppOrScreenOverlay.spec.tsx.snap | 2 + app/components/TopPanel.tsx | 7 +- .../__snapshots__/TopPanel.spec.tsx.snap | 1 + .../__snapshots__/HomePage.spec.tsx.snap | 1 + app/package-lock.json | 2 +- app/package.json | 2 +- package.json | 2 +- 14 files changed, 49 insertions(+), 127 deletions(-) create mode 100644 app/client/src/components/PlayerControlPanel/index.css diff --git a/CHANGELOG.md b/CHANGELOG.md index 05ea3246..aa44e7e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,13 @@ +# 1.0.8 (23 Feb 2021) + +Changes: + +- added locales for Traditional Chinese language, special thanks to @taotieren +- minor UI improvements + +
+
+ # 1.0.7 (21 Feb 2021) Changes: diff --git a/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap b/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap index 3c5f68e3..003f207f 100644 --- a/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap +++ b/app/client/src/components/PlayerControlPanel/__snapshots__/index.spec.tsx.snap @@ -121,6 +121,7 @@ exports[`should match exact snapshot 1`] = ` style={ Object { "transform": "translateY(2px) translateX(-5px)", + "width": "max-content", } } > @@ -137,27 +138,6 @@ exports[`should match exact snapshot 1`] = ` -
-
-
- FPS:  -
-

-

-
@@ -237,7 +217,7 @@ exports[`should match exact snapshot 1`] = ` className="col-xs" >
Pause
diff --git a/app/client/src/components/PlayerControlPanel/index.css b/app/client/src/components/PlayerControlPanel/index.css new file mode 100644 index 00000000..1316eb7d --- /dev/null +++ b/app/client/src/components/PlayerControlPanel/index.css @@ -0,0 +1,3 @@ +.play-pause-text { + width: max-content; +} diff --git a/app/client/src/components/PlayerControlPanel/index.tsx b/app/client/src/components/PlayerControlPanel/index.tsx index 8d24d1e3..d247c2f3 100644 --- a/app/client/src/components/PlayerControlPanel/index.tsx +++ b/app/client/src/components/PlayerControlPanel/index.tsx @@ -30,6 +30,8 @@ import handlePlayerToggleFullscreen from './handlePlayerToggleFullscreen'; import initScreenfullOnChange from './initScreenfullOnChange'; import ScreenSharingSource from '../../features/PeerConnection/ScreenSharingSourceEnum'; import { REACT_PLAYER_WRAPPER_ID } from '../../constants/appConstants'; +import './index.css' + const videoQualityButtonStyle: React.CSSProperties = { width: '100%', @@ -152,7 +154,10 @@ function PlayerControlPanel(props: PlayerControlPanelProps) {
{t('Donate')}
@@ -161,12 +166,6 @@ function PlayerControlPanel(props: PlayerControlPanelProps) { - - - FPS:  -

-
- - + { /* @ts-ignore */ } + {isPlaying ? t('Pause') : t('Play')} @@ -252,7 +252,9 @@ function PlayerControlPanel(props: PlayerControlPanelProps) { toaster?.show({ icon: 'clean', intent: Intent.PRIMARY, - message: `${t('Video quality has been changed to')} ${q}`, + message: `${t( + 'Video quality has been changed to' + )} ${q}`, }); }} > @@ -266,7 +268,10 @@ function PlayerControlPanel(props: PlayerControlPanelProps) { position={Position.BOTTOM} popoverClassName={Classes.POPOVER_CONTENT_SIZING} > - + @@ -321,7 +326,9 @@ function PlayerControlPanel(props: PlayerControlPanelProps) { icon: 'video', intent: Intent.PRIMARY, message: `${ - isDefaultPlayerTurnedOn ? t('Default video player has been turned OFF') : t('Default video player has been turned ON') + isDefaultPlayerTurnedOn + ? t('Default video player has been turned OFF') + : t('Default video player has been turned ON') }`, }); }} diff --git a/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap b/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap index 96dc9181..718b71d3 100644 --- a/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap +++ b/app/client/src/containers/PlayerView/__snapshots__/index.spec.tsx.snap @@ -133,6 +133,7 @@ exports[`should match exact snapshot 1`] = ` style={ Object { "transform": "translateY(2px) translateX(-5px)", + "width": "max-content", } } > @@ -149,27 +150,6 @@ exports[`should match exact snapshot 1`] = `
-
-
-
- FPS:  -
-

-

-
@@ -249,7 +229,7 @@ exports[`should match exact snapshot 1`] = ` className="col-xs" >
Play
diff --git a/app/client/src/features/PeerConnection/peerConnectionHandlePeer.ts b/app/client/src/features/PeerConnection/peerConnectionHandlePeer.ts index 0ea91c09..a1d2273d 100644 --- a/app/client/src/features/PeerConnection/peerConnectionHandlePeer.ts +++ b/app/client/src/features/PeerConnection/peerConnectionHandlePeer.ts @@ -14,63 +14,6 @@ export function getSharingShourceType(peerConnection: PeerConnection) { } } -let lastFramesReceived = 0; -let lastCalculatedFPS = 0; -let lastCalculatedFPSTimestamp = 0; - -function dumpStatsFramesPerSecondOnly(results: any) { - // framesReceived - let isFremsPerSecondSet; - // let statsString = ''; - - results.forEach((res: any) => { - // statsString += '

Report type='; - // statsString += res.type; - // statsString += '

\n'; - // statsString += `id ${res.id}
`; - // statsString += `time ${res.timestamp}
`; - Object.keys(res).forEach(k => { - if (k.includes('framesPerSecond') && k !== 'timestamp' && k !== 'type' && k !== 'id') { - // statsString += `${k}: ${res[k]}
`; - const fpsElement = document.getElementById('fps-show'); - if (fpsElement) { - fpsElement.innerHTML = res[k]; - } - isFremsPerSecondSet = true; - } - - if (k.includes('framesReceived') && k !== 'timestamp' && k !== 'type' && k !== 'id') { - const currentTime = new Date().getTime(); - const currentFramesReceived = parseInt(res[k], 10); - - if (lastFramesReceived === 0) { - lastFramesReceived = currentFramesReceived; - lastCalculatedFPSTimestamp = currentTime; - return; - } - const framesDifference = currentFramesReceived - lastFramesReceived; - console.log('framesDifference', framesDifference); - - const timeDifference = currentTime - lastCalculatedFPSTimestamp; - console.log('timeDifference', timeDifference); - const howManyTimesTimeDifferenceIsMorThanOneSecond = timeDifference / 1000; - console.log('howManyTimesTimeDifferenceIsMorThanOneSecond', howManyTimesTimeDifferenceIsMorThanOneSecond); - - lastCalculatedFPS = Math.floor(framesDifference / howManyTimesTimeDifferenceIsMorThanOneSecond); - lastFramesReceived = currentFramesReceived; - lastCalculatedFPSTimestamp = currentTime; - } - }); - }); - if (!isFremsPerSecondSet) { - const fpsElement = document.getElementById('fps-show'); - if (fpsElement) { - fpsElement.innerHTML = `~${lastCalculatedFPS}`; - } - } - // return statsString; -} - export default (peerConnection: PeerConnection) => { if (peerConnection.peer === null) { throw new PeerConnectionPeerIsNullError(); @@ -100,17 +43,6 @@ export default (peerConnection: PeerConnection) => { }); }, 1000); - setInterval(() => { - // console.log('peerConnection framerate', peerConnection.peer); - // @ts-ignore - if (peerConnection.peer && peerConnection.peer._pc) { - // @ts-ignore - peerConnection.peer._pc.getStats(null).then((results: any) => { - dumpStatsFramesPerSecondOnly(results); - }); - } - }, 2000); - peerConnection.videoAutoQualityOptimizer.startOptimizationLoop(); setTimeout(getSharingShourceType, 1000, peerConnection); diff --git a/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/ChooseAppOrScreenOverlay.tsx b/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/ChooseAppOrScreenOverlay.tsx index dc2a9fb5..059c0df6 100644 --- a/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/ChooseAppOrScreenOverlay.tsx +++ b/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/ChooseAppOrScreenOverlay.tsx @@ -169,6 +169,7 @@ export default function ChooseAppOrScreenOverlay( onClick={handleRefreshSources} style={{ borderRadius: '100px', + width: 'max-content', }} > {t('Refresh')} diff --git a/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/__snapshots__/ChooseAppOrScreenOverlay.spec.tsx.snap b/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/__snapshots__/ChooseAppOrScreenOverlay.spec.tsx.snap index 87e5d774..6555e9cc 100644 --- a/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/__snapshots__/ChooseAppOrScreenOverlay.spec.tsx.snap +++ b/app/components/StepsOfStepper/ChooseAppOrScreenOverlay/__snapshots__/ChooseAppOrScreenOverlay.spec.tsx.snap @@ -550,6 +550,7 @@ exports[`should match exact snapshot 1`] = ` style={ Object { "borderRadius": "100px", + "width": "max-content", } } > @@ -562,6 +563,7 @@ exports[`should match exact snapshot 1`] = ` style={ Object { "borderRadius": "100px", + "width": "max-content", } } type="button" diff --git a/app/components/TopPanel.tsx b/app/components/TopPanel.tsx index c0cd4ac8..3df06295 100644 --- a/app/components/TopPanel.tsx +++ b/app/components/TopPanel.tsx @@ -103,7 +103,12 @@ export default function TopPanel(props: any) { /> -
+
{t('Donate')}
diff --git a/app/components/__snapshots__/TopPanel.spec.tsx.snap b/app/components/__snapshots__/TopPanel.spec.tsx.snap index aa4e5330..2478cb9d 100644 --- a/app/components/__snapshots__/TopPanel.spec.tsx.snap +++ b/app/components/__snapshots__/TopPanel.spec.tsx.snap @@ -58,6 +58,7 @@ exports[` should match exact snapshot 1`] = ` style={ Object { "transform": "translateY(2px) translateX(-5px)", + "width": "max-content", } } > diff --git a/app/containers/__snapshots__/HomePage.spec.tsx.snap b/app/containers/__snapshots__/HomePage.spec.tsx.snap index f53abbb1..7fa9bdcb 100644 --- a/app/containers/__snapshots__/HomePage.spec.tsx.snap +++ b/app/containers/__snapshots__/HomePage.spec.tsx.snap @@ -212,6 +212,7 @@ exports[`should match exact snapshot 1`] = ` style={ Object { "transform": "translateY(2px) translateX(-5px)", + "width": "max-content", } } > diff --git a/app/package-lock.json b/app/package-lock.json index b7868a59..d6c879ef 100644 --- a/app/package-lock.json +++ b/app/package-lock.json @@ -1,5 +1,5 @@ { "name": "Deskreen", - "version": "1.0.7", + "version": "1.0.8", "lockfileVersion": 1 } diff --git a/app/package.json b/app/package.json index d9289c41..acd149c1 100644 --- a/app/package.json +++ b/app/package.json @@ -1,7 +1,7 @@ { "name": "deskreen", "productName": "Deskreen", - "version": "1.0.7", + "version": "1.0.8", "description": "Deskreen turns any device into a secondary screen for your computer", "main": "./main.prod.js", "author": { diff --git a/package.json b/package.json index af4eaa98..28ff89f5 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "deskreen", "productName": "Deskreen", - "version": "1.0.7", + "version": "1.0.8", "description": "Deskreen turns any device into a secondary screen for your computer", "scripts": { "build": "yarn build-client && yarn build-main && yarn build-renderer",