Compare commits

..

4 commits

6 changed files with 92 additions and 16 deletions

View file

@ -35,7 +35,7 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. %>
<br><br>
<a href="/hrt.zip"><h3>This zip file contains everything I know.</h3></a>
<br>
<span>You should probably use <a href="https://www.torproject.org/">TOR</a> or a <a href="https://mullvad.net">decent VPN</a> in either an <a href="https://tails.net">amnesiac OS</a> or <a href="https://qubes-os.org">dispoable VM.</a> Everything paid w/ either <a href="https://www.getmonero.org/">XMR</a> or <a href="https://mullvad.net/en/blog/sending-cash-use-our-new-address">cash by mail</a>.</span>
<span>You should probably use <a href="https://www.torproject.org/">TOR</a> or a <a href="https://ivpn.net">decent VPN</a> in either an <a href="https://tails.net">amnesiac OS</a> or <a href="https://qubes-os.org">dispoable VM.</a> Everything paid w/ either <a href="https://www.getmonero.org/">XMR</a> or <a href="https://www.ivpn.net/knowledgebase/billing/how-can-i-pay-with-cash/">cash by mail</a>.</span>
<br><br>
<span class="critical-danger-text">
This page is not intended to be a replacement for professional medical advice, merely an attempt at harm reduction for my friends.

View file

@ -54,6 +54,10 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. %>
<p>Disable Portrait/Mobile Layout: </p>
<input type="checkbox">
</span>
<span id="settings-panel-disable-send-button" class="settings-panel-setting">
<p>Hide chat prompt send button: </p>
<input type="checkbox">
</span>
<h4>Notification Settings</h4>
<span id="settings-panel-ping-on-pm-rx" class="settings-panel-setting">
<p>Play Sound for received PMs: </p>

View file

@ -20,12 +20,12 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
--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{

View file

@ -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]
]);
}

View file

@ -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
*/

View file

@ -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