From a7072b3fd98007e7048418f3f072df3241ed7dda Mon Sep 17 00:00:00 2001 From: "sigonasr2, Sig, Sigo" Date: Tue, 10 Aug 2021 06:41:13 +0000 Subject: [PATCH] Add in dynamic title changing --- package-lock.json | 47 ++++++++++++++++++++++++++++++++++++++++++++--- package.json | 2 ++ src/App.js | 35 +++++++++++++++++++++++++++++++++++ 3 files changed, 81 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index c49932a..53b6298 100644 --- a/package-lock.json +++ b/package-lock.json @@ -4048,6 +4048,11 @@ "resolved": "https://registry.npmjs.org/char-regex/-/char-regex-1.0.2.tgz", "integrity": "sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==" }, + "charenc": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", + "integrity": "sha1-wKHS86cJLgN3S/qD8UwPxXkKhmc=" + }, "check-types": { "version": "11.1.2", "resolved": "https://registry.npmjs.org/check-types/-/check-types-11.1.2.tgz", @@ -4490,6 +4495,11 @@ } } }, + "crypt": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", + "integrity": "sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs=" + }, "crypto-browserify": { "version": "3.12.0", "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", @@ -9962,6 +9972,16 @@ "object-visit": "^1.0.0" } }, + "md5": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", + "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", + "requires": { + "charenc": "0.0.2", + "crypt": "0.0.2", + "is-buffer": "~1.1.6" + } + }, "md5.js": { "version": "1.3.5", "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", @@ -12517,11 +12537,27 @@ "resolved": "https://registry.npmjs.org/react-error-overlay/-/react-error-overlay-6.0.9.tgz", "integrity": "sha512-nQTTcUu+ATDbrSD1BZHr5kgSD4oF8OFjxun8uAaL8RwPBacGBNPf/yAuVVdx17N8XNzRDMrZ9XcKZHCjPW+9ew==" }, + "react-fast-compare": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/react-fast-compare/-/react-fast-compare-3.2.0.tgz", + "integrity": "sha512-rtGImPZ0YyLrscKI9xTpV8psd6I8VAtjKCzQDlzyDvqJA8XOW78TXYQwNRNd8g8JZnDu8q9Fu/1v4HPAVwVdHA==" + }, "react-global-key-down-hook": { "version": "0.2.1", "resolved": "https://registry.npmjs.org/react-global-key-down-hook/-/react-global-key-down-hook-0.2.1.tgz", "integrity": "sha512-7bi/jJlD6VlRird5VJTKow3q28pWn6H36zhOzBmKGgklAdEjqqwyjX0vxBcHlohd08VcUUBiLxRJ/7oz3IZOiQ==" }, + "react-helmet": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/react-helmet/-/react-helmet-6.1.0.tgz", + "integrity": "sha512-4uMzEY9nlDlgxr61NL3XbKRy1hEkXmKNXhjbAIOVw5vcFrsdYbH2FEwcNyWvWinl103nXgzYNlns9ca+8kFiWw==", + "requires": { + "object-assign": "^4.1.1", + "prop-types": "^15.7.2", + "react-fast-compare": "^3.1.1", + "react-side-effect": "^2.1.0" + } + }, "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", @@ -12700,6 +12736,11 @@ } } }, + "react-side-effect": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/react-side-effect/-/react-side-effect-2.1.1.tgz", + "integrity": "sha512-2FoTQzRNTncBVtnzxFOk2mCpcfxQpenBMbk5kSVBg5UcPqV9fRbgY2zhb7GTWWOlpFmAxhClBDlIq8Rsubz1yQ==" + }, "react-toggle": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/react-toggle/-/react-toggle-4.1.2.tgz", @@ -14434,9 +14475,9 @@ "integrity": "sha512-4WK/bYZmj8xLr+HUCODHGF1ZFzsYffasLUgEiMBY4fgtltdO6B4WJtlSbPaDTLpYTcGVwM2qLnFTICEcNxs3kA==" }, "tar": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.0.tgz", - "integrity": "sha512-DUCttfhsnLCjwoDoFcI+B2iJgYa93vBnDUATYEeRx6sntCTdN01VnqsIuTlALXla/LWooNg0yEGeB+Y8WdFxGA==", + "version": "6.1.7", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.7.tgz", + "integrity": "sha512-PBoRkOJU0X3lejJ8GaRCsobjXTgFofRDSPdSUhRSdlwJfifRlQBwGXitDItdGFu0/h0XDMCkig0RN1iT7DBxhA==", "requires": { "chownr": "^2.0.0", "fs-minipass": "^2.0.0", diff --git a/package.json b/package.json index 03a3213..aae6ea3 100644 --- a/package.json +++ b/package.json @@ -12,10 +12,12 @@ "csv-parse": "^4.16.0", "express": "^4.17.1", "gh-pages": "^3.2.3", + "md5": "^2.3.0", "react": "^17.0.2", "react-bootstrap-icons": "^1.5.0", "react-dom": "^16.14.0", "react-global-key-down-hook": "^0.2.1", + "react-helmet": "^6.1.0", "react-modal": "^3.14.3", "react-router": "^5.2.0", "react-router-dom": "^5.2.0", diff --git a/src/App.js b/src/App.js index 111883a..62d72c1 100644 --- a/src/App.js +++ b/src/App.js @@ -3,6 +3,7 @@ import './style.css'; // The new new import React, {useState,useEffect,useReducer} from 'react'; import useGlobalKeyDown from 'react-global-key-down-hook' import Toggle from 'react-toggle' //Tooltip props: http://aaronshaf.github.io/react-toggle/ +import Helmet from 'react-helmet' import {XSquareFill, PlusCircle, LifePreserver, Server, CloudUploadFill} from 'react-bootstrap-icons' @@ -35,6 +36,7 @@ const PARRY_COUNTER = 4 //NOT USED YET*/ const BACKENDURL=process.env.REACT_APP_GITPOD_WORKSPACE_URL||process.env.REACT_APP_BACKENDURL||'https://projectdivar.com:4504' +const APP_TITLE = "NGSplanner" function GetBackendURL(p) { return (BACKENDURL)+(p.TESTMODE?"/test":"") @@ -400,6 +402,10 @@ function AdminPanel(p) {
{navigationData.map((nav)=>(nav.duplicate===undefined&&nav.hr===undefined)&& + + {APP_TITLE+" - Admin Panel: "+nav.page} + +

{nav.page}

)} @@ -563,6 +569,9 @@ function DamageCalculator(p) { } +function LoginForm(p) { + return <>Login Form here. +} function App() { @@ -603,6 +612,9 @@ function App() { const [DATA,setDATA] = useState({GetData:()=>{}}) const [DATAID,setDATAID] = useState({GetData:()=>{}}) + const [LOGGEDINUSER,setLOGGEDINUSER] = useState(undefined) + const [LOGGEDINHASH,setLOGGEDINHASH] = useState(undefined) + function GetData(table,row,col,id){ var data = id?DATAID:DATA @@ -626,10 +638,16 @@ function App() { + + {APP_TITLE+" - Admin Panel"} + + + {APP_TITLE+" - Test"} + + + + {APP_TITLE+" - Login"} + + + + + + + {APP_TITLE+" - Register"} + + + Register form here. + + + {APP_TITLE} +