diff --git a/src/views/hrt.ejs b/src/views/hrt.ejs index 58a465c..1bd86b4 100644 --- a/src/views/hrt.ejs +++ b/src/views/hrt.ejs @@ -35,7 +35,7 @@ along with this program. If not, see . %>

This zip file contains everything I know.


- You should probably use TOR or a decent VPN in either an amnesiac OS or dispoable VM. Everything paid w/ either XMR or cash by mail. + You should probably use TOR or a decent VPN in either an amnesiac OS or dispoable VM. Everything paid w/ either XMR or cash by mail.

This page is not intended to be a replacement for professional medical advice, merely an attempt at harm reduction for my friends. diff --git a/src/views/partial/panels/settings.ejs b/src/views/partial/panels/settings.ejs index c0f23ae..9e3c996 100644 --- a/src/views/partial/panels/settings.ejs +++ b/src/views/partial/panels/settings.ejs @@ -54,6 +54,10 @@ along with this program. If not, see . %>

Disable Portrait/Mobile Layout:

+ +

Hide chat prompt send button:

+ +

Notification Settings

Play Sound for received PMs:

diff --git a/www/css/theme/the-network.css b/www/css/theme/the-network.css index e85da5e..c6412e6 100644 --- a/www/css/theme/the-network.css +++ b/www/css/theme/the-network.css @@ -20,12 +20,12 @@ along with this program. If not, see .*/ --bg0: rgb(37, 37, 37); --bg0-alpha0: rgba(37, 37, 37, 0.4); --bg0-alpha1: rgba(37, 37, 37, 0.75); - --bg1: rgb(1, 1, 1); + --bg1: rgb(0, 0, 0); --bg1-gradient: linear-gradient(to top, rgb(1, 1, 1), rgb(37, 37, 37)); - --bg2: rgb(0, 0, 0); + --bg2: rgb(20, 20, 20); --bg1-alt0: rgb(30, 30, 30); - --bg2-alt0: rgb(200, 200, 200); - --bg2-alt1: rgb(180, 180, 180); + --bg2-alt0: rgb(60, 60, 60); + --bg2-alt1: rgb(25, 25, 25); --accent0: rgb(212, 212, 212); --accent0-alt0: rgb(185, 185, 185); @@ -240,7 +240,7 @@ textarea{ } .dynamic-container{ - background-color: var(--bg1); + background-color: var(--bg2); color: var(--accent1); } @@ -251,7 +251,7 @@ textarea{ } .dynamic-container, .nested-dynamic-container{ - box-shadow: 3px 3px 1px var(--bg1-alt0) inset; + box-shadow: 3px 3px 1px var(--bg1) inset; border-radius: 1em; } @@ -274,18 +274,29 @@ a.admin-list-entry-item{ div.control-prompt{ border-radius: 1em; - background-color: var(--bg0); + background-color: var(--bg2); } -div.control-prompt:focus-within{ - box-shadow: var(--focus-glow0); +/* This is hacky as shit, but it allows us to place the focus glow either on top of, or next to, elements within the prompt div (such as the send button bg color) */ +div.control-prompt:has(#chat-panel-prompt:focus):has(#chat-panel-send-button:not([style*="display: none"])):before{ + content: ''; + box-shadow: var(--focus-glow0-inset); + width: calc(100% - 2.5rem); + height: 2em; + position: absolute; + pointer-events: none; +} + +/* Use a basic box shadow if we dont have a send button */ +div.control-prompt:focus-within:has(#chat-panel-send-button[style*="display: none"]){ + box-shadow: var(--focus-glow0-inset); } input.control-prompt, input.control-prompt:focus{ border: none; outline: none; box-shadow: none; - background-color: var(--bg0); + background-color: var(--bg2); color: var(--accent0); } @@ -365,8 +376,33 @@ p.channel-guide-entry-item{ #chat-panel-control-div{ margin: 0; border-radius: 0; + background-color: var(--bg1); } +#chat-panel-prompt{ + background-color: rgba(0,0,0,0); +} + +#chat-panel-send-button{ + height: 100%; + width: 2.5rem; + padding: 0; + margin: 0 0; + border-radius: 0; + background-color: var(--bg0); + border-left: solid 1px var(--accent0); +} + + +#chat-panel-send-button:active:not([disabled]){ + box-shadow: var(--focus-glow0-alt0-inset); +} + +#chat-panel-send-button:hover:not([disabled]){ + box-shadow: var(--focus-glow0-inset); +} + + .chat-entry:nth-child(even){ background-color: var(--bg0); } @@ -734,7 +770,7 @@ div.now-playing{ } div.archived p{ - color: var(--bg2-alt1); + color: var(--bg2-alt0); } .queue-playlists-div{ diff --git a/www/js/channel/channel.js b/www/js/channel/channel.js index 69aeffe..f966c8b 100644 --- a/www/js/channel/channel.js +++ b/www/js/channel/channel.js @@ -312,6 +312,19 @@ class channel{ //Toggle portrait mode this.chatBox.togglePortrait(); return; + case 'disableSendButton': + //if the send button isn't loaded + if(this.chatBox.sendButton == null){ + //we're fuckin' done here + return; + } + + console.log(value); + console.log((value == true || value == "true") ? "none" : "unset"); + + //Convert string to bool and use it to set visibility of send button + this.chatBox.sendButton.style.display = (value == true || value == "true") ? "none" : "unset"; + return; case 'userlistHidden': //If the userlist class isn't loaded in yet if(this.userList == null){ @@ -344,15 +357,16 @@ class channel{ ["syncTolerance",1], ["liveSyncTolerance", 10], ["syncDelta", 6], - ["theme", "Movie Night"], + ["theme", "The Network"], ["chatWidthMin", 20], + ["disablePortrait", false], + ["disableSendButton", false], ["userlistHidden", false], ["cinemaMode", false], ["rxPMSound", 'unread'], ["txPMSound", false], ["newSeshSound", true], - ["endSeshSound", true], - ["disablePortrait", false] + ["endSeshSound", true] ]); } diff --git a/www/js/channel/panels/settingsPanel.js b/www/js/channel/panels/settingsPanel.js index 794e1af..5df8369 100644 --- a/www/js/channel/panels/settingsPanel.js +++ b/www/js/channel/panels/settingsPanel.js @@ -72,6 +72,11 @@ class settingsPanel extends panelObj{ */ this.disablePortrait = this.panelDocument.querySelector("#settings-panel-disable-portrait input"); + /** + * Disable Send Button + */ + this.disableSendButton = this.panelDocument.querySelector("#settings-panel-disable-send-button input"); + /** * Audible Ping on PM Recieved */ @@ -131,6 +136,7 @@ class settingsPanel extends panelObj{ this.theme.addEventListener('change', this.updateTheme.bind(this)); this.chatWidthMinimum.addEventListener('change', this.updateChatWidthMinimum.bind(this)); this.disablePortrait.addEventListener('change', this.updateDisablePortrait.bind(this)); + this.disableSendButton.addEventListener('change', this.updateDisableSendButton.bind(this)); this.rxPMSound.addEventListener('change', this.updateRXPMSound.bind(this)); this.txPMSound.addEventListener('change', this.updateTXPMSound.bind(this)); this.newSeshSound.addEventListener('change', this.updateNewPMSeshSound.bind(this)); @@ -269,6 +275,16 @@ class settingsPanel extends panelObj{ client.processConfig("disablePortrait", this.disablePortrait.checked); } + /** + * Handles change toggle of disable/enable send buttton + */ + updateDisableSendButton(){ + console.log(this.disableSendButton); + console.log(this.disableSendButton.checked); + localStorage.setItem('disableSendButton', this.disableSendButton.checked); + client.processConfig("disableSendButton", this.disableSendButton.checked); + } + /** * Handles changes to RX PM Sound setting */ diff --git a/www/js/themeManager.js b/www/js/themeManager.js index ce51298..b7d2570 100644 --- a/www/js/themeManager.js +++ b/www/js/themeManager.js @@ -30,6 +30,12 @@ class themeManager{ ["The Network", "/css/theme/the-network.css"] ]); + + /** + * Sets default theme for new users + */ + this.defaultTheme = "The Network"; + /** * Define property to hold theme link DOM node */ @@ -47,7 +53,7 @@ class themeManager{ //If we didnt get a theme to set if(theme == null){ //Use the first theme in the list - theme = Array.from(this.themes.keys())[0]; + theme = this.defaultTheme; } //If we have a link already setup