Basic frontend cleanup.

This commit is contained in:
rainbownapkin 2024-11-16 17:39:52 -05:00
parent be09c2457e
commit d0184c5b6b
5 changed files with 42 additions and 27 deletions

View file

@ -79,8 +79,6 @@ module.exports.handleConnection = async function(io, socket){
//Get active channel
var activeChan = activeChannels.get(socket.chan);
console.log(socket);
//If we have more than one active connection
if(activeChan.userList.get(socket.user.user).length > 1){
//temporarily store list of active user sockets

View file

@ -81,28 +81,30 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.-->
<div class="active-cpanel cpanel-doc" id="cpanel-active-doc">
</div>
</div>
<div class="pinned-cpanel cpanel-div" id="cpanel-pinned-div">
<div class="pinned-cpanel cpanel-header-div" id="cpanel-pinned-header-div">
<i class="pinned-cpanel cpanel-header-icon cpanel-unpin-icon bi-pin-fill" id="cpanel-pinned-unpin-icon"></i>
<p class="pinned-cpanel cpanel-title" id="cpanel-pinned-title">NULL PANEL</p>
<span class="pinned-cpanel cpanel-title-spacer" id="cpanel-pinned-title-spacer"></span>
<i class="pinned-cpanel cpanel-header-icon cpanel-popout-icon bi-window-stack" id="cpanel-pinned-popout-icon"></i>
<i class="pinned-cpanel cpanel-header-icon cpanel-close-icon bi-x" id="cpanel-pinned-close-icon"></i>
<div class="chat-panel" id="cpanel-pinned-splitter">
<div class="pinned-cpanel cpanel-div" id="cpanel-pinned-div">
<div class="pinned-cpanel cpanel-header-div" id="cpanel-pinned-header-div">
<i class="pinned-cpanel cpanel-header-icon cpanel-unpin-icon bi-pin-fill" id="cpanel-pinned-unpin-icon"></i>
<p class="pinned-cpanel cpanel-title" id="cpanel-pinned-title">NULL PANEL</p>
<span class="pinned-cpanel cpanel-title-spacer" id="cpanel-pinned-title-spacer"></span>
<i class="pinned-cpanel cpanel-header-icon cpanel-popout-icon bi-window-stack" id="cpanel-pinned-popout-icon"></i>
<i class="pinned-cpanel cpanel-header-icon cpanel-close-icon bi-x" id="cpanel-pinned-close-icon"></i>
</div>
<div class="pinned-cpanel cpanel-doc" id="cpanel-pinned-doc">
</div>
<div class="drag-handle right-drag-handle" id="cpanel-pinned-drag-handle">
</div>
<div class="pinned-cpanel cpanel-doc" id="cpanel-pinned-doc">
</div>
<div class="drag-handle right-drag-handle" id="cpanel-pinned-drag-handle">
</div>
</div>
<div class="chat-panel" id="chat-area">
<div class="chat-panel" id="chat-panel-buffer-div">
</div>
<div class="chat-panel" id="chat-panel-control-div">
<i class="chat-panel chat-panel-control bi-gear-fill" id="chat-panel-settings-icon"></i>
<i class="chat-panel chat-panel-control bi-magic" id="chat-panel-admin-icon"></i>
<i class="chat-panel chat-panel-control bi-images" id="chat-panel-emote-icon"></i>
<input class="chat-panel chat-panel-control" id="chat-panel-prompt" placeholder="Chat...">
<button class="chat-panel chat-panel-control" id="chat-panel-send-button">Send</button>
<div class="chat-panel" id="chat-area">
<div class="chat-panel" id="chat-panel-buffer-div">
</div>
<div class="chat-panel" id="chat-panel-control-div">
<i class="chat-panel chat-panel-control bi-gear-fill" id="chat-panel-settings-icon"></i>
<i class="chat-panel chat-panel-control bi-magic" id="chat-panel-admin-icon"></i>
<i class="chat-panel chat-panel-control bi-images" id="chat-panel-emote-icon"></i>
<input class="chat-panel chat-panel-control" id="chat-panel-prompt" placeholder="Chat...">
<button class="chat-panel chat-panel-control" id="chat-panel-send-button">Send</button>
</div>
</div>
</div>
<div class="chat-panel" id="chat-panel-users-div">

View file

@ -239,3 +239,9 @@ input#chat-panel-prompt{
min-width: 4em;
width: 30%;
}
#cpanel-pinned-splitter{
display: flex;
flex-direction: row;
flex: 1;
}

View file

@ -17,7 +17,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
:root{
--main-font: "open-sans", sans-serif;
--bg0: rgb(158, 158, 158);
--bg0-alpha0: rgba(158, 158, 158, 0.75);
--bg0-alpha0: rgba(158, 158, 158, 0.4);
--bg0-alpha1: rgba(158, 158, 158, 0.75);
--bg1: rgb(70, 70, 70);
--bg2: rgb(220, 220, 220);
--bg1-alt0: rgb(30, 30, 30);
@ -43,8 +44,8 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
--media-header-gradient: linear-gradient(180deg, var(--bg1-alt0) 0%, #FFFFFF00 76%);
/*--active-panel-effect: blur(1em);*/
--active-panel-effect: none;
--background-panel-effect-pretty: blur(4px);
--background-panel-effect-fast: none;
}
body{
@ -249,8 +250,8 @@ select.panel-head-element{
}
#cpanel-active-div{
background-color: var(--bg0-alpha0);
backdrop-filter: var(--active-panel-effect);
background-color: var(--bg0-alpha1);
backdrop-filter: var(--background-panel-effect-fast);
}
.cpanel-div{

View file

@ -54,6 +54,10 @@ class canopyUXUtils{
startDrag(event){
//we are now dragging
this.dragLock = true;
//Keep user from selecting text or changing cursor as we drag
window.document.body.style.userSelect = "none";
window.document.body.style.cursor = "ew-resize";
}
endDrag(event){
@ -67,6 +71,10 @@ class canopyUXUtils{
//if this is true, it no longer needs to be, though it *should* be reset by the drag function by the time it matters anywho :P
this.fixWidth = false;
}
//Return cursor to normal, and allow user to select text again
window.document.body.style.userSelect = "auto";
window.document.body.style.cursor = "auto";
}
drag(event){