diff --git a/.eslintignore b/.eslintignore index e0fea66..561b4ce 100644 --- a/.eslintignore +++ b/.eslintignore @@ -57,4 +57,4 @@ package.json # Entire app/client directory -app/client/* +app/client diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index a932eef..223a32a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -13,19 +13,20 @@ jobs: with: node-version: 14 - - name: yarn install from npmjs registry - run: | - yarn install --no-lockfile - yarn install-client:nolockfile + # - name: yarn install from npmjs registry + # run: | + # yarn install --no-lockfile + # yarn install-client:nolockfile - name: Configure private AWS npm registry and install packages from it - if: ${{ failure() }} + # if: ${{ failure() }} run: | npm config set registry https://packages.deskreen.com/ npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}" npm config set always-auth true yarn install --frozen-lockfile - yarn install-client:frozenlockfile + cd app/client + yarn install --frozen-lockfile - name: yarn build run: yarn build diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7290d93..38c9b98 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -34,7 +34,7 @@ jobs: artifact_name: 'release/{*.AppImage,*.rpm,*.deb,*.yml}' - os: windows-2019 artifact_name: 'release/{*.msi,*.exe,*.blockmap,*.yml}' - - os: macos-10.14 + - os: macos-10.15 artifact_name: 'release/{*.zip,*.dmg,*.blockmap,*.yml}' steps: @@ -46,19 +46,20 @@ jobs: with: node-version: 14 - - name: yarn install from npmjs registry - run: | - yarn install --no-lockfile - yarn install-client:nolockfile + # - name: yarn install from npmjs registry + # run: | + # yarn install --no-lockfile + # yarn install-client:nolockfile - name: Configure private AWS npm registry and install packages from it - if: ${{ failure() }} + # if: ${{ failure() }} run: | npm config set registry https://packages.deskreen.com/ npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}" npm config set always-auth true yarn install --frozen-lockfile - yarn install-client:frozenlockfile + cd app/client + yarn install --frozen-lockfile - name: yarn package-ci env: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 05e0d29..a918103 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,74 +1,74 @@ -name: build and test +# name: build and test -on: [pull_request] +# on: [pull_request] -# NPMRC_ADMIN_USER_AUTH_TOKEN +# # NPMRC_ADMIN_USER_AUTH_TOKEN -jobs: - build-and-test: - runs-on: ${{ matrix.os }} +# jobs: +# build-and-test: +# runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [macos-10.14, windows-2019, ubuntu-18.04] +# strategy: +# matrix: +# os: [macos-10.14, windows-2019, ubuntu-18.04] - steps: - - name: Check out Git repository - uses: actions/checkout@v2.3.1 +# steps: +# - name: Check out Git repository +# uses: actions/checkout@v2.3.1 - - name: Install Node.js, NPM and Yarn - uses: actions/setup-node@v1.4.2 - with: - node-version: 14 +# - name: Install Node.js, NPM and Yarn +# uses: actions/setup-node@v1.4.2 +# with: +# node-version: 14 - - name: yarn install from npmjs registry - run: | - yarn install --no-lockfile - yarn install-client:nolockfile +# # - name: yarn install from npmjs registry +# # run: | +# # yarn install --no-lockfile +# # yarn install-client:nolockfile - - name: Configure private AWS npm registry and install packages from it - if: ${{ failure() }} - run: | - npm config set registry https://packages.deskreen.com/ - npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}" - npm config set always-auth true - yarn install --frozen-lockfile - yarn install-client:frozenlockfile +# - name: Configure private AWS npm registry and install packages from it +# # if: ${{ failure() }} +# run: | +# npm config set registry https://packages.deskreen.com/ +# npm set //packages.deskreen.com/:_authToken="${{ secrets.NPMRC_USER_TOKEN }}" +# npm config set always-auth true +# yarn install --frozen-lockfile +# yarn install-client:frozenlockfile - # following step does code signing when `electron-builder --publish always` (look in package.json) - - name: yarn package-ci - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn package-ci +# # following step does code signing when `electron-builder --publish always` (look in package.json) +# - name: yarn package-ci +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn package-ci - - name: yarn build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn build +# - name: yarn build +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn build - - name: yarn lint - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn lint +# - name: yarn lint +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn lint - - name: yarn tsc - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn tsc +# - name: yarn tsc +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn tsc - - name: yarn test - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn test +# - name: yarn test +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn test - - name: yarn build-e2e - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: yarn build-e2e +# - name: yarn build-ux +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# run: yarn build-ux - - name: yarn test-e2e - uses: GabrielBB/xvfb-action@v1.2 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - run: yarn test-e2e +# - name: yarn test-ux +# uses: GabrielBB/xvfb-action@v1.2 +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# with: +# run: yarn test-ux diff --git a/LICENSE b/LICENSE index 4f9058d..ce05389 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2020-present Deskreen +Copyright (c) 2020-present Pavlo (Paul) Buidenkov Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/app/Routes.tsx b/app/Routes.tsx index df54410..3927751 100644 --- a/app/Routes.tsx +++ b/app/Routes.tsx @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint react/jsx-props-no-spreading: off */ import React from 'react'; import { Switch, Route } from 'react-router-dom'; diff --git a/app/app.global.css b/app/app.global.css index 57e855c..eefaaed 100644 --- a/app/app.global.css +++ b/app/app.global.css @@ -6,28 +6,384 @@ @import '~normalize.css/normalize.css'; @import '~@blueprintjs/core/lib/css/blueprint.css'; @import '~react-flexbox-grid/dist/react-flexbox-grid.css'; +@import '~fontsource-lexend-peta/index.css'; + +:root { + --dark-bg-color: #293742; + --light-bg-color: rgba(240, 248, 250, 1); + --light-btn-no-intent-color: rgb(218, 238, 243); + --dark-btn-no-intent-color: #394b59; + --custom-scrollbar-webkit-scrollbar-thumb-border-radius: 10px; + --custom-scrollbar-webkit-scrollbar-thumb-background-color: #8a9ba8; + --custom-scrollbar-webkit-scrollbar_background-color: rgba(0, 0, 0, 0); + --custom-scrollbar-webkit-scrollbar-width: 12px; + --custom-scrollbar-webkit-scrollbar-track-border-radius: 10px; + --custom-scrollbar-webkit-scrollbar-track-background-color: rgba(0, 0, 0, 0); +} body { position: relative; - color: white; height: 100vh; - background-color: whitesmoke; font-family: Arial, Helvetica, Helvetica Neue, serif; - overflow-y: hidden; + overflow: hidden; + background-color: var(--light-bg-color); +} + +/* UI colors FOR LIGHT AND DARK THEME START */ +.bp3-button:not([class*='bp3-intent-']) { + background-color: var(--light-btn-no-intent-color); } body.bp3-dark { - background-color: #293742; + background-color: var(--dark-bg-color) !important; } -/* .bp3-button { - outline: none !important; +.bp3-dialog { + background-color: var(--light-bg-color) !important; } -.bp3-control { - outline: none !important; +.bp3-dark .bp3-dialog { + background-color: var(--dark-bg-color) !important; +} + +.bp3-popover .bp3-popover-arrow-fill { + fill: var(--light-bg-color); +} + +.bp3-popover .bp3-popover-content { + background-color: var(--light-bg-color); + color: black; +} + +.bp3-html-select > select { + background-color: var(--light-btn-no-intent-color); +} + +.bp3-drawer { + background-color: var(--light-bg-color); +} + +.bp3-card { + background-color: var(--light-bg-color); +} + +/* for really small screen sizes (ex. Raspberry PI display etc. */ +@media screen and (max-height: 419px) { + body { + overflow-y: scroll; + } +} + +.react-toast-notifications__container { + overflow: hidden !important; +} + +/* Connected Devices List button pulse START */ +#top-panel-connected-devices-list-button.pulsing { + transform: scale(1); + animation: pulse-black-devices-list-button 0.75s infinite; +} + +#top-panel-connected-devices-list-button.pulse-not-infinite { + transform: scale(1); + animation: pulse-black-devices-list-button 0.75s 4; +} + +@keyframes pulse-black-devices-list-button { + 0% { + transform: scale(1); + box-shadow: 0 0 0 0 rgba(115, 134, 148, 0.7); + } + + 60% { + transform: scale(0.85); + box-shadow: 0 0 0 15px rgba(115, 134, 148, 0.3); + } + + 100% { + transform: scale(1); + box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); + } +} + +/* Connected Devices List button pulse END */ + +/* For choose app or screen overlay popup without scrollbars! */ +.bp3-overlay-scroll-container { + overflow-y: hidden !important; +} + +/* help cursor when text hovered Connected Devices List */ +#connected-devices-list-text-success:hover { + cursor: help; +} + +/* react-toast-notifications progress bar more obvious look */ +body + > div.react-toast-notifications__container + > div + > div + > div.react-toast-notifications__toast__icon-wrapper + > div { + background-color: rgba(0, 0, 0, 0.4); +} + +.hide-toaster-progress { + height: 5px; + width: calc(100% + 87px) !important; + bottom: -11px !important; + left: -40px !important; +} + +/* ALLOW CONNECTION ALERT BLINK ANIMATION START */ +div.class-allow-device-to-connect-alert + > div.bp3-alert-body + > span + > svg + > path { + color: #a82a2a !important; + -webkit-animation: blink 0.75s infinite alternate; /* to blink 3 times instead of infinite write just 3 */ + -moz-animation: blink 0.75s infinite alternate; + -ms-animation: blink 0.75s infinite alternate; + -o-animation: blink 0.75s infinite alternate; + animation: blink 0.75s infinite alternate; +} + +@-webkit-keyframes blink { + from { + color: #a82a2a; + } + to { + color: #f55656; + } +} +@-moz-keyframes blink { + from { + color: #a82a2a; + } + to { + color: #f55656; + } +} +@-ms-keyframes blink { + from { + color: #a82a2a; + } + to { + color: #f55656; + } +} +@-o-keyframes blink { + from { + color: #a82a2a; + } + to { + color: #f55656; + } +} +@keyframes blink { + from { + color: #a82a2a; + } + to { + color: #f55656; + } +} + +/* ALLOW CONNECTION ALERT BLINK ANIMATION END */ + +/* Connected Device Info Button pulse animation START */ + +#connected-device-info-stepper-button { + transform: scale(1); + animation: pulse-black-connected-device 0.75s 3; +} + +@keyframes pulse-black-connected-device { + 0% { + transform: scale(1); + box-shadow: 0 0 0 0 rgba(61, 204, 145, 0.7); + } + + 60% { + transform: scale(0.75); + box-shadow: 0 0 0 15px rgba(61, 204, 145, 0.3); + } + + 100% { + transform: scale(1); + box-shadow: 0 0 0 5px rgba(0, 0, 0, 0); + } +} + +/* Connected Device Info Button pulse animation END */ + +#settings-overlay-inner > div > div.bp3-tab-panel { + width: 100% !important; +} + +/* settings panel tabs button left styles */ +#settings-overlay-inner > div > div.bp3-tab-list { + background-color: rgba(0, 0, 0, 0.1); + padding: 8px; + + /* height: 100%; */ +} + +/* settings inner 100% height regardless tab content height */ +#settings-overlay-inner > div { + height: 100%; +} + +.bp3-overlay-settings { + display: flex; + align-items: center; + justify-content: center; +} + +/* .bp3-overlay-settings.bp3-overlay-content { + display: flex; } */ +/* TODO: move to appropriate style file in ShareEntireScreenOrAppWindowControlGroup */ +#share-screen-or-app-btn-group > button > span { + display: flex; + justify-content: center; + align-items: center; + flex-direction: column; +} + +/* #root>div.MuiPaper-root.MuiStepper-root.MuiStepper-horizontal.MuiStepper-alternativeLabel.MuiPaper-elevation0>div:nth-child(1)>span>span.MuiStepLabel-iconContainer.MuiStepLabel-alternativeLabel>div { + transform: scale(1); + animation: pulse-black 2s infinite; +} */ + +.active-stepper-pulse-icon { + transform: scale(1); + animation: pulse-black 3s infinite; +} + +@keyframes pulse-black { + 0% { + transform: scale(0.9); + box-shadow: 0 0 0 0 rgba(191, 115, 38, 0.7); + } + + 60% { + transform: scale(1); + box-shadow: 0 0 0 12px rgba(255, 179, 102, 0.3); + } + + 100% { + transform: scale(0.9); + box-shadow: 0 0 0 20px rgba(0, 0, 0, 0); + } +} + +/* TODO: move it to DeskreenStepper.css ! */ +#step-label-deskreen > span.MuiStepLabel-labelContainer > span { + margin-top: 8px; +} + +#share-screen-or-app-btn-group > button:nth-child(1):hover { + border-width: 10px; +} + +.bp3-overlay::-webkit-scrollbar-track { + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); */ + border-radius: var(--custom-scrollbar-webkit-scrollbar-track-border-radius); + background-color: var( + --custom-scrollbar-webkit-scrollbar-track-background-color + ); +} + +.bp3-overlay::-webkit-scrollbar { + width: var(--custom-scrollbar-webkit-scrollbar-width); + background-color: var(--custom-scrollbar-webkit-scrollbar_background-color); +} + +.bp3-overlay::-webkit-scrollbar-thumb { + border-radius: var(--custom-scrollbar-webkit-scrollbar-thumb-border-radius); + + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); */ + background-color: var( + --custom-scrollbar-webkit-scrollbar-thumb-background-color + ); +} + +.bp3-drawer::-webkit-scrollbar-track { + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); */ + border-radius: var(--custom-scrollbar-webkit-scrollbar-track-border-radius); + background-color: var( + --custom-scrollbar-webkit-scrollbar-track-background-color + ); +} + +.bp3-drawer::-webkit-scrollbar { + width: var(--custom-scrollbar-webkit-scrollbar-width); + background-color: var(--custom-scrollbar-webkit-scrollbar_background-color); +} + +.bp3-drawer::-webkit-scrollbar-thumb { + border-radius: var(--custom-scrollbar-webkit-scrollbar-thumb-border-radius); + + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); */ + background-color: var( + --custom-scrollbar-webkit-scrollbar-thumb-background-color + ); +} + +body::-webkit-scrollbar-track { + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); */ + border-radius: var(--custom-scrollbar-webkit-scrollbar-track-border-radius); + background-color: var( + --custom-scrollbar-webkit-scrollbar-track-background-color + ); +} + +body::-webkit-scrollbar { + width: var(--custom-scrollbar-webkit-scrollbar-width); + background-color: var(--custom-scrollbar-webkit-scrollbar_background-color); +} + +body::-webkit-scrollbar-thumb { + border-radius: var(--custom-scrollbar-webkit-scrollbar-thumb-border-radius); + + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); */ + background-color: var( + --custom-scrollbar-webkit-scrollbar-thumb-background-color + ); +} + +.choose-app-or-screen-dialog::-webkit-scrollbar-track { + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,0.3); */ + border-radius: var(--custom-scrollbar-webkit-scrollbar-track-border-radius); + background-color: var( + --custom-scrollbar-webkit-scrollbar-track-background-color + ); +} + +.choose-app-or-screen-dialog::-webkit-scrollbar { + width: var(--custom-scrollbar-webkit-scrollbar-width); + background-color: var(--custom-scrollbar-webkit-scrollbar_background-color); +} + +.choose-app-or-screen-dialog::-webkit-scrollbar-thumb { + border-radius: var(--custom-scrollbar-webkit-scrollbar-thumb-border-radius); + + /* -webkit-box-shadow: inset 0 0 6px rgba(0,0,0,.3); */ + background-color: var( + --custom-scrollbar-webkit-scrollbar-thumb-background-color + ); +} + +/* --custom-scrollbar-webkit-scrollbar-thumb-border-radius: 10px; +--custom-scrollbar-webkit-scrollbar-thumb-background-color: #8A9BA8; +--custom-scrollbar-webkit-scrollbar_background-color: rgba(0,0,0,0); +--custom-scrollbar-webkit-scrollbar-width: 12px; +--custom-scrollbar-webkit-scrollbar-track-border-radius: 10px; +--custom-scrollbar-webkit-scrollbar-track-background-color: rgba(0,0,0,0); */ + h2 { margin: 0; font-size: 2.25rem; diff --git a/app/app.html b/app/app.html index 77ee53c..4f927ee 100644 --- a/app/app.html +++ b/app/app.html @@ -2,7 +2,7 @@ - Hello Deskreen! + Deskreen