Skip to content

Commit

Permalink
Merge pull request #68 from Qwiri/develop
Browse files Browse the repository at this point in the history
feat[frontend]: Lobby-Screen Overhaul and some minor Enhancements
  • Loading branch information
darmiel authored Jan 12, 2022
2 parents d3d31e0 + 93fa7f2 commit 2ba2e2d
Show file tree
Hide file tree
Showing 13 changed files with 486 additions and 159 deletions.
3 changes: 3 additions & 0 deletions frontend/public/assets/addTopic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/assets/downloadTopics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/assets/import_checkmark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/assets/nukeTopics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions frontend/public/assets/saveTopics.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion frontend/public/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ button:focus {
background-color: #000000;
color: #ffffff;
border: none;
border-radius: 4px;
border-radius: .5rem;
font-size: 1.1rem;
margin: 0;
}
2 changes: 1 addition & 1 deletion frontend/src/Game.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
}
#lobby {
width: 50vw;
width: 75vw;
}
#chat {
Expand Down
12 changes: 8 additions & 4 deletions frontend/src/assets/Chat.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@
};
let chatElement: HTMLElement;
let shouldAutoScroll = true;
let chatContainer: HTMLElement;
let shouldAutoScroll = true;
afterUpdate(() => {
if (shouldAutoScroll) {
chatElement.scrollIntoView(false);
const mobile = (window?.getComputedStyle(chatContainer)?.flexDirection) === "column-reverse";
if (shouldAutoScroll || mobile) {
chatElement.scrollIntoView(mobile);
}
});
Expand All @@ -37,7 +39,7 @@
</script>

<div>
<div id="chatContainer">
<div id="chatContainer" bind:this={chatContainer}>
<div id="messageContainer">
<ul on:scroll={onScroll} id="chat-messages">
{#each $chatMessages as message}
Expand Down Expand Up @@ -69,6 +71,8 @@
display: flex;
flex-direction: column;
margin-bottom: 1rem;
/* turn the chat arround, if on mobile */
@media (max-width: 40rem) {
flex-direction: column-reverse;
Expand Down
Loading

0 comments on commit 2ba2e2d

Please sign in to comment.