diff --git a/index.js b/index.js old mode 100644 new mode 100755 index 0cf4f42..a95bf35 --- a/index.js +++ b/index.js @@ -1,3 +1,4 @@ +#!/bin/node const express = require('express'); const app = express(); diff --git a/package.json b/package.json new file mode 100644 index 0000000..b377d93 --- /dev/null +++ b/package.json @@ -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" + } +} diff --git a/webpage/channel.js b/webpage/channel.js index 6181714..51a0825 100644 --- a/webpage/channel.js +++ b/webpage/channel.js @@ -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(){ diff --git a/webpage/dirrect.js b/webpage/dirrect.js index 29a8ae7..971b0cf 100644 --- a/webpage/dirrect.js +++ b/webpage/dirrect.js @@ -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(); diff --git a/webpage/style.css b/webpage/style.css index 06acb98..a04f8d4 100644 --- a/webpage/style.css +++ b/webpage/style.css @@ -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);