добавлен favicon, title страницы, fix connect to stream, fix padding popup

This commit is contained in:
DmitriyB
2022-08-05 16:26:00 +05:00
parent 592c80fe2c
commit dce012dcb6
7 changed files with 23 additions and 8 deletions
Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

+1 -1
View File
@@ -30,7 +30,7 @@
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap" rel="stylesheet">
<title>React App</title> <title>GRAFF Interactive | Remote Demonstration</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
+10 -2
View File
@@ -70,13 +70,21 @@ function App() {
} }
}, []); }, []);
function createSess() { function createSess() {
try{
ws.send('{ "message" : "NEW_SESS" }'); ws.send('{ "message" : "NEW_SESS" }');
return true
} catch {
alert('Что то пошло не так, повторите позже')
return false
}
} }
function connectSess(port?: string) { function connectSess(port?: string) {
if(port) { if(port) {
window.open('http://' + ConnectData.pixelIp + ":" + port, '_blank'); // window.open('http://' + ConnectData.pixelIp + ":" + port, '_blank');
window.location.href= 'http://' + ConnectData.pixelIp + ":" + port;
} else { } else {
window.open('http://' + ConnectData.pixelIp + ":" + portAndId.current.port, '_blank'); window.open('http://' + ConnectData.pixelIp + ":" + portAndId.current.port, '_blank');
} }
+6 -2
View File
@@ -84,6 +84,10 @@
cursor: pointer; cursor: pointer;
} }
.popup-title-input-back-button:hover {
opacity: .7;
}
@media screen and (min-width: 2000px) { @media screen and (min-width: 2000px) {
.popup-container { .popup-container {
width: 25%; width: 25%;
@@ -144,8 +148,8 @@
} }
.popup-logo { .popup-logo {
width: 166px; width: 239px;
height: 48px; height: 70px;
} }
.popup-title-button-title { .popup-title-button-title {
+1 -1
View File
@@ -13,7 +13,7 @@ type TProps = {
} }
export const Popup:React.FC<TProps> = React.memo((props) => { export const Popup:React.FC<TProps> = React.memo((props) => {
return <div className="popup-container"> return <div className="popup-container" style={{padding: props.type === "title-input-button" ? '48px 48px 26px 48px' : ''}}>
{ {
props.logo props.logo
? <img className="popup-logo" alt="logo" src={props.logo} /> ? <img className="popup-logo" alt="logo" src={props.logo} />
+5 -2
View File
@@ -14,7 +14,7 @@ import { ContextLang } from "../ContextLang";
import { ContextWs } from "../../ContextWs"; import { ContextWs } from "../../ContextWs";
type TProps = { type TProps = {
createSess: () => void, createSess: () => boolean,
// connectSess: () => void // connectSess: () => void
connectSess: (accessCode: string) => void connectSess: (accessCode: string) => void
} }
@@ -104,7 +104,10 @@ export const MainPart: React.FC<TProps> = React.memo((props) => {
} }
function onClickCreateNewDemo() { function onClickCreateNewDemo() {
props.createSess(); if(!props.createSess()) {
return
}
changeContentFunc(); changeContentFunc();
setCurrentContent( setCurrentContent(
<ContentContainer <ContentContainer