0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-29 20:28:52 +02:00

client: Fixes.

This commit is contained in:
Jason Volk 2017-09-29 03:09:32 -07:00
parent ade7a138c4
commit 6dfe034f6f
9 changed files with 70 additions and 20 deletions

View file

@ -1069,7 +1069,7 @@ body.loaded
align-content: center; align-content: center;
justify-content: center; justify-content: center;
margin: 1px 1px 1px 1px; margin: 1px 1px 1px 1px;
padding: 5px 5px 5px 5px; padding: 1vh 1vw 1vh 1vw;
background-color: inherit; background-color: inherit;
outline: none; outline: none;
} }
@ -1177,8 +1177,8 @@ body.loaded
#charybdis_login_form #charybdis_login_form
{ {
align-items: flex-start; align-items: flex-end;
margin: 0px 10px 0px 10px; margin: 0px 1vw 0px 1vw;
} }
.ircd .login_ .ircd .login_
@ -1194,7 +1194,6 @@ body.loaded
flex-flow: column nowrap; flex-flow: column nowrap;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
text-align: center;
} }
/* This doesn't exist in the HTML until generated */ /* This doesn't exist in the HTML until generated */
@ -1207,10 +1206,40 @@ body.loaded
.ircd .login_ h1 .ircd .login_ h1
{ {
font-size: 39px; font-size: 1.5vw;
text-align: left; align-self: flex-end;
text-shadow: 1px 2px #404040; text-shadow: 1px 2px #707070;
color: #F8F8F8; align-items: center;
}
.ircd .login_ img
{
align-self: flex-end;
width: 30px;
}
.ircd .login_ h2
{
font-size: 3vw;
align-self: flex-start;
text-shadow: 1px 1px #505050;
align-items: center;
}
.ircd .login_ h3
{
font-size: 2.25vw;
align-self: center;
text-shadow: 1px 2px #707070;
align-items: baseline;
letter-spacing: -1px;
}
.ircd .login_ h3 b
{
color: var(--pal-CA);
font-size: 3.5vw;
letter-spacing: -2px;
} }
.ircd .login_ h1:hover .ircd .login_ h1:hover
@ -1226,6 +1255,7 @@ body.loaded
box-sizing: border-box; box-sizing: border-box;
margin: 10px 0px 0px 0px; margin: 10px 0px 0px 0px;
padding: 0px 4px 0px 4px; padding: 0px 4px 0px 4px;
border-radius: 3px;
} }
.ircd .login_ div.submit .ircd .login_ div.submit

View file

@ -92,7 +92,12 @@ window.addEventListener("unload", async function(event)
} }
}); });
$(document).ready((event) => mc.run = async function(event = {})
{ {
mc.execution = mc.ready(event); mc.execution = mc.ready(event);
}
$(document).ready((event) =>
{
mc.run(event);
}); });

View file

@ -156,6 +156,7 @@ mc.auth["m.register.user"] = async function(opts = {})
mc.session.guest = false; mc.session.guest = false;
mc.instance.authentic = true; mc.instance.authentic = true;
Object.update(mc.session, data); Object.update(mc.session, data);
mc.run();
return true; return true;
} }
catch(error) catch(error)

View file

@ -204,6 +204,7 @@ mc.main.fault["M_MISSING_TOKEN"] = async function(error)
console.error("Authentication via " + type + ": " + result); console.error("Authentication via " + type + ": " + result);
} }
mc.main.on_logout();
return false; return false;
}; };
@ -215,6 +216,7 @@ mc.main.on_login = async function()
await mc.filter.init(); await mc.filter.init();
mc.main.menu["ROOMS"].hide = false; mc.main.menu["ROOMS"].hide = false;
mc.main.menu["MENU"].hide = false;
mc.show["#charybdis_rooms"] = true; mc.show["#charybdis_rooms"] = true;
if(!mc.session.guest) if(!mc.session.guest)
@ -246,6 +248,7 @@ mc.main.on_logout = function()
mc.main.menu["USERS"].hide = true; mc.main.menu["USERS"].hide = true;
mc.main.menu["LOGIN"].hide = false; mc.main.menu["LOGIN"].hide = false;
mc.main.menu["LOGOUT"].hide = true; mc.main.menu["LOGOUT"].hide = true;
mc.main.menu["MENU"].hide = true;
mc.show["#charybdis_menu"] = true; mc.show["#charybdis_menu"] = true;
mc.show["#charybdis_login"] = true; mc.show["#charybdis_login"] = true;
mc.show["#charybdis_rooms"] = false; mc.show["#charybdis_rooms"] = false;
@ -260,6 +263,7 @@ mc.main.menu =
{ {
icon: "fa-bars", icon: "fa-bars",
target: "#charybdis_menu", target: "#charybdis_menu",
hide: true,
}, },
"IRCd": "IRCd":

View file

@ -64,7 +64,7 @@ mc.opts =
style: "charybdis.css", style: "charybdis.css",
// Quick setting to debug incoming sync messages on the console // Quick setting to debug incoming sync messages on the console
sync_debug: 0, sync_debug: 10,
account_data: account_data:
{ {

View file

@ -115,11 +115,17 @@ room.scroll.on = function(event)
mc.ng.apply(); mc.ng.apply();
} }
if(at_top || (going_up && pcts.top < 0.15)) if(at_top || (going_up && pcts.top < 0.15)) try
{
this.scroll.back(48); this.scroll.back(48);
}
catch(e) {}
if(!at_bottom && going_down && pcts.bottom < 0.15) if(!at_bottom && going_down && pcts.bottom < 0.15) try
{
this.scroll.front(48); this.scroll.front(48);
}
catch(e) {}
this.control.scroll_pos_last = pos; this.control.scroll_pos_last = pos;
this.control.scroll_pct_last = pcts; this.control.scroll_pct_last = pcts;

View file

@ -52,11 +52,15 @@ room.sync = function(data, action)
if(this.focused()) if(this.focused())
{ {
this.sync.activity(); this.sync.activity();
if(this.control.mode == "LIVE") if(this.control.mode == "LIVE") try
{ {
this.scroll.to.bottom("fast"); this.scroll.to.bottom("fast");
this.receipt.send.current(); this.receipt.send.current();
} }
catch(e)
{
console.error(e);
}
} }
}; };

View file

@ -69,8 +69,8 @@ mc.sync["rooms"] = function(rooms)
mc.sync["presence"] = function(presence) mc.sync["presence"] = function(presence)
{ {
let events = presence.events; if(presence.events)
mc.users.sync(events); mc.users.sync(presence.events);
}; };
mc.sync["account_data"] = function(account_data) mc.sync["account_data"] = function(account_data)

View file

@ -14,7 +14,7 @@ lang="en"
/> />
<meta <meta
name="description" name="description"
content="Charybdis Five Internet Relay Collaboration" content="Charybdis Five Internet Relay Chat Matrix"
/> />
<link <link
@ -38,7 +38,7 @@ lang="en"
--> -->
<title> <title>
Charybdis 5 - Internet Relay Collaboration Charybdis 5 - Internet Relay Chat Matrix
</title> </title>
</head> </head>
@ -1064,9 +1064,9 @@ type="text/ng-template"
id="charybdis_login_form" id="charybdis_login_form"
ircd-catch ircd-catch
> >
<h1> <h3>
Matrix <b>I</b>nternet &nbsp; <b>R</b>elay &nbsp; <b>C</b>hat
</h1> </h3>
<input <input
name="username" name="username"
type="text" type="text"