[mirotalksfu] - refactoring, update dep
هذا الالتزام موجود في:
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -209,7 +209,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -201,7 +201,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/monolith.min.css" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/themes/nano.min.css" />
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
|
||||
<!-- Modern or es5 bundle -->
|
||||
<script defer src="https://cdn.jsdelivr.net/npm/@simonwep/pickr/dist/pickr.min.js"></script>
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<script async src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
|
||||
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<!-- Js scripts https://cdn.jsdelivr.net -->
|
||||
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -178,7 +178,7 @@
|
||||
</div>
|
||||
</footer>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -42,14 +42,16 @@
|
||||
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=IBM+Plex+Sans:400,600" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" />
|
||||
<link rel="stylesheet" href="../css/landing.css" />
|
||||
<!-- <link rel="stylesheet" href="../css/Snow.css" /> -->
|
||||
|
||||
<!-- Snow effects -->
|
||||
|
||||
<!-- <link rel="stylesheet" href="../css/Snow.css" />
|
||||
<script async src="../js/scripts/Snow.js"></script> -->
|
||||
|
||||
<!-- Js scripts -->
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
|
||||
<!-- <script async src="../js/Snow.js"></script> -->
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/npm/xss/dist/xss.min.js"></script>
|
||||
@@ -137,61 +139,16 @@
|
||||
<button
|
||||
id="genRoomButton"
|
||||
class="button button-primary br-6 mr-8 mb-8 fas fa-arrows-rotate"
|
||||
onclick="genRoom()"
|
||||
></button>
|
||||
<button
|
||||
id="joinRoomButton"
|
||||
class="button button-primary pulse"
|
||||
onclick="joinRoom()"
|
||||
>
|
||||
<button id="joinRoomButton" class="button button-primary pulse">
|
||||
Join Room
|
||||
</button>
|
||||
<script>
|
||||
document.getElementById('roomName').onkeyup = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
joinRoom();
|
||||
}
|
||||
};
|
||||
function genRoom() {
|
||||
document.getElementById('roomName').value = getUUID4();
|
||||
}
|
||||
function getUUID4() {
|
||||
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
||||
(
|
||||
c ^
|
||||
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))
|
||||
).toString(16),
|
||||
);
|
||||
}
|
||||
function joinRoom() {
|
||||
const roomName = filterXSS(document.getElementById('roomName').value);
|
||||
if (roomName) {
|
||||
window.location.href = '/join/' + roomName;
|
||||
window.localStorage.lastRoom = roomName;
|
||||
} else {
|
||||
alert('Room name empty!\nPlease pick a room name.');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lastRoomContainer" class="last-room">
|
||||
<span>Your recent room:</span>
|
||||
<a id="lastRoom"></a>
|
||||
</div>
|
||||
<script>
|
||||
const lastRoomContainer = document.getElementById('lastRoomContainer');
|
||||
const lastRoom = document.getElementById('lastRoom');
|
||||
const lastRoomName = window.localStorage.lastRoom
|
||||
? window.localStorage.lastRoom
|
||||
: '';
|
||||
if (lastRoomName) {
|
||||
lastRoomContainer.style.display = 'inline-flex';
|
||||
lastRoom.setAttribute('href', '/join/' + lastRoomName);
|
||||
lastRoom.innerText = lastRoomName;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -442,7 +399,7 @@
|
||||
</li>
|
||||
<li class="reveal-from-left" data-reveal-delay="450">
|
||||
<div class="clients-logo">
|
||||
<a style="cursor: pointer" onclick="adultContent()"
|
||||
<a id="adultCnt" style="cursor: pointer"
|
||||
><img
|
||||
class="clients-size-logo"
|
||||
src="../sponsors/LuvLounge.png"
|
||||
@@ -450,17 +407,6 @@
|
||||
/></a>
|
||||
</div>
|
||||
</li>
|
||||
<script>
|
||||
function adultContent() {
|
||||
if (
|
||||
confirm(
|
||||
'18+ WARNING! ADULTS ONLY!\n\nExplicit material for viewing by adults 18 years of age or older. You must be at least 18 years old to access to this site!\n\nProceeding you are agree and confirm to have 18+ year.',
|
||||
)
|
||||
) {
|
||||
window.open('https://luvlounge.ca', '_blank');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<li class="reveal-from-left" data-reveal-delay="600">
|
||||
<div class="clients-logo">
|
||||
<a href="https://www.questionpro.com" target="_blank"
|
||||
@@ -630,8 +576,8 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/newRoom.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script defer src="../js/scripts/Common.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -121,94 +121,6 @@
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
console.log(window.location);
|
||||
|
||||
const usernameInput = document.getElementById('username');
|
||||
const passwordInput = document.getElementById('password');
|
||||
const loginBtn = document.getElementById('loginButton');
|
||||
|
||||
usernameInput.onkeyup = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
login();
|
||||
}
|
||||
};
|
||||
passwordInput.onkeyup = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
login();
|
||||
}
|
||||
};
|
||||
|
||||
loginBtn.onclick = (e) => {
|
||||
login();
|
||||
};
|
||||
|
||||
function login() {
|
||||
const username = filterXSS(document.getElementById('username').value);
|
||||
const password = filterXSS(document.getElementById('password').value);
|
||||
|
||||
// http://localhost:3010/join/?room=test
|
||||
// http://localhost:3010/join/?room=test&roomPassword=0&name=mirotalksfu&audio=0&video=0&screen=0¬ify=0
|
||||
// http://localhost:3010/join/?room=test&roomPassword=0&name=mirotalksfu&audio=0&video=0&screen=0¬ify=0&username=username&password=password
|
||||
|
||||
const qs = new URLSearchParams(window.location.search);
|
||||
const room = filterXSS(qs.get('room'));
|
||||
|
||||
// http://localhost:3010/join/test
|
||||
const pathParts = window.location.pathname.split('/');
|
||||
const roomPath = pathParts[pathParts.length - 1];
|
||||
|
||||
if (username && password) {
|
||||
axios
|
||||
.post('/login', {
|
||||
username: username,
|
||||
password: password,
|
||||
})
|
||||
.then(function (response) {
|
||||
console.log(response);
|
||||
|
||||
// Store in session
|
||||
const token = response.data.message;
|
||||
window.sessionStorage.peer_token = token;
|
||||
|
||||
if (room) {
|
||||
return (window.location.href =
|
||||
'/join/' + window.location.search);
|
||||
/*
|
||||
return (window.location.href =
|
||||
'/join/?room=' + room + '&token=' + token); */
|
||||
}
|
||||
if (roomPath) {
|
||||
return (window.location.href = '/join/' + roomPath);
|
||||
/*
|
||||
return (window.location.href =
|
||||
'/join/?room=' + roomPath + '&token=' + token); */
|
||||
}
|
||||
|
||||
return (window.location.href = '/logged');
|
||||
})
|
||||
.catch(function (error) {
|
||||
console.error(error);
|
||||
alert('Unauthorized');
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!username && !password) {
|
||||
alert('Username and Password required');
|
||||
return;
|
||||
}
|
||||
if (!username) {
|
||||
alert('Username required');
|
||||
return;
|
||||
}
|
||||
if (!password) {
|
||||
alert('Password required');
|
||||
return;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
<div class="hero-figure anime-element">
|
||||
<svg class="placeholder" width="528" height="396" viewBox="0 0 528 396">
|
||||
@@ -325,7 +237,8 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Login.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -45,8 +45,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -137,61 +137,16 @@
|
||||
<button
|
||||
id="genRoomButton"
|
||||
class="button button-primary br-6 mr-8 mb-8 fas fa-arrows-rotate"
|
||||
onclick="genRoom()"
|
||||
></button>
|
||||
<button
|
||||
id="joinRoomButton"
|
||||
class="button button-primary pulse"
|
||||
onclick="joinRoom()"
|
||||
>
|
||||
<button id="joinRoomButton" class="button button-primary pulse">
|
||||
Join Room
|
||||
</button>
|
||||
<script>
|
||||
document.getElementById('roomName').onkeyup = (e) => {
|
||||
if (e.keyCode === 13) {
|
||||
e.preventDefault();
|
||||
joinRoom();
|
||||
}
|
||||
};
|
||||
function genRoom() {
|
||||
document.getElementById('roomName').value = getUUID4();
|
||||
}
|
||||
function getUUID4() {
|
||||
return ([1e7] + -1e3 + -4e3 + -8e3 + -1e11).replace(/[018]/g, (c) =>
|
||||
(
|
||||
c ^
|
||||
(crypto.getRandomValues(new Uint8Array(1))[0] & (15 >> (c / 4)))
|
||||
).toString(16),
|
||||
);
|
||||
}
|
||||
function joinRoom() {
|
||||
const roomName = filterXSS(document.getElementById('roomName').value);
|
||||
if (roomName) {
|
||||
window.location.href = '/join/' + roomName;
|
||||
window.localStorage.lastRoom = roomName;
|
||||
} else {
|
||||
alert('Room name empty!\nPlease pick a room name.');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
<div id="lastRoomContainer" class="last-room">
|
||||
<span>Your recent room:</span>
|
||||
<a id="lastRoom"></a>
|
||||
</div>
|
||||
<script>
|
||||
const lastRoomContainer = document.getElementById('lastRoomContainer');
|
||||
const lastRoom = document.getElementById('lastRoom');
|
||||
const lastRoomName = window.localStorage.lastRoom
|
||||
? window.localStorage.lastRoom
|
||||
: '';
|
||||
if (lastRoomName) {
|
||||
lastRoomContainer.style.display = 'inline-flex';
|
||||
lastRoom.setAttribute('href', '/join/' + lastRoomName);
|
||||
lastRoom.innerText = lastRoomName;
|
||||
}
|
||||
</script>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -293,8 +248,8 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/newRoom.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script defer src="../js/scripts/Common.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -91,16 +91,6 @@
|
||||
This app will not work without camera or microphone access. Please try again and
|
||||
allow it.
|
||||
</p>
|
||||
<script>
|
||||
let qs = new URLSearchParams(window.location.search);
|
||||
let room_id = filterXSS(qs.get('room_id'));
|
||||
let message = filterXSS(qs.get('message'));
|
||||
console.log('Allow Camera or Audio', {
|
||||
room_id: room_id,
|
||||
message: message,
|
||||
});
|
||||
document.getElementById('message').innerHTML = message;
|
||||
</script>
|
||||
<div class="hero-cta">
|
||||
<a
|
||||
class="button button-primary pulse"
|
||||
@@ -224,7 +214,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -44,8 +44,8 @@
|
||||
|
||||
<!-- Js scripts -->
|
||||
|
||||
<script defer src="../js/Brand.js"></script>
|
||||
<script async src="../js/Umami.js"></script>
|
||||
<script defer src="../js/scripts/Brand.js"></script>
|
||||
<script async src="../js/scripts/Umami.js"></script>
|
||||
|
||||
<script src="https://unpkg.com/animejs@3.0.1/lib/anime.min.js"></script>
|
||||
<script src="https://unpkg.com/scrollreveal@4.0.0/dist/scrollreveal.min.js"></script>
|
||||
@@ -217,7 +217,7 @@
|
||||
</footer>
|
||||
</div>
|
||||
|
||||
<script defer src="../js/landing.js"></script>
|
||||
<script defer src="../js/scripts/Landing.js"></script>
|
||||
<script async defer src="https://buttons.github.io/buttons.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
المرجع في مشكلة جديدة
حظر مستخدم