massive UwU fixes & updates

when login lasd sids is logged out, added cache for images they are being save to local storage when loaded, added reload for dragging elements when resizing the window or zooming the page, updated logging function, added local and cloud saving, loading for project, updated project preview image saving, updated object loading,  updated sid cleaning. i did it all in one day OWO. thats it Uwu
This commit is contained in:
2023-07-04 04:11:17 +05:00
parent 204318ef88
commit 1f5085490f
12 changed files with 365 additions and 253 deletions

View File

@ -1,48 +1,23 @@
<div class="scale_block">
<div>
oh no html breaking! <br>
please don't use custom scale for this window
</div>
</div>
</body>
</html>
<script>
if(document.title == "login"){
console.log(document.title);
log_by_sid();
}else if(document.title != "login"){
check_sid(true);
console.log("check");
function hide_menus(){
let menus = document.getElementsByClassName("cmenu");
Object.entries(menus).forEach(([key,menu]) => {
menu.style.display = "none";
});
}
</script>
<script>
px_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
// console.log(px_ratio);
isZooming();
$(window).resize(function(){isZooming();});
function isZooming(){
var newPx_ratio = window.devicePixelRatio || window.screen.availWidth / document.documentElement.clientWidth;
if(newPx_ratio != px_ratio){
px_ratio = newPx_ratio;
// console.log(px_ratio);
if (px_ratio != 1){
// console.log("zooming");
document.getElementsByClassName("scale_block")[0].style.display = "block";
}
else{
document.getElementsByClassName("scale_block")[0].style.display = "none";
}
return true;
}else{
// console.log("just resizing");
if (px_ratio != 1){
document.getElementsByClassName("scale_block")[0].style.display = "block";
}
else{
document.getElementsByClassName("scale_block")[0].style.display = "none";
}
return false;
}
hide_menus();
oncontextmenu = (e) => {
e.preventDefault()
}
$(window).focus(function(){
if(document.title == "login"){
console.log(document.title);
log_by_sid();
}else if(document.title != "login"){
check_sid(true);
console.log("check");
}
});
</script>

View File

@ -1,10 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<script src="/lib/fn.js"></script>
<!-- <script src="/lib/interact.min.js"></script> -->
<script src="/lib/jquery.js"></script>
<script src="/lib/jquery.cookie.js"></script>
<script src="/lib/fn.js"></script>
<script src="/lib/ejs.js"></script>
<script src="/lib/aes.js"></script>
<meta charset="UTF-8">
@ -19,29 +19,15 @@
html{
background-color:aliceblue;
}
.scale_block{
display: none;
top: 0px;
left: 0px;
background-color:rgb(47, 47, 47);
width: 100vw;
height: 100vh;
/* line-height: 100vh; */
text-align: center;
position: absolute;
z-index: 100;
font-size: 4vw;
filter: opacity(99.8%);
/* filter: blur(1px); */
backdrop-filter: blur(10px);
}
.scale_block div{
position: absolute;
top: 50vh;
left: 50vw;
transform: translate(-50%, -50%);
width: 100vw;
}
</style>
<script>
if(document.title == "login"){
console.log(document.title);
log_by_sid();
}else if(document.title != "login"){
check_sid(true);
console.log("check");
}
</script>
</head>
<body>