feature: try to get chat to actually work
This commit is contained in:
parent
51acbef35f
commit
013e30264f
13 changed files with 1203 additions and 631 deletions
|
@ -31,59 +31,7 @@
|
|||
|
||||
#signup-login-wall form {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
form div {
|
||||
position: relative;
|
||||
display: flex;
|
||||
margin-bottom: 1em;
|
||||
}
|
||||
|
||||
form label {
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
font-size: 30px;
|
||||
margin: 10px;
|
||||
padding: 0 10px;
|
||||
background-color: var(--bg);
|
||||
-webkit-transition:
|
||||
top 0.2s ease-in-out,
|
||||
font-size 0.2s ease-in-out;
|
||||
transition:
|
||||
top 0.2s ease-in-out,
|
||||
font-size 0.2s ease-in-out;
|
||||
}
|
||||
|
||||
form input:focus ~ label,
|
||||
form input:valid ~ label {
|
||||
top: -25px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
form input {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--text);
|
||||
font-size: 20px;
|
||||
background-color: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
form input:focus {
|
||||
outline: none;
|
||||
}
|
||||
|
||||
form button {
|
||||
width: 100%;
|
||||
padding: 20px;
|
||||
border: 1px solid var(--text);
|
||||
font-size: 20px;
|
||||
background-color: var(--bg);
|
||||
color: var(--text);
|
||||
}
|
||||
|
||||
form button.primary {
|
||||
background-color: var(--accent);
|
||||
padding: 1rem;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -101,17 +49,11 @@
|
|||
<div class="label">Log In</div>
|
||||
</label>
|
||||
<div class="tab-content">
|
||||
<form
|
||||
data-smart="true"
|
||||
data-method="POST"
|
||||
id="login-form"
|
||||
action="/api/auth"
|
||||
onreply="(user)=>{ document.body.dataset.user = JSON.stringify( user ); }"
|
||||
>
|
||||
<form data-smart="true" data-method="POST" id="login-form" action="/api/auth">
|
||||
<script>
|
||||
{
|
||||
const form = document.currentScript.closest("form");
|
||||
form.on_response = (response) => {
|
||||
form.on_reply = (response) => {
|
||||
// TODO: we should hold the session secret only in memory, not the cookie?
|
||||
document.body.dataset.user = JSON.stringify(response.user);
|
||||
document.body.dataset.perms =
|
||||
|
@ -148,7 +90,7 @@
|
|||
<script>
|
||||
{
|
||||
const form = document.currentScript.closest("form");
|
||||
form.on_response = (response) => {
|
||||
form.on_reply = (response) => {
|
||||
document.body.dataset.user = JSON.stringify(response.user);
|
||||
document.body.dataset.perms =
|
||||
response.user.permissions.join(":");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue