Various fixes I forgot to push

This commit is contained in:
MathMan05 2024-06-22 11:53:06 -05:00
parent 95f6bc202d
commit f64c5f02f2
6 changed files with 21 additions and 17 deletions

View file

@ -124,12 +124,12 @@ class voice{
return ["three","zip","square","beep"]; return ["three","zip","square","beep"];
} }
static setNotificationSound(sound){ static setNotificationSound(sound){
let userinfos=JSON.parse(localStorage.getItem("userinfos")); let userinfos=getBulkInfo();
userinfos.preferances.notisound=sound; userinfos.preferances.notisound=sound;
localStorage.setItem("userinfos",JSON.stringify(userinfos)); localStorage.setItem("userinfos",JSON.stringify(userinfos));
} }
static getNotificationSound(){ static getNotificationSound(){
let userinfos=JSON.parse(localStorage.getItem("userinfos")); let userinfos=getBulkInfo();
return userinfos.preferances.notisound; return userinfos.preferances.notisound;
} }
} }

View file

@ -514,8 +514,10 @@ class channel{
} else if (Notification.permission === "granted") { } else if (Notification.permission === "granted") {
let noticontent=markdown(message.content).textContent; let noticontent=markdown(message.content).textContent;
noticontent||=message.embeds[0].json.title; if(message.embeds[0]){
noticontent||=markdown(message.embeds[0].json.description).textContent; noticontent||=message.embeds[0].json.title;
noticontent||=markdown(message.embeds[0].json.description).textContent;
}
noticontent||="Blank Message"; noticontent||="Blank Message";
let imgurl=null; let imgurl=null;
const images=message.getimages(); const images=message.getimages();

View file

@ -139,7 +139,7 @@ class group extends channel{
} }
} }
notititle(message){ notititle(message){
return message.author.username; return message.author.username;
} }
unreads(){ unreads(){
const sentdms=document.getElementById("sentdms"); const sentdms=document.getElementById("sentdms");

View file

@ -74,15 +74,13 @@ class embed{
b.textContent=thing.name; b.textContent=thing.name;
div.append(b); div.append(b);
let p; let p;
thing.inline??=false;
p=document.createElement("p") p=document.createElement("p")
p.textContent=thing.value; p.textContent=thing.value;
p.classList.add("embedp"); p.classList.add("embedp");
div.append(p); div.append(p);
if(thing.inline){div.classList.add("inline");}
embed.append(div); embed.append(div);
if(thing.inline){
div.classList.add("inline");
}
} }
} }
if(this.json.footer||this.json.timestamp){ if(this.json.footer||this.json.timestamp){
@ -100,8 +98,8 @@ class embed{
footer.append(span); footer.append(span);
} }
if(this.json?.footer&&this.json?.timestamp){ if(this.json?.footer&&this.json?.timestamp){
const span=document.createElement("b"); const span=document.createElement("span");
span.textContent="-"; span.textContent="";
span.classList.add("spaceright"); span.classList.add("spaceright");
footer.append(span); footer.append(span);
} }

View file

@ -9,7 +9,7 @@ function setTheme(){
} }
setTheme(); setTheme();
function getBulkUsers(){ function getBulkUsers(){
const json=JSON.parse(localStorage.getItem("userinfos")); const json=getBulkInfo()
for(const thing in json.users){ for(const thing in json.users){
json.users[thing]=new specialuser(json.users[thing]); json.users[thing]=new specialuser(json.users[thing]);
} }
@ -19,7 +19,7 @@ function getBulkInfo(){
return JSON.parse(localStorage.getItem("userinfos")); return JSON.parse(localStorage.getItem("userinfos"));
} }
function setDefaults(){ function setDefaults(){
let userinfos=JSON.parse(localStorage.getItem("userinfos")); let userinfos=getBulkInfo()
if(!userinfos){ if(!userinfos){
localStorage.setItem("userinfos",JSON.stringify({ localStorage.setItem("userinfos",JSON.stringify({
currentuser:null, currentuser:null,

View file

@ -240,7 +240,9 @@ p {
#channels { #channels {
background-color: var(--channels-bg); background-color: var(--channels-bg);
height: calc(100dvh - .9in); height: 100dvh;
height: -webkit-fill-available;
height: -moz-available;
width: 2.5in; width: 2.5in;
overflow: auto; overflow: auto;
user-select: none; user-select: none;
@ -584,7 +586,8 @@ textarea {
#userdock { #userdock {
background-color: var(--user-dock-bg); background-color: var(--user-dock-bg);
width: 100%; width: 100%;
position: relative; position: absolute;
bottom: 0;
} }
#settings { #settings {
@ -848,9 +851,10 @@ span {
position:absolute; position:absolute;
top:0px; top:0px;
transform: translate(0, -100%); transform: translate(0, -100%);
width:100%; /* width:100%; */
box-shadow: .00in -.5in 1in #0000006b; box-shadow: .00in -.5in 1in #0000006b;
border-radius: .05in .05in .0in.0in; border-radius: .05in .05in .0in.0in;
/* max-width: 100%; */
} }
.accountSwitcher tr{ .accountSwitcher tr{
transition: background .3s; transition: background .3s;
@ -964,4 +968,4 @@ span {
} }
.spaceright{ .spaceright{
margin-right:.1in; margin-right:.1in;
} }