Added package.json and various minor changes

This commit is contained in:
MathMan05 2024-06-07 09:07:21 -05:00
parent 3b55b28260
commit fb34201101
5 changed files with 22 additions and 1 deletions

1
index.js Normal file → Executable file
View file

@ -1,3 +1,4 @@
#!/bin/node
const express = require('express');
const app = express();

15
package.json Normal file
View file

@ -0,0 +1,15 @@
{
"name": "jankclient",
"version": "0.1.0",
"description": "A SpaceBar Client written in JS HTML and CSS to run, clone the repo and do either `node index.js` or `bun index.js` both bun and node are supported, and both should function as expected, if there are any problems with Jank Client on things that aren't linux, please let me know. To access Jank Client after init simply go to http://localhost:8080/login and login with your username and password.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "MathMan05",
"license": "GPL-3.0",
"dependencies":{
"express":"latest"
}
}

View file

@ -23,6 +23,7 @@ class channel{
readStateInfo(json){
this.lastreadmessageid=json.last_message_id;
this.mentions=json.mention_count;
this.mentions??=0;
this.lastpin=json.last_pin_timestamp;
}
get hasunreads(){

View file

@ -18,7 +18,6 @@ class dirrect extends guild{
this.channelids[temp.id]=temp;
}
this.headchannels=this.channels;
this.mentions=0;
}
createChannelpac(JSON){
const thischannel=new group(JSON,owner);
@ -73,6 +72,7 @@ class group extends channel{
this.permission_overwrites=[];
this.lastmessageid=JSON.last_message_id;
this.lastmessageid??=0;
this.mentions=0;
}
createguildHTML(){
const div=document.createElement("div")
@ -141,6 +141,7 @@ class group extends channel{
const noti=document.createElement("div");
noti.classList.add("unread","notiunread","pinged");
noti.innerText=this.mentions;
console.log(this.mentions)
div.noti=noti;
div.append(noti)
const buildpfp=this.user.buildpfp();

View file

@ -10,8 +10,10 @@
left: 50%;
transform: translate(-50%, -50%);
background: #33363d;
z-index: 12;
}
.nonimagecenter{
z-index: 12;
border-style: solid;
border-radius:.1in;
border-color: #1c1b31;
@ -22,6 +24,7 @@
height:100%;
top:0px;
background:#000000bf;
z-index: 11;
}
.messagediv:hover{
background:rgb(30,30,40);