forked from olcxjas-softworks/LarpixClient
Add test mobile ui
This commit is contained in:
parent
d29c5eea74
commit
34ddd1d507
8 changed files with 356 additions and 190 deletions
|
|
@ -53,7 +53,6 @@
|
|||
</button>
|
||||
</sidebarelement>
|
||||
</sidebar>
|
||||
|
||||
<sidebar class="second" id="roomsbar">
|
||||
<roomtopbar>
|
||||
<blah>title.home</blah>
|
||||
|
|
@ -112,7 +111,7 @@
|
|||
async function start() {
|
||||
updateLoadingStatus("loading.loading");
|
||||
try {
|
||||
switchRoomContent("title.splash", splashScreen, false);
|
||||
switchRoomContent("title.splash", splashScreen, false, "", true);
|
||||
if (host != null)
|
||||
{
|
||||
await updateProtocolAndUrl(host);
|
||||
|
|
@ -121,7 +120,6 @@
|
|||
{
|
||||
await updateProtocolAndUrl(window.location.hostname);
|
||||
}
|
||||
|
||||
sidebarPfp.src = await getAvatarUrl(username);
|
||||
|
||||
showAction("Authenticating...", "startauth");
|
||||
|
|
@ -179,7 +177,6 @@
|
|||
async function createGroup() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="main.js"></script>
|
||||
<script src="userscript.js"></script>
|
||||
|
|
@ -685,16 +685,17 @@ function showFixedContextMenu(rect, html) {
|
|||
|
||||
fixedContextMenu.classList.add("show");
|
||||
}
|
||||
async function switchRoomContent(title, content, showRoomBar, icon = "")
|
||||
async function switchRoomContent(title, content, showRoomBar, icon = "", skipMobileSlide = false)
|
||||
{
|
||||
roomContentMain.style.transform = "scale(0.85)";
|
||||
roomContentMain.style.opacity = "0";
|
||||
await delay(200);
|
||||
let backBtnHtml = `<button class="mobile-nav-btn" onclick="mobileNavBack()"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg></button>`;
|
||||
let detailsBtnHtml = showRoomBar ? `<button class="mobile-nav-btn right" onclick="mobileNavDetails()"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>` : '';
|
||||
|
||||
roomTopBar.innerHTML = `${icon}<space></space><inherit>${processBlah(title)}</inherit>`
|
||||
roomTopBar.innerHTML = `${backBtnHtml}${icon}<space></space><inherit>${processBlah(title)}</inherit><div class="flex-spacer"></div>${detailsBtnHtml}`;
|
||||
roomDetailsBar.style.display = showRoomBar ? "flex" : "none";
|
||||
|
||||
//content blah parsing
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(content, "text/html");
|
||||
|
||||
|
|
@ -714,14 +715,18 @@ async function switchRoomContent(title, content, showRoomBar, icon = "")
|
|||
let value = placeholders[i].placeholder.split("{blah(")[1].split(")}")[0];
|
||||
placeholders[i].placeholder = processBlah(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
roomContentMain.innerHTML = doc.body.innerHTML;
|
||||
|
||||
|
||||
roomContentMain.style.transform = "";
|
||||
roomContentMain.style.opacity = "";
|
||||
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
if (window.innerWidth <= 52 * rem && !skipMobileSlide) {
|
||||
mainScreen.classList.remove('mobile-details');
|
||||
mainScreen.classList.add('mobile-content');
|
||||
}
|
||||
}
|
||||
collapseDmsBtn.addEventListener("click", () => {
|
||||
collapseDmsBtn.classList.toggle("collapsed");
|
||||
|
|
@ -799,32 +804,44 @@ function setActiveSidebarIndicator(element, skipDisabling = false)
|
|||
element.classList.add("active");
|
||||
}
|
||||
|
||||
/* replaced with css
|
||||
sidebarHomeButton.addEventListener("mouseenter", () => {
|
||||
sidebarHomeIndicator.classList.add("hover");
|
||||
function mobileNavBack() {
|
||||
if(mainScreen.classList.contains('mobile-details')) {
|
||||
mainScreen.classList.remove('mobile-details');
|
||||
mainScreen.classList.add('mobile-content');
|
||||
} else {
|
||||
mainScreen.classList.remove('mobile-content');
|
||||
}
|
||||
}
|
||||
function mobileNavDetails() {
|
||||
mainScreen.classList.add('mobile-details');
|
||||
}
|
||||
let touchStartX = 0;
|
||||
let touchEndX = 0;
|
||||
let touchStartY = 0;
|
||||
let touchEndY = 0;
|
||||
document.addEventListener('touchstart', e => {
|
||||
touchStartX = e.changedTouches[0].screenX;
|
||||
touchStartY = e.changedTouches[0].screenY;
|
||||
});
|
||||
sidebarHomeButton.addEventListener("mouseleave", () => {
|
||||
sidebarHomeIndicator.classList.remove("hover");
|
||||
document.addEventListener('touchend', e => {
|
||||
touchEndX = e.changedTouches[0].screenX;
|
||||
touchEndY = e.changedTouches[0].screenY;
|
||||
handleMobileSwipe();
|
||||
});
|
||||
function handleMobileSwipe() {
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
if (window.innerWidth > 52 * rem) return;
|
||||
|
||||
sidebarAddButton.addEventListener("mouseenter", () => {
|
||||
sidebarAddIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarAddButton.addEventListener("mouseleave", () => {
|
||||
sidebarAddIndicator.classList.remove("hover");
|
||||
});
|
||||
let diffX = touchEndX - touchStartX;
|
||||
let diffY = touchEndY - touchStartY;
|
||||
|
||||
sidebarProfileButton.addEventListener("mouseenter", () => {
|
||||
sidebarProfileIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarProfileButton.addEventListener("mouseleave", () => {
|
||||
sidebarProfileIndicator.classList.remove("hover");
|
||||
});
|
||||
|
||||
sidebarInboxButton.addEventListener("mouseenter", () => {
|
||||
sidebarInboxIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarInboxButton.addEventListener("mouseleave", () => {
|
||||
sidebarInboxIndicator.classList.remove("hover");
|
||||
});
|
||||
*/
|
||||
if (Math.abs(diffX) > Math.abs(diffY) && Math.abs(diffX) > 60) {
|
||||
if (diffX > 0) {
|
||||
mobileNavBack();
|
||||
} else {
|
||||
if (mainScreen.classList.contains('mobile-content') && roomDetailsBar.style.display !== 'none') {
|
||||
mobileNavDetails();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,6 @@ loading {
|
|||
user-select: none !important;
|
||||
-webkit-user-drag: none !important;
|
||||
}
|
||||
|
||||
button, input {
|
||||
border-radius: 0.8rem;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
|
|
@ -181,7 +180,6 @@ sidebar.second {
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.collapse-text-button {
|
||||
padding-left: calc(var(--button-margin) + 0.2rem);
|
||||
flex-shrink: 0;
|
||||
|
|
@ -192,16 +190,13 @@ sidebar.second {
|
|||
font-weight: 600;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.collapse-text-button .chevron {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.collapse-text-button.collapsed .chevron {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.add-action-button {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
|
|
@ -212,7 +207,6 @@ sidebar.second {
|
|||
justify-content: center;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.add-action-button svg {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
|
|
@ -225,8 +219,6 @@ hr {
|
|||
width: 60%;
|
||||
margin-left: 20%;
|
||||
}
|
||||
|
||||
|
||||
#notification-container {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
position: fixed;
|
||||
|
|
@ -240,12 +232,10 @@ hr {
|
|||
pointer-events: none;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: rgba(255, 255, 255, 0.015);
|
||||
backdrop-filter: blur(1.2rem);
|
||||
-webkit-backdrop-filter: blur(1.2rem);
|
||||
|
||||
border: var(--border-width) solid var(--light-border-color);
|
||||
border-radius: 0.9rem;
|
||||
|
||||
|
|
@ -264,27 +254,21 @@ hr {
|
|||
transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
|
||||
background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.notification.show {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.notification.info {
|
||||
border-color: var(--big-default);
|
||||
}
|
||||
|
||||
.notification.error {
|
||||
border-color: var(--big-red);
|
||||
}
|
||||
|
||||
.notification.success {
|
||||
border-color: var(--big-green);
|
||||
}
|
||||
|
||||
roomtopbar {
|
||||
height: calc(var(--button-height) * 1.5);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
|
|
@ -294,11 +278,11 @@ roomtopbar {
|
|||
line-height: calc(var(--button-height) * 1.5);
|
||||
font-weight: bold;
|
||||
padding-left: calc(var(--button-margin) * 3);
|
||||
padding-right: calc(var(--button-margin) * 3);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
sidebar.second#roomdetailsbar {
|
||||
height: calc(var(--button-height) * 1.5);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
|
|
@ -312,32 +296,24 @@ herotitle {
|
|||
font-weight: bold;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.input-group {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
|
||||
width: 90%;
|
||||
max-width: 30rem;
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 800;
|
||||
margin-left: 0.6rem;
|
||||
margin-bottom: -0.2rem;
|
||||
opacity: 0.4;
|
||||
|
||||
letter-spacing: 0.05rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
justify-content: center;
|
||||
background-color: var(--text-color);
|
||||
|
|
@ -346,11 +322,9 @@ herotitle {
|
|||
border: none;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.bottom-element {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
sidebarelement:hover indicator:not(.active) {
|
||||
content: "";
|
||||
|
|
@ -393,7 +367,6 @@ sidebarelement:has(.icon-button:active) indicator:not(.active) {
|
|||
border-radius: 0.8rem;
|
||||
transform: translateY(calc( ( var(--icon-button-height) + (var(--button-margin) * 2) ) / 2 - 0.6rem));
|
||||
}
|
||||
|
||||
blah, inherit, .inherit {
|
||||
all: inherit;
|
||||
padding: 0;
|
||||
|
|
@ -404,7 +377,6 @@ blah, inherit, .inherit {
|
|||
space{
|
||||
margin-left: 0.4rem;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
position: fixed;
|
||||
background: var(--main-bg-color);
|
||||
|
|
@ -416,19 +388,16 @@ space{
|
|||
gap: 0.2rem;
|
||||
z-index: 2000;
|
||||
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
|
||||
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
transform-origin: center left;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.context-menu.show {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.context-menu button {
|
||||
margin: 0;
|
||||
padding: 0.5rem 1rem;
|
||||
|
|
@ -440,7 +409,107 @@ space{
|
|||
gap: 0.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.context-menu button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
.mobile-nav-btn {
|
||||
display: none;
|
||||
background: transparent;
|
||||
border: none;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-right: 0.8rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
.mobile-nav-btn:active {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
.mobile-nav-btn.right {
|
||||
margin-right: 0;
|
||||
margin-left: 0.8rem;
|
||||
}
|
||||
.mobile-nav-btn svg {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
.flex-spacer {
|
||||
flex-grow: 1;
|
||||
}
|
||||
@media (max-width: 52rem) {
|
||||
.mobile-nav-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
main {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
sidebar, sidebar.second, roomcontent {
|
||||
position: absolute !important;
|
||||
height: 100%;
|
||||
transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
|
||||
}
|
||||
|
||||
sidebar {
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#roomsbar {
|
||||
left: calc(var(--icon-button-height) + (var(--button-margin) * 2) + var(--border-width));
|
||||
width: calc(100vw - (var(--icon-button-height) + (var(--button-margin) * 2) + var(--border-width))) !important;
|
||||
min-width: unset !important;
|
||||
max-width: none !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
roomcontent {
|
||||
left: 0;
|
||||
width: 100vw !important;
|
||||
transform: translateX(100vw);
|
||||
border-right: none !important;
|
||||
z-index: 2;
|
||||
background-color: var(--main-bg-color);
|
||||
}
|
||||
|
||||
#roomdetailsbar {
|
||||
left: 0;
|
||||
width: 100vw !important;
|
||||
min-width: unset !important;
|
||||
max-width: none !important;
|
||||
transform: translateX(100vw);
|
||||
z-index: 3;
|
||||
background-color: var(--main-bg-color);
|
||||
}
|
||||
|
||||
main.mobile-content sidebar,
|
||||
main.mobile-content #roomsbar {
|
||||
transform: translateX(-30vw);
|
||||
}
|
||||
|
||||
main.mobile-content roomcontent {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
main.mobile-details sidebar,
|
||||
main.mobile-details #roomsbar {
|
||||
transform: translateX(-60vw);
|
||||
}
|
||||
|
||||
main.mobile-details roomcontent {
|
||||
transform: translateX(-30vw);
|
||||
}
|
||||
|
||||
main.mobile-details #roomdetailsbar {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
BIN
icons/icon.png
BIN
icons/icon.png
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
|
|
@ -53,7 +53,6 @@
|
|||
</button>
|
||||
</sidebarelement>
|
||||
</sidebar>
|
||||
|
||||
<sidebar class="second" id="roomsbar">
|
||||
<roomtopbar>
|
||||
<blah>title.home</blah>
|
||||
|
|
@ -112,7 +111,7 @@
|
|||
async function start() {
|
||||
updateLoadingStatus("loading.loading");
|
||||
try {
|
||||
switchRoomContent("title.splash", splashScreen, false);
|
||||
switchRoomContent("title.splash", splashScreen, false, "", true);
|
||||
if (host != null)
|
||||
{
|
||||
await updateProtocolAndUrl(host);
|
||||
|
|
@ -121,7 +120,6 @@
|
|||
{
|
||||
await updateProtocolAndUrl(window.location.hostname);
|
||||
}
|
||||
|
||||
sidebarPfp.src = await getAvatarUrl(username);
|
||||
|
||||
showAction("Authenticating...", "startauth");
|
||||
|
|
@ -179,7 +177,6 @@
|
|||
async function createGroup() {
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
<script src="main.js"></script>
|
||||
<script src="userscript.js"></script>
|
||||
|
|
@ -685,16 +685,17 @@ function showFixedContextMenu(rect, html) {
|
|||
|
||||
fixedContextMenu.classList.add("show");
|
||||
}
|
||||
async function switchRoomContent(title, content, showRoomBar, icon = "")
|
||||
async function switchRoomContent(title, content, showRoomBar, icon = "", skipMobileSlide = false)
|
||||
{
|
||||
roomContentMain.style.transform = "scale(0.85)";
|
||||
roomContentMain.style.opacity = "0";
|
||||
await delay(200);
|
||||
let backBtnHtml = `<button class="mobile-nav-btn" onclick="mobileNavBack()"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="19" y1="12" x2="5" y2="12"></line><polyline points="12 19 5 12 12 5"></polyline></svg></button>`;
|
||||
let detailsBtnHtml = showRoomBar ? `<button class="mobile-nav-btn right" onclick="mobileNavDetails()"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>` : '';
|
||||
|
||||
roomTopBar.innerHTML = `${icon}<space></space><inherit>${processBlah(title)}</inherit>`
|
||||
roomTopBar.innerHTML = `${backBtnHtml}${icon}<space></space><inherit>${processBlah(title)}</inherit><div class="flex-spacer"></div>${detailsBtnHtml}`;
|
||||
roomDetailsBar.style.display = showRoomBar ? "flex" : "none";
|
||||
|
||||
//content blah parsing
|
||||
let parser = new DOMParser();
|
||||
let doc = parser.parseFromString(content, "text/html");
|
||||
|
||||
|
|
@ -714,14 +715,18 @@ async function switchRoomContent(title, content, showRoomBar, icon = "")
|
|||
let value = placeholders[i].placeholder.split("{blah(")[1].split(")}")[0];
|
||||
placeholders[i].placeholder = processBlah(value);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
roomContentMain.innerHTML = doc.body.innerHTML;
|
||||
|
||||
|
||||
roomContentMain.style.transform = "";
|
||||
roomContentMain.style.opacity = "";
|
||||
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
if (window.innerWidth <= 52 * rem && !skipMobileSlide) {
|
||||
mainScreen.classList.remove('mobile-details');
|
||||
mainScreen.classList.add('mobile-content');
|
||||
}
|
||||
}
|
||||
collapseDmsBtn.addEventListener("click", () => {
|
||||
collapseDmsBtn.classList.toggle("collapsed");
|
||||
|
|
@ -799,32 +804,44 @@ function setActiveSidebarIndicator(element, skipDisabling = false)
|
|||
element.classList.add("active");
|
||||
}
|
||||
|
||||
/* replaced with css
|
||||
sidebarHomeButton.addEventListener("mouseenter", () => {
|
||||
sidebarHomeIndicator.classList.add("hover");
|
||||
function mobileNavBack() {
|
||||
if(mainScreen.classList.contains('mobile-details')) {
|
||||
mainScreen.classList.remove('mobile-details');
|
||||
mainScreen.classList.add('mobile-content');
|
||||
} else {
|
||||
mainScreen.classList.remove('mobile-content');
|
||||
}
|
||||
}
|
||||
function mobileNavDetails() {
|
||||
mainScreen.classList.add('mobile-details');
|
||||
}
|
||||
let touchStartX = 0;
|
||||
let touchEndX = 0;
|
||||
let touchStartY = 0;
|
||||
let touchEndY = 0;
|
||||
document.addEventListener('touchstart', e => {
|
||||
touchStartX = e.changedTouches[0].screenX;
|
||||
touchStartY = e.changedTouches[0].screenY;
|
||||
});
|
||||
sidebarHomeButton.addEventListener("mouseleave", () => {
|
||||
sidebarHomeIndicator.classList.remove("hover");
|
||||
document.addEventListener('touchend', e => {
|
||||
touchEndX = e.changedTouches[0].screenX;
|
||||
touchEndY = e.changedTouches[0].screenY;
|
||||
handleMobileSwipe();
|
||||
});
|
||||
function handleMobileSwipe() {
|
||||
const rem = parseFloat(getComputedStyle(document.documentElement).fontSize);
|
||||
if (window.innerWidth > 52 * rem) return;
|
||||
|
||||
sidebarAddButton.addEventListener("mouseenter", () => {
|
||||
sidebarAddIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarAddButton.addEventListener("mouseleave", () => {
|
||||
sidebarAddIndicator.classList.remove("hover");
|
||||
});
|
||||
let diffX = touchEndX - touchStartX;
|
||||
let diffY = touchEndY - touchStartY;
|
||||
|
||||
sidebarProfileButton.addEventListener("mouseenter", () => {
|
||||
sidebarProfileIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarProfileButton.addEventListener("mouseleave", () => {
|
||||
sidebarProfileIndicator.classList.remove("hover");
|
||||
});
|
||||
|
||||
sidebarInboxButton.addEventListener("mouseenter", () => {
|
||||
sidebarInboxIndicator.classList.add("hover");
|
||||
});
|
||||
sidebarInboxButton.addEventListener("mouseleave", () => {
|
||||
sidebarInboxIndicator.classList.remove("hover");
|
||||
});
|
||||
*/
|
||||
if (Math.abs(diffX) > Math.abs(diffY) && Math.abs(diffX) > 60) {
|
||||
if (diffX > 0) {
|
||||
mobileNavBack();
|
||||
} else {
|
||||
if (mainScreen.classList.contains('mobile-content') && roomDetailsBar.style.display !== 'none') {
|
||||
mobileNavDetails();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -70,7 +70,6 @@ loading {
|
|||
user-select: none !important;
|
||||
-webkit-user-drag: none !important;
|
||||
}
|
||||
|
||||
button, input {
|
||||
border-radius: 0.8rem;
|
||||
background-color: rgba(255, 255, 255, 0.05);
|
||||
|
|
@ -181,7 +180,6 @@ sidebar.second {
|
|||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.collapse-text-button {
|
||||
padding-left: calc(var(--button-margin) + 0.2rem);
|
||||
flex-shrink: 0;
|
||||
|
|
@ -192,16 +190,13 @@ sidebar.second {
|
|||
font-weight: 600;
|
||||
gap: 0.3rem;
|
||||
}
|
||||
|
||||
.collapse-text-button .chevron {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
}
|
||||
|
||||
.collapse-text-button.collapsed .chevron {
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.add-action-button {
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
|
|
@ -212,7 +207,6 @@ sidebar.second {
|
|||
justify-content: center;
|
||||
color: rgba(255, 255, 255, 0.5);
|
||||
}
|
||||
|
||||
.add-action-button svg {
|
||||
width: 1.25rem;
|
||||
height: 1.25rem;
|
||||
|
|
@ -225,8 +219,6 @@ hr {
|
|||
width: 60%;
|
||||
margin-left: 20%;
|
||||
}
|
||||
|
||||
|
||||
#notification-container {
|
||||
padding-top: env(safe-area-inset-top);
|
||||
position: fixed;
|
||||
|
|
@ -240,12 +232,10 @@ hr {
|
|||
pointer-events: none;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.notification {
|
||||
background: rgba(255, 255, 255, 0.015);
|
||||
backdrop-filter: blur(1.2rem);
|
||||
-webkit-backdrop-filter: blur(1.2rem);
|
||||
|
||||
border: var(--border-width) solid var(--light-border-color);
|
||||
border-radius: 0.9rem;
|
||||
|
||||
|
|
@ -264,27 +254,21 @@ hr {
|
|||
transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
|
||||
background-color 0.2s ease;
|
||||
}
|
||||
|
||||
.notification.show {
|
||||
opacity: 1;
|
||||
transform: translateY(0);
|
||||
}
|
||||
|
||||
.notification.info {
|
||||
border-color: var(--big-default);
|
||||
}
|
||||
|
||||
.notification.error {
|
||||
border-color: var(--big-red);
|
||||
}
|
||||
|
||||
.notification.success {
|
||||
border-color: var(--big-green);
|
||||
}
|
||||
|
||||
roomtopbar {
|
||||
height: calc(var(--button-height) * 1.5);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
|
|
@ -294,11 +278,11 @@ roomtopbar {
|
|||
line-height: calc(var(--button-height) * 1.5);
|
||||
font-weight: bold;
|
||||
padding-left: calc(var(--button-margin) * 3);
|
||||
padding-right: calc(var(--button-margin) * 3);
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
sidebar.second#roomdetailsbar {
|
||||
height: calc(var(--button-height) * 1.5);
|
||||
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
|
||||
|
|
@ -312,32 +296,24 @@ herotitle {
|
|||
font-weight: bold;
|
||||
font-size: 1.6rem;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.input-group {
|
||||
text-align: left;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 0.2rem;
|
||||
|
||||
width: 90%;
|
||||
max-width: 30rem;
|
||||
}
|
||||
|
||||
.input-group label {
|
||||
font-size: 0.75rem;
|
||||
font-weight: 800;
|
||||
margin-left: 0.6rem;
|
||||
margin-bottom: -0.2rem;
|
||||
opacity: 0.4;
|
||||
|
||||
letter-spacing: 0.05rem;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.submit-button {
|
||||
justify-content: center;
|
||||
background-color: var(--text-color);
|
||||
|
|
@ -346,11 +322,9 @@ herotitle {
|
|||
border: none;
|
||||
font-size: 1.05rem;
|
||||
}
|
||||
|
||||
.bottom-element {
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
@media (hover: hover) {
|
||||
sidebarelement:hover indicator:not(.active) {
|
||||
content: "";
|
||||
|
|
@ -393,7 +367,6 @@ sidebarelement:has(.icon-button:active) indicator:not(.active) {
|
|||
border-radius: 0.8rem;
|
||||
transform: translateY(calc( ( var(--icon-button-height) + (var(--button-margin) * 2) ) / 2 - 0.6rem));
|
||||
}
|
||||
|
||||
blah, inherit, .inherit {
|
||||
all: inherit;
|
||||
padding: 0;
|
||||
|
|
@ -404,7 +377,6 @@ blah, inherit, .inherit {
|
|||
space{
|
||||
margin-left: 0.4rem;
|
||||
}
|
||||
|
||||
.context-menu {
|
||||
position: fixed;
|
||||
background: var(--main-bg-color);
|
||||
|
|
@ -416,19 +388,16 @@ space{
|
|||
gap: 0.2rem;
|
||||
z-index: 2000;
|
||||
box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.4);
|
||||
|
||||
opacity: 0;
|
||||
transform: scale(0.95);
|
||||
transform-origin: center left;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.context-menu.show {
|
||||
opacity: 1;
|
||||
transform: scale(1);
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
.context-menu button {
|
||||
margin: 0;
|
||||
padding: 0.5rem 1rem;
|
||||
|
|
@ -440,7 +409,107 @@ space{
|
|||
gap: 0.5rem;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.context-menu button:hover {
|
||||
background-color: rgba(255, 255, 255, 0.08);
|
||||
}
|
||||
.mobile-nav-btn {
|
||||
display: none;
|
||||
background: transparent;
|
||||
border: none;
|
||||
height: 2.4rem;
|
||||
width: 2.4rem;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
margin-right: 0.8rem;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
color: var(--text-color);
|
||||
cursor: pointer;
|
||||
}
|
||||
.mobile-nav-btn:active {
|
||||
background-color: rgba(255, 255, 255, 0.1);
|
||||
border-radius: 0.8rem;
|
||||
}
|
||||
.mobile-nav-btn.right {
|
||||
margin-right: 0;
|
||||
margin-left: 0.8rem;
|
||||
}
|
||||
.mobile-nav-btn svg {
|
||||
width: 1.5rem;
|
||||
height: 1.5rem;
|
||||
}
|
||||
.flex-spacer {
|
||||
flex-grow: 1;
|
||||
}
|
||||
@media (max-width: 52rem) {
|
||||
.mobile-nav-btn {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
main {
|
||||
position: relative;
|
||||
width: 100vw;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
sidebar, sidebar.second, roomcontent {
|
||||
position: absolute !important;
|
||||
height: 100%;
|
||||
transition: transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
|
||||
}
|
||||
|
||||
sidebar {
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
#roomsbar {
|
||||
left: calc(var(--icon-button-height) + (var(--button-margin) * 2) + var(--border-width));
|
||||
width: calc(100vw - (var(--icon-button-height) + (var(--button-margin) * 2) + var(--border-width))) !important;
|
||||
min-width: unset !important;
|
||||
max-width: none !important;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
roomcontent {
|
||||
left: 0;
|
||||
width: 100vw !important;
|
||||
transform: translateX(100vw);
|
||||
border-right: none !important;
|
||||
z-index: 2;
|
||||
background-color: var(--main-bg-color);
|
||||
}
|
||||
|
||||
#roomdetailsbar {
|
||||
left: 0;
|
||||
width: 100vw !important;
|
||||
min-width: unset !important;
|
||||
max-width: none !important;
|
||||
transform: translateX(100vw);
|
||||
z-index: 3;
|
||||
background-color: var(--main-bg-color);
|
||||
}
|
||||
|
||||
main.mobile-content sidebar,
|
||||
main.mobile-content #roomsbar {
|
||||
transform: translateX(-30vw);
|
||||
}
|
||||
|
||||
main.mobile-content roomcontent {
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
main.mobile-details sidebar,
|
||||
main.mobile-details #roomsbar {
|
||||
transform: translateX(-60vw);
|
||||
}
|
||||
|
||||
main.mobile-details roomcontent {
|
||||
transform: translateX(-30vw);
|
||||
}
|
||||
|
||||
main.mobile-details #roomdetailsbar {
|
||||
transform: translateX(0);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue