diff --git a/.github/workflows/deploy-storybook.yaml b/.github/workflows/deploy-storybook.yaml new file mode 100644 index 00000000..804a4d97 --- /dev/null +++ b/.github/workflows/deploy-storybook.yaml @@ -0,0 +1,71 @@ +name: 'Deploy Storybook' + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + cache-dependencies: + runs-on: ubuntu-latest + steps: + - name: Checkout Commit + uses: actions/checkout@v2 + - name: Cache yarn dependencies and cypress + uses: actions/cache@v2 + id: yarn-cache + with: + path: | + ~/.cache/Cypress + node_modules + key: ${{ runner.os }}-yarn-v3-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-v3 + - name: Install dependencies if cache invalid + if: steps.yarn-cache.outputs.cache-hit != 'true' + run: yarn + + build-and-deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: cache-dependencies + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: '18.x' + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Restore yarn dependencies + uses: actions/cache@v2 + id: yarn-cache + with: + path: | + ~/.cache/Cypress + node_modules + key: ${{ runner.os }}-yarn-v3-${{ hashFiles('**/yarn.lock') }} + restore-keys: | + ${{ runner.os }}-yarn-v3 + - name: Install Playwright + run: npx playwright install --with-deps + - name: Build Storybook + run: yarn build-storybook --quiet + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + path: './storybook-static' + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.github/workflows/ui-tests.yaml b/.github/workflows/ui-tests.yaml index 0a7be752..b2557b70 100644 --- a/.github/workflows/ui-tests.yaml +++ b/.github/workflows/ui-tests.yaml @@ -65,7 +65,7 @@ jobs: run: npx playwright install --with-deps - name: Build Storybook run: yarn build-storybook --quiet - - name: Serve Storybook and run tests + - name: Run Storybook tests run: | npx concurrently -k -s first -n "SB,TEST" -c "magenta,blue" \ "npx http-server storybook-static --port 6006 --silent" \ diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 00000000..e69de29b diff --git a/package.json b/package.json index 6cd4f00f..9f5c7e7a 100644 --- a/package.json +++ b/package.json @@ -2,6 +2,7 @@ "name": "nimbus-gui", "private": true, "version": "0.0.0", + "homepage": "https://nimbus-gui.github.io/nimbus-gui", "scripts": { "dev": "NODE_ENV=development vite", "build": "tsc -p . && vite build", diff --git a/src/components/Charts/DeviceCPULoad.tsx b/src/components/Charts/DeviceCPULoad.tsx index 518bf92b..79cb64ce 100644 --- a/src/components/Charts/DeviceCPULoad.tsx +++ b/src/components/Charts/DeviceCPULoad.tsx @@ -67,7 +67,7 @@ const DeviceCPULoad: React.FC = ({ load }) => { {message} diff --git a/src/components/Charts/DeviceMemoryHealth.tsx b/src/components/Charts/DeviceMemoryHealth.tsx index 444674c8..b7b2d2bc 100644 --- a/src/components/Charts/DeviceMemoryHealth.tsx +++ b/src/components/Charts/DeviceMemoryHealth.tsx @@ -70,7 +70,7 @@ const DeviceMemoryHealth = ({ currentMemory, maxMemory }: DeviceMemoryHealthProp - + {message} {message === 'Poor' && ( diff --git a/src/components/Charts/DeviceNetworkHealth.tsx b/src/components/Charts/DeviceNetworkHealth.tsx index c74fc9c7..967002b9 100644 --- a/src/components/Charts/DeviceNetworkHealth.tsx +++ b/src/components/Charts/DeviceNetworkHealth.tsx @@ -75,7 +75,7 @@ const DeviceNetworkHealth = ({ uploadRate, downloadRate }: DeviceNetworkHealthPr - + {message} {message === 'Poor' && ( diff --git a/src/components/Charts/DeviceStorageHealth.tsx b/src/components/Charts/DeviceStorageHealth.tsx index 6c6da6c5..356c22aa 100644 --- a/src/components/Charts/DeviceStorageHealth.tsx +++ b/src/components/Charts/DeviceStorageHealth.tsx @@ -69,7 +69,7 @@ const DeviceStorageHealth: React.FC = ({ storage, maxS {message} diff --git a/src/components/General/BreadcrumbBar/BreadcrumbBar.css b/src/components/General/BreadcrumbBar/BreadcrumbBar.css index e4dbdae6..5730f82e 100644 --- a/src/components/General/BreadcrumbBar/BreadcrumbBar.css +++ b/src/components/General/BreadcrumbBar/BreadcrumbBar.css @@ -14,7 +14,7 @@ } .breadcrumb-bar-li::after { display: inline-block; - content: url("/icons/chevron.svg"); + content: url("./icons/chevron.svg"); color: #09101C; position: absolute; top: 2px; diff --git a/src/components/General/Titles.tsx b/src/components/General/Titles.tsx index fb24683a..4e5f790a 100644 --- a/src/components/General/Titles.tsx +++ b/src/components/General/Titles.tsx @@ -15,7 +15,7 @@ const Titles = ({ title, subtitle, isAdvancedSettings }: TitlesProps) => { {title} {isAdvancedSettings && ( - )} diff --git a/src/components/Logos/NimbusLogo.tsx b/src/components/Logos/NimbusLogo.tsx index 5ea1fc94..57ea1ff9 100644 --- a/src/components/Logos/NimbusLogo.tsx +++ b/src/components/Logos/NimbusLogo.tsx @@ -13,7 +13,7 @@ const NimbusLogo = () => { space={'$3'} > - marks + marks ) diff --git a/src/components/Logos/NodesLogo.tsx b/src/components/Logos/NodesLogo.tsx index 5647e56d..be18b2e1 100644 --- a/src/components/Logos/NodesLogo.tsx +++ b/src/components/Logos/NodesLogo.tsx @@ -12,7 +12,7 @@ const NodesLogo = () => { }} space={'$2'} > - + nodes diff --git a/src/constants.ts b/src/constants.ts index 2467e6ef..592cd99d 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,5 +1,5 @@ -export const GREEN_CHECKMARK_ICON = '/icons/checkmark-circle-green.png' -export const RED_CHECKMARK_ICON = '/icons/remove-circle-red.png' +export const GREEN_CHECKMARK_ICON = './icons/checkmark-circle-green.png' +export const RED_CHECKMARK_ICON = './icons/remove-circle-red.png' export const GOOD_STORAGE_TEXT = 'You have plenty of storage available for additional node services.' diff --git a/src/pages/ConnectDevicePage/ConnectDevicePage.tsx b/src/pages/ConnectDevicePage/ConnectDevicePage.tsx index f5506f00..84803251 100644 --- a/src/pages/ConnectDevicePage/ConnectDevicePage.tsx +++ b/src/pages/ConnectDevicePage/ConnectDevicePage.tsx @@ -15,7 +15,7 @@ const ConnectDevicePage = () => { return ( } - rightImageSrc="/background-images/day-night-bg.png" + rightImageSrc="./background-images/day-night-bg.png" rightImageLogo={true} > diff --git a/src/pages/CreateLocalNodePage/CreateLocalNodePage.tsx b/src/pages/CreateLocalNodePage/CreateLocalNodePage.tsx index 6f656184..84a7bb7f 100644 --- a/src/pages/CreateLocalNodePage/CreateLocalNodePage.tsx +++ b/src/pages/CreateLocalNodePage/CreateLocalNodePage.tsx @@ -13,7 +13,7 @@ const CreateLocalNodePage = () => { const [autoConnectChecked, setAutoConnectChecked] = useState(false) return ( - +
diff --git a/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx b/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx index 72e90471..727f5138 100644 --- a/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx +++ b/src/pages/DeviceHealthCheck/DeviceHealthCheck.tsx @@ -13,11 +13,10 @@ import { useSelector } from 'react-redux' import { RootState } from '../../redux/store' const DeviceHealthCheck = () => { - const deviceHealthState = useSelector((state: RootState) => state.deviceHealth) console.log(deviceHealthState) return ( - + { networkLatency={75} /> } + icon={} message="The information provided in the Nodes Health Check is meant to utilized as a guide to guage the readiness of your device, however please do your own due diligence prior to commiting any funds. Read our Health Check Disclosure for more information." /> diff --git a/src/pages/DeviceSyncStatus/DeviceSyncStatus.tsx b/src/pages/DeviceSyncStatus/DeviceSyncStatus.tsx index a0fa7cba..91be8038 100644 --- a/src/pages/DeviceSyncStatus/DeviceSyncStatus.tsx +++ b/src/pages/DeviceSyncStatus/DeviceSyncStatus.tsx @@ -23,7 +23,7 @@ const DeviceSyncStatus = () => { ) }, [dispatch]) return ( - + = ({ synced, t Consensus Client - + = ({ synced, t - {message} + {message} {formatNumber(synced)} / {formatNumber(total)} diff --git a/src/pages/DeviceSyncStatus/SyncStatusCardExecution.tsx b/src/pages/DeviceSyncStatus/SyncStatusCardExecution.tsx index fc8e5588..92143096 100644 --- a/src/pages/DeviceSyncStatus/SyncStatusCardExecution.tsx +++ b/src/pages/DeviceSyncStatus/SyncStatusCardExecution.tsx @@ -72,7 +72,7 @@ const SyncStatusCardExecution: React.FC = ({ synced, t - {message} + {message} {' '} diff --git a/src/pages/LandingPage/LandingPage.tsx b/src/pages/LandingPage/LandingPage.tsx index f4c0186b..df4774f7 100644 --- a/src/pages/LandingPage/LandingPage.tsx +++ b/src/pages/LandingPage/LandingPage.tsx @@ -10,7 +10,7 @@ import QuickStartBar from '../../components/General/QuickStartBar/QuickStartBar' function LandingPage() { return ( <> - + diff --git a/src/pages/PairDevice/PairDevice.tsx b/src/pages/PairDevice/PairDevice.tsx index a2f43e31..1263b15a 100644 --- a/src/pages/PairDevice/PairDevice.tsx +++ b/src/pages/PairDevice/PairDevice.tsx @@ -22,7 +22,7 @@ const PairDevice = () => { } return ( - +