diff --git a/.drone.yml b/.drone.yml
index 6397fe22..7db483ca 100644
--- a/.drone.yml
+++ b/.drone.yml
@@ -15,9 +15,28 @@ trigger:
- refs/heads/master
steps:
- - name: deploy script
+ - name: npm-install
image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
+ - npm install --legacy-peer-deps
+
+ - name: make-prod
+ image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
+ - make prod
+ depends_on:
+ - npm-install
+ - name: deploy-prod
+ image: amazon/aws-cli:latest
environment:
AWS_ACCESS_KEY_ID:
from_secret: AWS_ACCESS_KEY_ID
@@ -25,27 +44,162 @@ steps:
from_secret: AWS_SECRET_ACCESS_KEY
AWS_DEFAULT_REGION:
from_secret: AWS_DEFAULT_REGION
- REACT_APP_STRIPE_PK:
- from_secret: REACT_APP_STRIPE_PK
- SSH_KEY_AUTH:
- from_secret: SSH_KEY_AUTH
-
+ AWS_MAX_ATTEMPTS: 10
commands:
- - apk add --no-cache aws-cli bash git openssh-client make rsync
- - npm install --legacy-peer-deps
- - make prod
# - aws s3 sync build s3://insports-prod --delete
# - aws cloudfront create-invalidation --distribution-id E3KY6BCU3AYHEW --paths "/*"
- aws s3 sync build s3://instat-frontend-test-a --delete
- aws cloudfront create-invalidation --distribution-id E1WZHVCHZ48SG6 --paths "/*"
+ depends_on:
+ - make-prod
+
+ - name: make-auth
+ image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
- make auth-production-build
+ depends_on:
+ - npm-install
+
+ - name: deploy-S3-auth
+ image: amazon/aws-cli:latest
+ environment:
+ AWS_ACCESS_KEY_ID:
+ from_secret: AWS_ACCESS_KEY_ID
+ AWS_SECRET_ACCESS_KEY:
+ from_secret: AWS_SECRET_ACCESS_KEY
+ AWS_DEFAULT_REGION:
+ from_secret: AWS_DEFAULT_REGION
+ AWS_MAX_ATTEMPTS: 10
+ commands:
+ - aws s3 sync build s3://insports-auth --delete
+ - aws cloudfront create-invalidation --distribution-id EERIKX9X2SRPJ --paths "/*"
+ depends_on:
+ - make-auth
+
+ - name: deploy-old-auth-server
+ image: node:16-alpine
+ environment:
+ SSH_KEY_AUTH:
+ from_secret: SSH_KEY_AUTH
+ commands:
+ - apk add --no-cache openssh-client rsync
- eval $(ssh-agent -s)
- echo -n "$SSH_KEY_AUTH" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- - ssh-keyscan auth.insports.tv >> ~/.ssh/known_hosts
- - rsync -v -r -C build_auth/ ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/
- - rsync -v -r -C build_auth/clients/* ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/templates
- - ssh ubuntu@auth.insports.tv 'bash -s' < ./run.sh OTT-2535 docker-compose-stage.yaml
+ depends_on:
+ - make-auth
+
+ - name: make-india
+ image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
+ - make india-prod
+ depends_on:
+ - npm-install
+
+ - name: deploy-india
+ image: amazon/aws-cli:latest
+ environment:
+ AWS_ACCESS_KEY_ID:
+ from_secret: AWS_ACCESS_KEY_ID
+ AWS_SECRET_ACCESS_KEY:
+ from_secret: AWS_SECRET_ACCESS_KEY
+ AWS_DEFAULT_REGION:
+ from_secret: AWS_DEFAULT_REGION
+ AWS_MAX_ATTEMPTS: 10
+ commands:
+ - aws s3 sync build_india s3://insports-india --delete
+ - aws cloudfront create-invalidation --distribution-id E5DKN8IPOMASO --paths "/*"
+ depends_on:
+ - make-india
+
+ - name: make-facr
+ image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
+ - make facr-prod
+ depends_on:
+ - npm-install
+
+ - name: deploy-facr
+ image: amazon/aws-cli:latest
+ environment:
+ AWS_ACCESS_KEY_ID:
+ from_secret: AWS_ACCESS_KEY_ID
+ AWS_SECRET_ACCESS_KEY:
+ from_secret: AWS_SECRET_ACCESS_KEY
+ AWS_DEFAULT_REGION:
+ from_secret: AWS_DEFAULT_REGION
+ AWS_MAX_ATTEMPTS: 10
+ commands:
+ - aws s3 sync build_facr s3://insports-facr-tv --delete
+ - aws cloudfront create-invalidation --distribution-id E1ZYJS9RAJO89D --paths "/*"
+ depends_on:
+ - make-facr
+
+ - name: make-lff
+ image: node:16-alpine
+ environment:
+ REACT_APP_STRIPE_PK:
+ from_secret: REACT_APP_STRIPE_PK
+ commands:
+ - apk add --no-cache make
+ - make lff-prod
+ depends_on:
+ - npm-install
+
+ - name: deploy-lff
+ image: amazon/aws-cli:latest
+ environment:
+ AWS_ACCESS_KEY_ID:
+ from_secret: AWS_ACCESS_KEY_ID
+ AWS_SECRET_ACCESS_KEY:
+ from_secret: AWS_SECRET_ACCESS_KEY
+ AWS_DEFAULT_REGION:
+ from_secret: AWS_DEFAULT_REGION
+ AWS_MAX_ATTEMPTS: 10
+ commands:
+ - aws s3 sync build_lff s3://insports-tv-lff-lv --delete
+ - aws cloudfront create-invalidation --distribution-id E2127IDW4TEH4S --paths "/*"
+ depends_on:
+ - make-lff
+
+# - name: make-diwansport
+# image: node:16-alpine
+# environment:
+# REACT_APP_STRIPE_PK:
+# from_secret: REACT_APP_STRIPE_PK
+# commands:
+# - apk add --no-cache make
+# - make diwansport-prod
+# depends_on:
+# - npm-install
+#
+# - name: deploy-diwansport
+# image: amazon/aws-cli:latest
+# environment:
+# AWS_ACCESS_KEY_ID:
+# from_secret: AWS_ACCESS_KEY_ID
+# AWS_SECRET_ACCESS_KEY:
+# from_secret: AWS_SECRET_ACCESS_KEY
+# AWS_DEFAULT_REGION:
+# from_secret: AWS_DEFAULT_REGION
+# AWS_MAX_ATTEMPTS: 10
+# commands:
+# - aws s3 sync build_insports-diwansport s3://insports-diwansport --delete
+# - aws cloudfront create-invalidation --distribution-id E3LKAH6TR4O2JL --paths "/*"
+# depends_on:
+# - make-diwansport
---
kind: pipeline
@@ -131,7 +285,6 @@ steps:
## - ssh-keyscan auth.insports.tv >> ~/.ssh/known_hosts
## - rsync -v -r -C build_auth/ ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/
## - rsync -v -r -C build_auth/clients/* ubuntu@auth.insports.tv:/home/ubuntu/ott-auth/src/frontend/templates
-## - ssh ubuntu@auth.insports.tv 'bash -s' < ./run.sh OTT-2535 docker-compose-stage.yaml
---
@@ -523,17 +676,18 @@ steps:
from_secret: AWS_DEFAULT_REGION
REACT_APP_STRIPE_PK:
from_secret: REACT_APP_STRIPE_PK_TEST
- SSH_KEY_AUTH:
- from_secret: SSH_KEY_AUTH
+ SSH_KEY_AUTH_TEST:
+ from_secret: SSH_KEY_AUTH_TEST
commands:
- apk add --no-cache aws-cli bash git openssh-client make rsync
- npm install --legacy-peer-deps
- make auth-build
- eval $(ssh-agent -s)
- - echo -n "$SSH_KEY_AUTH" | tr -d '\r' | ssh-add -
+ - echo -n "$SSH_KEY_AUTH_TEST" | tr -d '\r' | ssh-add -
- mkdir -p ~/.ssh && chmod 700 ~/.ssh
- ssh-keyscan auth.test.insports.tv >> ~/.ssh/known_hosts
- rsync -v -r -C build_auth/ ubuntu@auth.test.insports.tv:/home/ubuntu/ott-auth/src/frontend/
- rsync -v -r -C build_auth/clients/* ubuntu@auth.test.insports.tv:/home/ubuntu/ott-auth/src/frontend/templates
- - ssh ubuntu@auth.test.insports.tv 'bash -s' < ./run.sh OTT-2535-test docker-compose-test.yaml
+ - aws s3 sync build_auth s3://auth-insports-test --delete
+ - aws cloudfront create-invalidation --distribution-id E10YI3RFOZZDLZ --paths "/*"
diff --git a/.gitignore b/.gitignore
index 932519ba..f8d1d08e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -11,6 +11,9 @@
# production
/build
/build_auth
+/build_india
+/build_facr
+/build_lff
# misc
.DS_Store
diff --git a/Makefile b/Makefile
index 293df69c..bd0669a8 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ build-stage: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=preproduction \
REACT_APP_CLIENT=insports \
- REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW7v2lF8GGogrm7XaaICZ9CN876sITIBBauZgB2ommUTUOiY868jzpbhQjZcoBOjIRX5Vs54Aq00y4C3USyB \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
npm run build
build-a: clean
@@ -120,15 +120,21 @@ auth-production-build:
facr-build: clean
REACT_APP_TYPE=ott \
- REACT_APP_ENV=staging \
- REACT_APP_CLIENT=facr \
- npm run build
+ REACT_APP_ENV=staging \
+ REACT_APP_CLIENT=facr \
+ npm run build
+
+india-build: clean
+ REACT_APP_TYPE=ott \
+ REACT_APP_ENV=staging \
+ REACT_APP_CLIENT=india \
+ npm run build
lff-build: clean
REACT_APP_TYPE=ott \
- REACT_APP_ENV=staging \
+ REACT_APP_ENV=staging \
REACT_APP_CLIENT=lff \
- npm run build
+ npm run build
.PHONY: build
@@ -136,75 +142,46 @@ prod: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=production \
REACT_APP_CLIENT=insports \
- REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW7v2lF8GGogrm7XaaICZ9CN876sITIBBauZgB2ommUTUOiY868jzpbhQjZcoBOjIRX5Vs54Aq00y4C3USyB \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
npm run build && cp -r .well-known build
-# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/wwwroot/
-# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/wwwroot/
-# rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@137.74.33.74:/usr/local/www/ott/wwwroot/
-
preprod: clean
REACT_APP_TYPE=ott \
REACT_APP_ENV=preproduction \
REACT_APP_STAGE=test \
REACT_APP_CLIENT=insports \
- REACT_APP_STRIPE_PK=pk_live_ANI76cBhSo69DZUxPmyRVIZW \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
npm run build
-facr-prod: clean
+india-prod:
+ rm -rf build_india && \
+ REACT_APP_TYPE=ott \
+ REACT_APP_ENV=production \
+ REACT_APP_CLIENT=india \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
+ BUILD_PATH=build_india \
+ npm run build && cp -r .well-known build_india
+
+facr-prod:
+ rm -rf build_facr && \
REACT_APP_TYPE=ott \
REACT_APP_ENV=production \
- REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW7v2lF8GGogrm7XaaICZ9CN876sITIBBauZgB2ommUTUOiY868jzpbhQjZcoBOjIRX5Vs54Aq00y4C3USyB \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
REACT_APP_CLIENT=facr \
- npm run build
-
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/facr-wwwroot/
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/facr-wwwroot/
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@137.74.33.74:/usr/local/www/ott/facr-wwwroot/
+ BUILD_PATH=build_facr \
+ npm run build && cp -r .well-known build_facr
-lff-prod: clean
+lff-prod:
+ rm -rf build_lff && \
REACT_APP_TYPE=ott \
REACT_APP_ENV=production \
- REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW7v2lF8GGogrm7XaaICZ9CN876sITIBBauZgB2ommUTUOiY868jzpbhQjZcoBOjIRX5Vs54Aq00y4C3USyB \
+ REACT_APP_STRIPE_PK=pk_live_51J5TEYEDSxVnTgDW5XxhC6ntKZKddXgKHq5HOCDmJTdfSKluMYCdLHOcUA3Miuy8HesxG1eS4c0dQRQpMsEHRrQL00USpu5xIq \
REACT_APP_CLIENT=lff \
- npm run build
-
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@de.instat.tv:/usr/local/www/ott/lff-wwwroot/
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@fr.instat.tv:/usr/local/www/ott/lff-wwwroot/
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott@137.74.33.74:/usr/local/www/ott/lff-wwwroot/
+ BUILD_PATH=build_lff \
+ npm run build && cp -r .well-known build_lff
deploy-all: prod preprod facr-prod lff-prod
-stage: build-stage
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/wwwroot/
-
-a-stage: build-a
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/a-wwwroot/
-
-b-stage: build-b
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/b-wwwroot/
-
-c-stage: build-c
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/c-wwwroot/
-
-d-stage: build-d
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/d-wwwroot/
-
-e-stage: build-e
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/e-wwwroot/
-
-f-stage: build-f
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/f-wwwroot/
-
-g-stage: build-g
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/g-wwwroot/
-
-h-stage: build-h
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/h-wwwroot/
-
-i-stage: build-i
- rsync -zavP --delete-before build/ -e 'ssh -p 666' ott-staging@137.74.33.74:/usr/local/www/ott-staging/i-wwwroot/
-
test:
npm test
diff --git a/package.json b/package.json
index 2bcac2b3..9eba47e8 100644
--- a/package.json
+++ b/package.json
@@ -16,6 +16,8 @@
"test:auth": "REACT_APP_TYPE=auth-service react-scripts test",
"facr": "REACT_APP_CLIENT=facr react-scripts start",
"lff": "REACT_APP_CLIENT=lff react-scripts start",
+ "india": "REACT_APP_CLIENT=india react-scripts start",
+ "tunis": "REACT_APP_CLIENT=tunis react-scripts start",
"insports": "REACT_APP_CLIENT=insports react-scripts start"
},
"dependencies": {
diff --git a/public/images/matchTabs/bets.svg b/public/images/matchTabs/bets.svg
new file mode 100644
index 00000000..d112cddb
--- /dev/null
+++ b/public/images/matchTabs/bets.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/images/matchTabs/chat.svg b/public/images/matchTabs/chat.svg
new file mode 100644
index 00000000..02d75c4b
--- /dev/null
+++ b/public/images/matchTabs/chat.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/images/matchTabs/players.svg b/public/images/matchTabs/players.svg
new file mode 100644
index 00000000..ffa6cb02
--- /dev/null
+++ b/public/images/matchTabs/players.svg
@@ -0,0 +1,6 @@
+
diff --git a/public/images/matchTabs/plays.svg b/public/images/matchTabs/plays.svg
new file mode 100644
index 00000000..0850a8e7
--- /dev/null
+++ b/public/images/matchTabs/plays.svg
@@ -0,0 +1,4 @@
+
diff --git a/public/images/matchTabs/stats.svg b/public/images/matchTabs/stats.svg
new file mode 100644
index 00000000..12afb401
--- /dev/null
+++ b/public/images/matchTabs/stats.svg
@@ -0,0 +1,12 @@
+
diff --git a/public/images/matchTabs/watch.svg b/public/images/matchTabs/watch.svg
new file mode 100644
index 00000000..fdb9114f
--- /dev/null
+++ b/public/images/matchTabs/watch.svg
@@ -0,0 +1,3 @@
+
diff --git a/public/images/tunis-logo.svg b/public/images/tunis-logo.svg
new file mode 100644
index 00000000..9f66058e
--- /dev/null
+++ b/public/images/tunis-logo.svg
@@ -0,0 +1,29 @@
+
diff --git a/public/images/tunis_auth_logo.svg b/public/images/tunis_auth_logo.svg
new file mode 100644
index 00000000..1b26b37c
--- /dev/null
+++ b/public/images/tunis_auth_logo.svg
@@ -0,0 +1,36 @@
+
diff --git a/public/index.html b/public/index.html
index f73b0ba2..f2343432 100644
--- a/public/index.html
+++ b/public/index.html
@@ -54,14 +54,21 @@
id="ze-snippet"
src="https://static.zdassets.com/ekr/snippet.js?key=2f84e9fe-830c-42bf-afa4-32c90d7c5f7b"
>
-
+
-
+
<% } %>
diff --git a/run.sh b/run.sh
deleted file mode 100644
index 6b88230f..00000000
--- a/run.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-branch=$1
-composefile=$2
-
-cd /home/ubuntu/ott-auth
-docker-compose -f $composefile down
-docker-compose -f $composefile up -d
-echo "[>] Deployment done."
diff --git a/src/components/PictureInPicture/PiP.tsx b/src/components/PictureInPicture/PiP.tsx
index b56290c9..30f8661e 100644
--- a/src/components/PictureInPicture/PiP.tsx
+++ b/src/components/PictureInPicture/PiP.tsx
@@ -1,6 +1,7 @@
import {
memo,
RefObject,
+ useEffect,
} from 'react'
import styled from 'styled-components/macro'
@@ -15,10 +16,11 @@ const PipWrapper = styled.div`
`
type PipProps = {
+ isPlaying: boolean,
videoRef: RefObject,
}
-export const PiP = memo(({ videoRef }: PipProps) => {
+export const PiP = memo(({ isPlaying, videoRef }: PipProps) => {
const togglePip = async () => {
try {
if (
@@ -33,6 +35,20 @@ export const PiP = memo(({ videoRef }: PipProps) => {
}
}
+ useEffect(() => {
+ window.addEventListener('visibilitychange', async () => {
+ if (
+ document.hidden === true
+ && document.pictureInPictureEnabled
+ && videoRef.current !== document.pictureInPictureElement
+ && videoRef.current?.hidden === false
+ && isPlaying
+ ) {
+ await videoRef.current?.requestPictureInPicture()
+ }
+ })
+ }, [videoRef, isPlaying])
+
return (
diff --git a/src/components/SmartBanner/index.tsx b/src/components/SmartBanner/index.tsx
index 97f24a58..817341d4 100644
--- a/src/components/SmartBanner/index.tsx
+++ b/src/components/SmartBanner/index.tsx
@@ -1,6 +1,7 @@
import { Icon } from 'features/Icon'
import { add } from 'date-fns'
+import { isIOS } from 'config'
import {
ScBannerWrap,
@@ -38,7 +39,9 @@ export const SmartBanner = ({ setIsOpenDownload }: SmartBannerProps) => (
inSports – the Home of Sports Streaming
{
diff --git a/src/components/SportIcon/SportIcon.tsx b/src/components/SportIcon/SportIcon.tsx
index e28d1f7d..4a01f6fc 100644
--- a/src/components/SportIcon/SportIcon.tsx
+++ b/src/components/SportIcon/SportIcon.tsx
@@ -52,21 +52,23 @@ export const SportIcon = ({
sport,
}: Props) => {
const sportType = getSportLexic(sport)
- const IconSport = sportIcons[sportType].icon
+ const IconSport = sportIcons[sportType]?.icon
return (
-
+ {IconSport && (
+
+ )}
)
}
diff --git a/src/config/clients/index.tsx b/src/config/clients/index.tsx
index 72ddd498..f6835d60 100644
--- a/src/config/clients/index.tsx
+++ b/src/config/clients/index.tsx
@@ -4,6 +4,8 @@ import { facr } from './facr'
import { instat } from './instat'
import { lff } from './lff'
import { insports } from './insports'
+import { india } from './india'
+import { tunis } from './tunis'
export const currentClient = process.env.REACT_APP_CLIENT || 'insports'
@@ -11,12 +13,16 @@ export const isLffClient = currentClient === 'lff'
export const isInSportsClient = currentClient === 'insports'
export const isInstatClient = currentClient === 'instat'
export const isFacrClient = currentClient === 'facr'
+export const isIndiaClient = currentClient === 'india'
+export const isTunisClient = currentClient === 'tunis'
const clients = {
facr,
+ india,
insports,
instat,
lff,
+ tunis,
}
export const client: ClientConfig = clients[currentClient]
diff --git a/src/config/clients/india.tsx b/src/config/clients/india.tsx
new file mode 100644
index 00000000..0eac3a13
--- /dev/null
+++ b/src/config/clients/india.tsx
@@ -0,0 +1,16 @@
+import {
+ ClientConfig,
+ ClientIds,
+ ClientNames,
+} from './types'
+
+import { insports } from './insports'
+
+export const india: ClientConfig = {
+ ...insports,
+ about_the_project: 'https://prsolution.pro',
+ auth: {
+ clientId: ClientIds.India,
+ },
+ name: ClientNames.India,
+}
diff --git a/src/config/clients/insports.tsx b/src/config/clients/insports.tsx
index ec1258c0..95bb14cb 100644
--- a/src/config/clients/insports.tsx
+++ b/src/config/clients/insports.tsx
@@ -15,6 +15,7 @@ export const insports: ClientConfig = {
name: ClientNames.Insports,
privacyLink: '/privacy-policy-and-statement?client_id=insports-ott-web',
showSearch: true,
+ showSmartBanner: true,
styles: {
background: 'background-image: url(/images/Checker.png);',
logo: 'insports-logo.svg',
diff --git a/src/config/clients/tunis.tsx b/src/config/clients/tunis.tsx
new file mode 100644
index 00000000..6764be26
--- /dev/null
+++ b/src/config/clients/tunis.tsx
@@ -0,0 +1,57 @@
+import { css } from 'styled-components/macro'
+
+import {
+ ClientConfig,
+ ClientIds,
+ ClientNames,
+} from './types'
+
+const randomHash = () => (
+ (Math.random() ** Math.random()) * 9999999999999999
+)
+
+export const tunis: ClientConfig = {
+ auth: {
+ clientId: ClientIds.Tunis,
+ metaDataUrlParams: `?hash=${randomHash()}`,
+ },
+ defaultLanguage: 'fr',
+ description: 'Live sports streaming platform. All matches playing under the auspices of Czech Republic FA. Access to full matches, various player playlists, and highlights. Free access in the Czech Republic. Available across all devices',
+ disabledPreferences: false,
+ name: ClientNames.Tunis,
+ privacyLink: '/privacy-policy-and-statement',
+ showSearch: false,
+ styles: {
+ background: '',
+ homePageHeader: css`
+ background: radial-gradient(
+ 160.34% 257.27% at -7.45% 162.22%,
+ #2AB7AA 3.27%,
+ #02505C 43.69%, #0B2E4D 100%);
+ `,
+ logo: 'tunis-logo.svg',
+ logoHeight: 6.3,
+ logoLeft: 1.1,
+ logoTop: 1.74,
+ logoWidth: 8.25,
+ matchLogoHeight: 3.4,
+ matchLogoTopMargin: 0.9,
+ matchLogoWidth: 4.5,
+ matchPageMobileHeaderLogo: css`
+ width: 35px;
+ height: 25px;
+ top: 2px;
+ `,
+ mobileHeaderLogo: css`
+ width: 48px;
+ height: 37px;
+ `,
+ userAccountLogo: css`
+ width: 4.56rem;
+ height: 3.488rem;
+ `,
+ },
+ termsLink: '/terms-and-conditions?client_id=facr-ott-web',
+ title: 'FACR.TV - The home of Czech football streaming',
+ userAccountLinksDisabled: true,
+}
diff --git a/src/config/clients/types.tsx b/src/config/clients/types.tsx
index 9cdaca4f..77f01e9b 100644
--- a/src/config/clients/types.tsx
+++ b/src/config/clients/types.tsx
@@ -6,19 +6,24 @@ type StyledCss = ReturnType
export enum ClientIds {
Facr = 'facr-ott-web',
+ India = 'india-ott-web',
Insports = 'insports-ott-web',
Instat = 'ott-web',
Lff = 'lff-ott-web',
+ Tunis = 'tunis-ott-web',
}
export enum ClientNames {
Facr = 'facr',
+ India = 'india',
Insports = 'insports',
Instat = 'instat',
Lff = 'lff',
+ Tunis = 'tunis',
}
export type ClientConfig = {
+ about_the_project?: string,
auth: {
clientId: ClientIds,
metaDataUrlParams?: string,
@@ -30,6 +35,7 @@ export type ClientConfig = {
privacyLink: string,
requests?: Record,
showSearch?: boolean,
+ showSmartBanner?: boolean,
styles: {
background?: string,
homePageHeader?: StyledCss,
diff --git a/src/config/env.tsx b/src/config/env.tsx
index ebe71c86..f0c0b415 100644
--- a/src/config/env.tsx
+++ b/src/config/env.tsx
@@ -16,7 +16,7 @@ export const isProduction = ENV === 'production' || ENV === 'preproduction'
export const stageENV = process.env.REACT_APP_STAGE || 'test'
-export const STRIPE_PUBLIC_KEY = process.env.REACT_APP_STRIPE_PK || 'pk_test_51J5TEYEDSxVnTgDWhKLstuDAhx9XmGJmj2awyZ1HghpWdU46MhXqbQt1PyW9XsRlES5JFyuQWbPRjoSsiW3wvXOH00KMirJEGZ'
+export const STRIPE_PUBLIC_KEY = process.env.REACT_APP_STRIPE_PK || 'pk_test_51J5TEYEDSxVnTgDWyF63HykCAwKKObIdYCKiCwotte7xvfPw0VhmZiQKzYJIgZ3tCVvQ57JNpGYN7YbxR4JckYUB00HeDWE4YR'
export const GOOGLE_CLIENT_ID = process.env.REACT_APP_GOOGLE_CLIENT_ID || '1043133237396-kebgih109kro71b5c7c8qphtgjbd2gdk.apps.googleusercontent.com'
export const FACEBOOK_CLIENT_ID = process.env.REACT_APP_FACEBOOK_CLIENT_ID || '798254931203361'
diff --git a/src/config/lexics/indexLexics.tsx b/src/config/lexics/indexLexics.tsx
index 5d6e1344..545eea28 100644
--- a/src/config/lexics/indexLexics.tsx
+++ b/src/config/lexics/indexLexics.tsx
@@ -9,8 +9,12 @@ const matchPopupLexics = {
apply: 13491,
choose_fav_team: 19776,
commentators: 15424,
+ current_stats: 19592,
+ display_all_stats: 19932,
+ display_stats_according_to_video: 19931,
episode_duration: 13410,
events: 1020,
+ final_stats: 19591,
from_end_match: 15396,
from_price: 3992,
from_start_match: 15395,
@@ -22,6 +26,7 @@ const matchPopupLexics = {
match_interviews: 13031,
match_settings: 13490,
no_data: 15397,
+ others: 19902,
players_episodes: 13398,
playlist_format: 13406,
playlist_format_all_actions: 13408,
@@ -31,6 +36,7 @@ const matchPopupLexics = {
sec_before: 13411,
selected_player_actions: 13413,
started_streaming_at: 16042,
+ stats: 18179,
streamed_live_on: 16043,
video: 1017,
views: 13440,
@@ -158,6 +164,7 @@ export const indexLexics = {
no_match_access_body: 13419,
no_match_access_title: 13418,
player: 14975,
+ players: 164,
players_video: 13032,
privacy_policy_and_statement: 15404,
round_highilights: 13050,
diff --git a/src/config/routes.tsx b/src/config/routes.tsx
index 8a397573..178b420b 100644
--- a/src/config/routes.tsx
+++ b/src/config/routes.tsx
@@ -5,20 +5,27 @@ import { ENV, isProduction } from './env'
export const APIS = {
preproduction: {
api: 'https://api.insports.tv',
- auth: 'https://api.auth.insports.tv',
+ auth: 'https://auth.insports.tv',
},
production: {
api: 'https://api.insports.tv',
- auth: 'https://api.auth.insports.tv',
+ auth: 'https://auth.insports.tv',
},
staging: {
api: 'https://api.test.insports.tv',
- auth: 'https://api.auth.test.insports.tv',
+ auth: 'https://auth.test.insports.tv',
},
}
+const VIEWS_APIS = {
+ preproduction: 'https://views.insports.tv',
+ production: 'https://views.insports.tv',
+ staging: 'https://views.test.insports.tv',
+}
+
const env = isProduction ? ENV : readSelectedApi() ?? ENV
+export const VIEWS_API = VIEWS_APIS[env]
export const AUTH_SERVICE = APIS[env].auth
export const API_ROOT = APIS[env].api
export const DATA_URL = `${API_ROOT}/data`
diff --git a/src/config/userAgent.tsx b/src/config/userAgent.tsx
index b0405c07..15dcc250 100644
--- a/src/config/userAgent.tsx
+++ b/src/config/userAgent.tsx
@@ -1,3 +1,5 @@
export const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent)
+export const isAndroid = /Android/.test(navigator.userAgent)
+
export const isMobileDevice = /iPhone|Android/.test(navigator.userAgent)
diff --git a/src/features/AuthServiceApp/components/ConfirmPopup/styled.tsx b/src/features/AuthServiceApp/components/ConfirmPopup/styled.tsx
index 1123334b..91a89512 100644
--- a/src/features/AuthServiceApp/components/ConfirmPopup/styled.tsx
+++ b/src/features/AuthServiceApp/components/ConfirmPopup/styled.tsx
@@ -11,6 +11,8 @@ import {
HeaderTitle,
} from 'features/AuthServiceApp/components/RegisterPopup/styled'
+import { client } from '../../config/clients/index'
+
export const Modal = styled(BaseModal)`
${ModalWindow} {
min-height: 220px;
@@ -59,6 +61,7 @@ export const ScApplyButton = styled(ApplyButton)`
font-size: 14px;
`
: ''};
+ ${client.styles.popupApplyButton}
`
export const ScLink = styled.a`
diff --git a/src/features/AuthServiceApp/components/RegisterPopup/index.tsx b/src/features/AuthServiceApp/components/RegisterPopup/index.tsx
index 8aef84d2..6d8d78b5 100644
--- a/src/features/AuthServiceApp/components/RegisterPopup/index.tsx
+++ b/src/features/AuthServiceApp/components/RegisterPopup/index.tsx
@@ -25,11 +25,6 @@ export const RegisterPopup = (props: Props) => {
isModalOpen,
} = props
- // const handleNewConfirmation = () => {
- // // TODO дописать логику для отправки доп. письма, может понадобится, когда допишут бэк
- // // console.log('send new confirmation')
- // }
-
return (
@@ -53,9 +48,6 @@ export const RegisterPopup = (props: Props) => {