From 711dbbe8b19fa5e095baabbb9eeb4290abf03349 Mon Sep 17 00:00:00 2001 From: GDColon Date: Sun, 27 Sep 2020 22:22:47 -0400 Subject: [PATCH] More sample icons + square icon improvements --- api/messages/countMessages.js | 2 +- assets/css/iconkit.css | 6 ++++++ html/iconkit.html | 5 +++++ index.js | 2 +- misc/sampleIcons.json | 4 +++- 5 files changed, 16 insertions(+), 3 deletions(-) diff --git a/api/messages/countMessages.js b/api/messages/countMessages.js index 045d801..13f8174 100644 --- a/api/messages/countMessages.js +++ b/api/messages/countMessages.js @@ -21,7 +21,7 @@ module.exports = async (app, req, res) => { headers: {'x-forwarded-for': req.headers['x-real-ip']} }, async function (err, resp, body) { - if (err || body == '-1' || body == '-2' || !body) return res.status(400).send("Error fetching profile! Make sure your username and password are entered correctly.") + if (err || body == '-1' || body == '-2' || !body) return res.status(400).send("Error fetching profile! Make sure your username and password are entered correctly. (this is not an issue with gdbrowser)") let count = app.parseResponse(body)[38] if (!count) return res.status(400).send("Error fetching unread messages!") else res.status(200).send(count) diff --git a/assets/css/iconkit.css b/assets/css/iconkit.css index 48d4d4c..af8408e 100644 --- a/assets/css/iconkit.css +++ b/assets/css/iconkit.css @@ -168,6 +168,12 @@ input:focus, select:focus, textarea:focus, button:focus { text-transform: capitalize; } +.squareIcon { + background-color: rgba(0, 0, 0, 0.2); + padding: 5px 5px; + border-radius: 10px; +} + #url { width: 500px; max-width: 90%; diff --git a/html/iconkit.html b/html/iconkit.html index 5c5baa6..8900380 100644 --- a/html/iconkit.html +++ b/html/iconkit.html @@ -99,6 +99,9 @@ iconSettings.forEach(x => { $(`#box-${x}`).prop('checked', true) }) +if (iconSettings.includes("square")) $("#result").addClass("squareIcon") +else $("#result").removeClass("squareIcon") + function capitalize(str) { return str[0].toUpperCase() + str.substr(1) } function randInt(min, max) { return Math.floor(Math.random() * (max - min + 1) ) + min } function row3() { if (iconSettings.includes("col3")) $('#col3').show(); else $('#col3').hide() } @@ -334,6 +337,8 @@ $(document).on('change', '.iconsetting', function (e) { let checkedSettings = [] $('.iconsetting:checkbox:checked').each((i, x) => { checkedSettings.push(x.id.split('-')[1]) }) iconSettings = checkedSettings + if (iconSettings.includes("square")) $("#result").addClass("squareIcon") + else $("#result").removeClass("squareIcon") localStorage.iconkit = checkedSettings.join(",") row3() }) diff --git a/index.js b/index.js index 37efa1d..7f197b1 100644 --- a/index.js +++ b/index.js @@ -5,7 +5,7 @@ const compression = require('compression'); const rateLimit = require("express-rate-limit"); // set to false if you're using gdbrowser locally, for obvious reasons -let useRateLimiting = false +let useRateLimiting = true const app = express(); app.offline = false // set to true to go into "offline" mode (in case of ip ban from rob) diff --git a/misc/sampleIcons.json b/misc/sampleIcons.json index 0abc9f5..9a69333 100644 --- a/misc/sampleIcons.json +++ b/misc/sampleIcons.json @@ -15,6 +15,7 @@ [ "Colon2ndAccount", 42, 15, 10, 1 ], [ "Cyclic", 30, 3, 12, 0 ], [ "DanZmeN", 104, 34, 12, 1 ], + [ "envylol", 73, 20, 1, 1], [ "EVW", 28, 12, 9, 0 ], [ "Flub", 25, 3, 12, 1 ], [ "Juniper", 98, 40, 12, 1 ], @@ -30,9 +31,10 @@ [ "RedHuseey", 98, 9, 12, 0 ], [ "Riot", 35, 7, 3, 1 ], [ "SrGuillester", 23, 12, 15, 1 ], - [ "Technical", 46, 0, 13, 0 ], + [ "Technical", 48, 0, 13, 0 ], [ "TheRealSdSlAyEr", 74, 3, 12, 1 ], [ "tubular9", 98, 10, 3, 0 ], + [ "Unknown68D", 133, 5, 3, 1 ], [ "ViPriN", 133, 11, 13, 1 ], [ "XShadowWizardX", 115, 12, 7, 1 ]