Skip to content

Commit

Permalink
migrate streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
nikitayutanov committed Jan 31, 2025
1 parent 349ce09 commit 800e386
Show file tree
Hide file tree
Showing 72 changed files with 1,680 additions and 1,866 deletions.
1 change: 0 additions & 1 deletion frontend/apps/racing-car-game/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { withProviders } from '@/hocs';
import { ScrollToTop, cx } from '@/utils';
import { LOGIN, PLAY, START } from '@/App.routes';
import styles from './App.module.scss';
import 'babel-polyfill';
import { useLoginByParams } from './hooks';
import { ProtectedRoute } from './features/Auth/components';
import { useAccountAvailableBalance, useAccountAvailableBalanceSync } from './features/Wallet/hooks';
Expand Down
14 changes: 8 additions & 6 deletions frontend/apps/w3bstreaming/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
REACT_APP_SIGNALING_SERVER=ws://127.0.0.1:3001
REACT_APP_DNS_API_URL=
REACT_APP_DNS_NAME=
REACT_APP_NODE_ADDRESS=wss://testnet.vara-network.io
REACT_APP_IPFS_GATEWAY_ADDRESS=
REACT_APP_IPFS_ADDRESS=
VITE_NODE_ADDRESS=
VITE_NODES_API_URL=
VITE_IPFS_GATEWAY_ADDRESS=
VITE_IPFS_ADDRESS=
VITE_DNS_API_URL=
VITE_DNS_NAME=
VITE_SIGNALING_SERVER=
VITE_BACKEND_SERVER=
3 changes: 3 additions & 0 deletions frontend/apps/w3bstreaming/.eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": ["react-app"]
}
46 changes: 0 additions & 46 deletions frontend/apps/w3bstreaming/.eslintrc.js

This file was deleted.

28 changes: 14 additions & 14 deletions frontend/apps/w3bstreaming/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ RUN apk update

RUN apk add xsel

ARG REACT_APP_NODE_ADDRESS \
REACT_APP_DNS_API_URL \
REACT_APP_DNS_NAME \
REACT_APP_IPFS_GATEWAY_ADDRESS \
REACT_APP_IPFS_ADDRESS \
REACT_APP_BACKEND_SERVER \
REACT_APP_SIGNALING_SERVER
ENV REACT_APP_NODE_ADDRESS=${REACT_APP_NODE_ADDRESS} \
REACT_APP_DNS_API_URL=${REACT_APP_DNS_API_URL} \
REACT_APP_DNS_NAME=${REACT_APP_DNS_NAME} \
REACT_APP_IPFS_GATEWAY_ADDRESS=${REACT_APP_IPFS_GATEWAY_ADDRESS} \
REACT_APP_IPFS_ADDRESS=${REACT_APP_IPFS_ADDRESS} \
REACT_APP_SIGNALING_SERVER=${REACT_APP_SIGNALING_SERVER} \
REACT_APP_BACKEND_SERVER=${REACT_APP_BACKEND_SERVER} \
ARG VITE_NODE_ADDRESS \
VITE_DNS_API_URL \
VITE_DNS_NAME \
VITE_IPFS_GATEWAY_ADDRESS \
VITE_IPFS_ADDRESS \
VITE_BACKEND_SERVER \
VITE_SIGNALING_SERVER
ENV VITE_NODE_ADDRESS=${VITE_NODE_ADDRESS} \
VITE_DNS_API_URL=${VITE_DNS_API_URL} \
VITE_DNS_NAME=${VITE_DNS_NAME} \
VITE_IPFS_GATEWAY_ADDRESS=${VITE_IPFS_GATEWAY_ADDRESS} \
VITE_IPFS_ADDRESS=${VITE_IPFS_ADDRESS} \
VITE_SIGNALING_SERVER=${VITE_SIGNALING_SERVER} \
VITE_BACKEND_SERVER=${VITE_BACKEND_SERVER} \
DISABLE_ESLINT_PLUGIN=true

WORKDIR /frontend/apps/w3bstreaming
Expand Down
17 changes: 0 additions & 17 deletions frontend/apps/w3bstreaming/config-overrides.js

This file was deleted.

7 changes: 0 additions & 7 deletions frontend/apps/w3bstreaming/index.d.ts

This file was deleted.

15 changes: 15 additions & 0 deletions frontend/apps/w3bstreaming/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link href="//vjs.zencdn.net/8.3.0/video-js.min.css" rel="stylesheet" />
<script src="//vjs.zencdn.net/8.3.0/video.min.js"></script>
<title>W3b Streaming</title>
</head>
<body>
<div id="root"></div>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
33 changes: 8 additions & 25 deletions frontend/apps/w3bstreaming/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
"name": "frontend",
"version": "0.1.0",
"private": true,
"type": "module",
"scripts": {
"start": "yarn build:packages && npx vite",
"build": "yarn build:packages && npx vite build",
"preview": "yarn build:packages && npx vite preview"
},
"dependencies": {
"@dapps-frontend/error-tracking": "workspace:*",
"@dapps-frontend/ui": "workspace:*",
Expand All @@ -16,17 +22,15 @@
"@polkadot/util": "12.3.2",
"@radix-ui/react-scroll-area": "1.0.5",
"@tanstack/react-query": "5.29.0",
"assert": "2.0.0",
"axios": "1.4.0",
"buffer": "6.0.3",
"clsx": "1.2.1",
"framer-motion": "10.16.5",
"jotai": "2.5.1",
"moment": "2.29.4",
"moment-timezone": "0.5.43",
"rc-time-picker": "^3.7.3",
"react": "18.2.0",
"react-datepicker": "4.15.0",
"react-datepicker": "7.6.0",
"react-dom": "18.2.0",
"react-dropzone": "14.2.3",
"react-router-dom": "6.21.0",
Expand All @@ -37,26 +41,5 @@
"socket.io": "4.6.1",
"socket.io-client": "4.6.1",
"video.js": "8.3.0"
},
"scripts": {
"start": "yarn build:packages && npx react-app-rewired start",
"build": "yarn build:packages && npx react-app-rewired build"
},
"eslintConfig": {
"extends": "./.eslintrc.js"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"main": "index.js",
"license": "MIT"
}
}
45 changes: 0 additions & 45 deletions frontend/apps/w3bstreaming/public/index.html

This file was deleted.

Binary file removed frontend/apps/w3bstreaming/public/logo192.png
Binary file not shown.
Binary file removed frontend/apps/w3bstreaming/public/logo512.png
Binary file not shown.
25 changes: 0 additions & 25 deletions frontend/apps/w3bstreaming/public/manifest.json

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/apps/w3bstreaming/public/robots.txt

This file was deleted.

20 changes: 0 additions & 20 deletions frontend/apps/w3bstreaming/react-app-env.d.ts

This file was deleted.

6 changes: 3 additions & 3 deletions frontend/apps/w3bstreaming/src/App.module.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@use '~styles/variables' as *;
@use '~styles/mixins' as *;
@use '@/styles/variables' as *;
@use '@/styles/mixins' as *;

.app-container {
width: 100%;
Expand All @@ -26,4 +26,4 @@

.footer-wrapper {
background: theme-var($background-secondary);
}
}
1 change: 0 additions & 1 deletion frontend/apps/w3bstreaming/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { StreamTeasersList } from '@/features/StreamTeasers';
import { ProtectedRoute, AuthRoute } from '@/features/Auth/components';
import { Loader } from './components/Loader';
import styles from './App.module.scss';
import 'babel-polyfill';
import { useAccountAvailableBalanceSync } from './features/Wallet/hooks';
import '@gear-js/vara-ui/dist/style.css';
import { useGetStateQuery } from './app/utils';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { usePrepareProgramTransaction } from '@gear-js/react-hooks';
import { useProgram } from 'app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from 'app/hooks';
import { useProgram } from '@/app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from '@/app/hooks';

type Params = {
name: string | null;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { usePrepareProgramTransaction } from '@gear-js/react-hooks';
import { useProgram } from 'app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from 'app/hooks';
import { useProgram } from '@/app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from '@/app/hooks';

type Params = {
title: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HexString } from '@gear-js/api';
import { useAccount, usePrepareProgramTransaction } from '@gear-js/react-hooks';
import { useProgram } from 'app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from 'app/hooks';
import { useProgram } from '@/app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from '@/app/hooks';

type Params = {
accountId: HexString;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { HexString } from '@gear-js/api';
import { useAccount, usePrepareProgramTransaction } from '@gear-js/react-hooks';
import { useProgram } from 'app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from 'app/hooks';
import { useProgram } from '@/app/utils';
import { Options, useExecuteWithPending, useSignAndSend } from '@/app/hooks';

type Params = {
accountId: HexString;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useProgram } from 'app/utils';
import { useProgram } from '@/app/utils';
import { useAccount, useProgramQuery } from '@gear-js/react-hooks';
import { useMemo } from 'react';
import { arrayToRecord } from '@/utils';
Expand Down
Loading

0 comments on commit 800e386

Please sign in to comment.