From f526a6c40f3db94b22b6ebd6bb2e16c79eec3465 Mon Sep 17 00:00:00 2001 From: Spectralitree Date: Wed, 9 Dec 2020 23:56:35 +0100 Subject: [PATCH] Various fixes --- .eslintcache | 2 +- {src => public}/404.html | 0 public/index.html | 56 +++++++++++++++++++--------------------- src/App.js | 2 +- src/Custom.scss | 13 +++++++--- src/index.js | 2 +- 6 files changed, 40 insertions(+), 35 deletions(-) rename {src => public}/404.html (100%) diff --git a/.eslintcache b/.eslintcache index a5f50a41..1b28307c 100644 --- a/.eslintcache +++ b/.eslintcache @@ -1 +1 @@ -[{"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js":"1","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js":"2","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js":"3","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js":"4","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js":"5","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js":"6","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js":"7","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js":"8","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js":"9","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js":"10","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js":"11"},{"size":309,"mtime":1607504507185,"results":"12","hashOfConfig":"13"},{"size":87,"mtime":1607504507181,"results":"14","hashOfConfig":"13"},{"size":3564,"mtime":1607532218056,"results":"15","hashOfConfig":"13"},{"size":297,"mtime":1607504507172,"results":"16","hashOfConfig":"13"},{"size":73,"mtime":1607504507180,"results":"17","hashOfConfig":"13"},{"size":231,"mtime":1607504507174,"results":"18","hashOfConfig":"13"},{"size":1212,"mtime":1607537102637,"results":"19","hashOfConfig":"13"},{"size":1745,"mtime":1607549962223,"results":"20","hashOfConfig":"13"},{"size":2160,"mtime":1607534877891,"results":"21","hashOfConfig":"13"},{"size":2320,"mtime":1607549951923,"results":"22","hashOfConfig":"13"},{"size":10382,"mtime":1607549930730,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1uc84gl",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"28","messages":"29","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"30","messages":"31","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"32","messages":"33","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"34","messages":"35","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"36","messages":"37","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"38","messages":"39","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":null},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js",["46"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",["47"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js",["48"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js",[],{"ruleId":"49","severity":1,"message":"50","line":1,"column":8,"nodeType":"51","messageId":"52","endLine":1,"endColumn":13},{"ruleId":"53","severity":1,"message":"54","line":18,"column":4,"nodeType":"55","endLine":18,"endColumn":22,"suggestions":"56"},{"ruleId":"53","severity":1,"message":"54","line":26,"column":8,"nodeType":"55","endLine":26,"endColumn":42,"suggestions":"57"},"no-unused-vars","'react' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'toHTML'. Either include it or remove the dependency array.","ArrayExpression",["58"],["59"],{"desc":"60","fix":"61"},{"desc":"62","fix":"63"},"Update the dependencies array to be: [toHTML, user.description]",{"range":"64","text":"65"},"Update the dependencies array to be: [member.description, member.color, toHTML]",{"range":"66","text":"67"},[564,582],"[toHTML, user.description]",[724,758],"[member.description, member.color, toHTML]"] \ No newline at end of file +[{"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js":"1","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js":"2","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js":"3","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js":"4","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js":"5","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js":"6","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js":"7","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js":"8","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js":"9","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js":"10","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js":"11"},{"size":329,"mtime":1607554515255,"results":"12","hashOfConfig":"13"},{"size":87,"mtime":1607504507181,"results":"14","hashOfConfig":"13"},{"size":3584,"mtime":1607553687490,"results":"15","hashOfConfig":"13"},{"size":297,"mtime":1607504507172,"results":"16","hashOfConfig":"13"},{"size":73,"mtime":1607504507180,"results":"17","hashOfConfig":"13"},{"size":231,"mtime":1607504507174,"results":"18","hashOfConfig":"13"},{"size":1212,"mtime":1607537102637,"results":"19","hashOfConfig":"13"},{"size":1745,"mtime":1607549962223,"results":"20","hashOfConfig":"13"},{"size":2160,"mtime":1607534877891,"results":"21","hashOfConfig":"13"},{"size":2320,"mtime":1607549951923,"results":"22","hashOfConfig":"13"},{"size":10382,"mtime":1607549930730,"results":"23","hashOfConfig":"13"},{"filePath":"24","messages":"25","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1rd8s2n",{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"29","messages":"30","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"31","messages":"32","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"33","messages":"34","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"35","messages":"36","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"37","messages":"38","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"39","usedDeprecatedRules":"28"},{"filePath":"40","messages":"41","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"42","usedDeprecatedRules":"28"},{"filePath":"43","messages":"44","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0,"usedDeprecatedRules":"28"},{"filePath":"45","messages":"46","errorCount":0,"warningCount":1,"fixableErrorCount":0,"fixableWarningCount":0,"source":"47","usedDeprecatedRules":"28"},{"filePath":"48","messages":"49","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\index.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\History.js",[],["50","51"],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\App.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Dash.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Constants\\constants.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Loading.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Navigation.js",["52"],"import react from 'react';\r\nimport * as BS from 'react-bootstrap'\r\nimport useDarkMode from 'use-dark-mode';\r\nimport Toggle from 'react-toggle'\r\nimport { FaSun, FaMoon } from \"react-icons/fa\";\r\n\r\nimport \"react-toggle/style.css\"\r\n\r\nexport default function Navigation(props) {\r\n \r\n const darkMode = useDarkMode(false);\r\n\r\n function logOut() {\r\n localStorage.removeItem(\"token\");\r\n localStorage.removeItem(\"user\");\r\n props.setIsSubmit(false);\r\n }\r\n\r\n return (\r\n \r\n \r\n pk-web\r\n \r\n \r\n \r\n {darkMode.value ? : }\r\n \r\n \r\n { localStorage.getItem('token') ? Log Out : \"\" }\r\n \r\n \r\n )\r\n}","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",["53"],"import React, { useState, useEffect } from 'react';\r\nimport * as BS from 'react-bootstrap'\r\n\r\nimport { FaAddressCard } from \"react-icons/fa\";\r\nimport defaultAvatar from '../default_discord_avatar.png'\r\n\r\nexport default function System(props) {\r\n\r\n const { toHTML } = require('../Functions/discord-parser.js');\r\n\r\n const [ desc, setDesc ] = useState(\"\");\r\n const user = JSON.parse(localStorage.getItem(\"user\"));\r\n\r\n useEffect(() => {\r\n if (user.description) {\r\n setDesc(toHTML(user.description));\r\n } else setDesc(\"(no description)\");\r\n}, [user.description]);\r\n\r\n return (\r\n \r\n \r\n {user.name} \r\n { user.avatar_url ? : \r\n }\r\n \r\n \r\n \r\n ID: {user.id}\r\n Tag: {user.tag}\r\n Timezone: {user.tz}\r\n \r\n

Description:

\r\n

\r\n
\r\n
\r\n )\r\n}\r\n\r\n \r\n\r\n ","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Memberlist.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\MemberCard.js",["54"],"import React, { useEffect, useState } from 'react';\r\nimport * as BS from 'react-bootstrap'\r\n\r\nimport defaultAvatar from '../default_discord_avatar.png'\r\nimport { FaUser } from \"react-icons/fa\";\r\n\r\nexport default function MemberCard(props) {\r\n\r\n const { toHTML } = require('../Functions/discord-parser.js');\r\n\r\n const [ desc, setDesc ] = useState(\"\");\r\n const [ color, setColor ] = useState(\"\");\r\n\r\n const member = props.member;\r\n\r\n useEffect(() => {\r\n if (member.description) {\r\n setDesc(toHTML(member.description));\r\n } else setDesc(\"(no description)\");\r\n\r\n if (member.color) {\r\n setColor(member.color);\r\n }\r\n else setColor('transparent');\r\n\r\n }, [member.description, member.color]);\r\n\r\n return (\r\n <> \r\n \r\n {member.name} ({member.id})\r\n { member.avatar_url ? : \r\n }\r\n \r\n \r\n \r\n \r\n ID: {member.id}\r\n { member.display_name ? AKA: {member.display_name} : \"\" }\r\n { member.birthday ? Birthday: {member.birthday} : \"\" }\r\n { member.pronouns ? Pronouns: {member.pronouns} : \"\" }\r\n { member.color ? Color: #{member.color} : \"\" }\r\n \r\n

Description:

\r\n

\r\n
\r\n
\r\n \r\n )\r\n}\r\n","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js",[],{"ruleId":"55","replacedBy":"56"},{"ruleId":"57","replacedBy":"58"},{"ruleId":"59","severity":1,"message":"60","line":1,"column":8,"nodeType":"61","messageId":"62","endLine":1,"endColumn":13},{"ruleId":"63","severity":1,"message":"64","line":18,"column":4,"nodeType":"65","endLine":18,"endColumn":22,"suggestions":"66"},{"ruleId":"63","severity":1,"message":"64","line":26,"column":8,"nodeType":"65","endLine":26,"endColumn":42,"suggestions":"67"},"no-native-reassign",["68"],"no-negated-in-lhs",["69"],"no-unused-vars","'react' is defined but never used.","Identifier","unusedVar","react-hooks/exhaustive-deps","React Hook useEffect has a missing dependency: 'toHTML'. Either include it or remove the dependency array.","ArrayExpression",["70"],["71"],"no-global-assign","no-unsafe-negation",{"desc":"72","fix":"73"},{"desc":"74","fix":"75"},"Update the dependencies array to be: [toHTML, user.description]",{"range":"76","text":"77"},"Update the dependencies array to be: [member.description, member.color, toHTML]",{"range":"78","text":"79"},[564,582],"[toHTML, user.description]",[724,758],"[member.description, member.color, toHTML]"] \ No newline at end of file diff --git a/src/404.html b/public/404.html similarity index 100% rename from src/404.html rename to public/404.html diff --git a/public/index.html b/public/index.html index 7f592b45..71d139ad 100644 --- a/public/index.html +++ b/public/index.html @@ -7,35 +7,8 @@ - - - - - - - pk-web + pk-webs + + +
+ diff --git a/src/App.js b/src/App.js index 9915bfb0..a8282e9b 100644 --- a/src/App.js +++ b/src/App.js @@ -60,7 +60,7 @@ export default function App() { return ( - + diff --git a/src/Custom.scss b/src/Custom.scss index 710d2801..ff98a401 100644 --- a/src/Custom.scss +++ b/src/Custom.scss @@ -8,7 +8,7 @@ color: $white; background-color: $gray-800; border: 1px solid #191c1f !important; - transition: background-color 0.3s ease; + } .dark-mode .card-body { @@ -22,7 +22,7 @@ background-color: $gray-900; transition: background-color 0.3s ease; } - + .navbar-light { background-color: $gray-100; } @@ -37,13 +37,20 @@ color: $gray-100 !important; } - .dark-mode .card .form-control { + .dark-mode .form-control { color: $gray-200; border-color: #191c1f; background-color: $gray-900; transition: background-color 0.3s ease; } + .dark-mode .form-control:focus { + color: $gray-200; + border-color: #191c1f; + background-color: $gray-900; + } + + .dark-mode .alert-danger { color: $white; background-color: $danger; diff --git a/src/index.js b/src/index.js index c54904ce..2626bf64 100644 --- a/src/index.js +++ b/src/index.js @@ -6,7 +6,7 @@ import './index.css'; import App from './App'; ReactDOM.render( - + , document.getElementById('root')