merge with Chatte

This commit is contained in:
Xamora 2023-12-18 21:27:52 +01:00
commit 929c1fdeb3
6 changed files with 35 additions and 26 deletions

View File

@ -1,7 +1,7 @@
body { body {
margin: 1vh; margin: 20px;
font-family: 'Quicksand', sans-serif; font-family: 'Quicksand', sans-serif;
font-size: 3vh; font-size: 60px;
} }
a { a {

View File

@ -1,13 +1,13 @@
#app img #app img
{ {
max-height: 10vh; max-height: 3em;
max-width: 10vh; max-width: 3em;
} }
#app ul #app ul
{ {
font-size: 2vh; font-size: 0.75em;
margin: 1vh 0 0 0; margin: 0.25em 0 0 0;
padding: 0 0 0 0; padding: 0 0 0 0;
list-style-type: none; list-style-type: none;
max-height: 80vh; max-height: 80vh;
@ -16,7 +16,7 @@
#app li #app li
{ {
margin: 1vh 1vh 0 0; margin: 0.25em 0.25em 0 0;
} }
#app #chats { #app #chats {
@ -25,37 +25,41 @@
text-align: left; text-align: left;
} }
#app #users { #app #users {
margin: 0vh 5vh 0vh 0.1vh; margin: 0em 1.0em 0em 0.05em;
} }
#app #chat { #app #chat {
position: relative; position: relative;
max-height: 80vh; max-height: 86vh;
width: 80vh; width: 100vh;
/*border: 2px solid green;*/ /*border: 2px solid green;*/
overflow: hidden; overflow: hidden;
} }
#app #members {
font-size: 1em;
}
#app #add_chat_off { #app #add_chat_off {
text-decoration: underline; text-decoration: underline;
} }
#app #messages { #app #messages {
max-height: 50vh; max-height: 50em;
overflow: scroll; overflow: scroll;
overflow-y: scroll; overflow-y: scroll;
overflow-x: hidden; overflow-x: hidden;
font-size: 2vh; font-size: 0.6em;
} }
#app #input_user{ #app #input_user{
color: green; color: green;
width: 20vh; width: 8.5em;
height: 2.5vh; height: 1.1em;
font-size: 2vh; font-size: 0.75em;
border: none; border: none;
outline: none; outline: none;
border-bottom: 0.25vh solid green; border-bottom: 0.15em solid green;
} }
#app #input_chat{ #app #input_chat{
@ -65,18 +69,18 @@
width: 100%; width: 100%;
border: none; border: none;
outline: none; outline: none;
border-bottom: 0.25vh solid green; border-bottom: 0.2em solid green;
caret-color: green; caret-color: green;
color: green; color: green;
font-size: 2vh; font-size: 0.65em;
} }
#app #you { #app #you {
text-align: left; text-align: left;
position: relative; position: relative;
max-width: 48%; max-width: 48%;
left: 2vh; left: 0.5em;
margin: 1vh 0 0 0; margin: 0.5em 0 0 0;
color: green; color: green;
word-wrap: break-word; word-wrap: break-word;
@ -86,8 +90,8 @@
text-align: right; text-align: right;
position: relative; position: relative;
max-width: 48%; max-width: 48%;
margin: 1vh 0 0 auto; margin: 0.5em 0 0 auto;
right: 2vh; right: 0.5em;
color: red; color: red;
/* permet le retour à la ligne à la place de dépasser*/ /* permet le retour à la ligne à la place de dépasser*/

View File

@ -8,10 +8,13 @@ class Channels {
async createChannel(users_id, reload) { async createChannel(users_id, reload) {
let null_id = false;
users_id.forEach(user_id => { users_id.forEach(user_id => {
if (user_id == null) if (user_id == null)
return console.log("createChannel error, null id;"); null_id = true;
}); });
if (null_id)
return console.log(users_id, "createChannel error, null id;");
let response = await this.client._post("/api/chat/", { let response = await this.client._post("/api/chat/", {
users_id:users_id users_id:users_id

View File

@ -185,6 +185,9 @@ export default class extends AbstractView {
messages.appendChild(text); messages.appendChild(text);
}); });
// Scroll to the bottom of messages
messages.scrollTop = messages.scrollHeight;
} }
async hideChat() { async hideChat() {
@ -212,7 +215,6 @@ export default class extends AbstractView {
</ul> </ul>
</div> </div>
</div> </div>
`; `;
} }
} }