добавлен 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.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">
<title>React App</title>
<title>GRAFF Interactive | Remote Demonstration</title>
</head>
<body>
<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" }');
return true
} catch {
alert('Что то пошло не так, повторите позже')
return false
}
}
function connectSess(port?: string) {
if(port) {
window.open('http://' + ConnectData.pixelIp + ":" + port, '_blank');
// window.open('http://' + ConnectData.pixelIp + ":" + port, '_blank');
window.location.href= 'http://' + ConnectData.pixelIp + ":" + port;
} else {
window.open('http://' + ConnectData.pixelIp + ":" + portAndId.current.port, '_blank');
}
+6 -2
View File
@@ -84,6 +84,10 @@
cursor: pointer;
}
.popup-title-input-back-button:hover {
opacity: .7;
}
@media screen and (min-width: 2000px) {
.popup-container {
width: 25%;
@@ -144,8 +148,8 @@
}
.popup-logo {
width: 166px;
height: 48px;
width: 239px;
height: 70px;
}
.popup-title-button-title {
+1 -1
View File
@@ -13,7 +13,7 @@ type TProps = {
}
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
? <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";
type TProps = {
createSess: () => void,
createSess: () => boolean,
// connectSess: () => void
connectSess: (accessCode: string) => void
}
@@ -104,7 +104,10 @@ export const MainPart: React.FC<TProps> = React.memo((props) => {
}
function onClickCreateNewDemo() {
props.createSess();
if(!props.createSess()) {
return
}
changeContentFunc();
setCurrentContent(
<ContentContainer