Tweak system editing
This commit is contained in:
parent
806c7857f5
commit
759c14c6db
@ -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","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Footer.js":"12"},{"size":329,"mtime":1607554515255,"results":"13","hashOfConfig":"14"},{"size":87,"mtime":1607504507181,"results":"15","hashOfConfig":"14"},{"size":3653,"mtime":1607797066710,"results":"16","hashOfConfig":"14"},{"size":243,"mtime":1607696817140,"results":"17","hashOfConfig":"14"},{"size":73,"mtime":1607504507180,"results":"18","hashOfConfig":"14"},{"size":231,"mtime":1607504507174,"results":"19","hashOfConfig":"14"},{"size":1217,"mtime":1607794085434,"results":"20","hashOfConfig":"14"},{"size":9824,"mtime":1607782981715,"results":"21","hashOfConfig":"14"},{"size":11853,"mtime":1607798645447,"results":"22","hashOfConfig":"14"},{"size":18674,"mtime":1607793151702,"results":"23","hashOfConfig":"14"},{"size":10382,"mtime":1607549930730,"results":"24","hashOfConfig":"14"},{"size":741,"mtime":1607797507192,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1uc84gl",{"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":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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",[],"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",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",[],"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",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Footer.js",[]]
|
[{"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","C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Footer.js":"12"},{"size":329,"mtime":1607554515255,"results":"13","hashOfConfig":"14"},{"size":87,"mtime":1607504507181,"results":"15","hashOfConfig":"14"},{"size":3653,"mtime":1607797066710,"results":"16","hashOfConfig":"14"},{"size":243,"mtime":1607696817140,"results":"17","hashOfConfig":"14"},{"size":73,"mtime":1607504507180,"results":"18","hashOfConfig":"14"},{"size":231,"mtime":1607504507174,"results":"19","hashOfConfig":"14"},{"size":1217,"mtime":1607794085434,"results":"20","hashOfConfig":"14"},{"size":9865,"mtime":1607803350196,"results":"21","hashOfConfig":"14"},{"size":11741,"mtime":1607802668024,"results":"22","hashOfConfig":"14"},{"size":18808,"mtime":1607802403097,"results":"23","hashOfConfig":"14"},{"size":10382,"mtime":1607549930730,"results":"24","hashOfConfig":"14"},{"size":741,"mtime":1607797507192,"results":"25","hashOfConfig":"14"},{"filePath":"26","messages":"27","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"1uc84gl",{"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":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"38","messages":"39","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"40","messages":"41","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"42","messages":"43","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"44","messages":"45","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"46","messages":"47","errorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"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",[],"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",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\System.js",[],"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",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Functions\\discord-parser.js",[],"C:\\Users\\Fleur\\Desktop\\website projects etc\\pk-web\\src\\Components\\Footer.js",[]]
|
@ -4,6 +4,7 @@ import { useForm } from "react-hook-form";
|
|||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import Popup from 'reactjs-popup';
|
import Popup from 'reactjs-popup';
|
||||||
import 'reactjs-popup/dist/index.css';
|
import 'reactjs-popup/dist/index.css';
|
||||||
|
import autosize from 'autosize';
|
||||||
|
|
||||||
import API_URL from "../Constants/constants.js";
|
import API_URL from "../Constants/constants.js";
|
||||||
|
|
||||||
@ -57,6 +58,10 @@ export default function MemberCard(props) {
|
|||||||
handleSubmit: handleSubmitProxy,
|
handleSubmit: handleSubmitProxy,
|
||||||
} = useForm();
|
} = useForm();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
autosize(document.querySelector('textarea'));
|
||||||
|
})
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const { toHTML } = require('../Functions/discord-parser.js');
|
const { toHTML } = require('../Functions/discord-parser.js');
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import * as BS from 'react-bootstrap'
|
|||||||
import Popup from 'reactjs-popup';
|
import Popup from 'reactjs-popup';
|
||||||
import 'reactjs-popup/dist/index.css';
|
import 'reactjs-popup/dist/index.css';
|
||||||
import { useForm } from "react-hook-form";
|
import { useForm } from "react-hook-form";
|
||||||
import autosize from 'autosize';
|
|
||||||
|
|
||||||
import MemberCard from './MemberCard.js'
|
import MemberCard from './MemberCard.js'
|
||||||
import Loading from "./Loading.js";
|
import Loading from "./Loading.js";
|
||||||
@ -59,10 +58,6 @@ export default function Memberlist(props) {
|
|||||||
fetchMembers();
|
fetchMembers();
|
||||||
}, [fetchMembers])
|
}, [fetchMembers])
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
autosize(document.querySelector('textarea'));
|
|
||||||
})
|
|
||||||
|
|
||||||
function addProxyField() {
|
function addProxyField() {
|
||||||
setProxyTags(oldTags => [...oldTags, {prefix: '', suffix: ''}] )
|
setProxyTags(oldTags => [...oldTags, {prefix: '', suffix: ''}] )
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,7 @@ const submitEdit = data => {
|
|||||||
'Content-Type': 'application/json',
|
'Content-Type': 'application/json',
|
||||||
'Authorization': JSON.stringify(localStorage.getItem("token")).slice(1, -1)
|
'Authorization': JSON.stringify(localStorage.getItem("token")).slice(1, -1)
|
||||||
}}).then (res => res.json()
|
}}).then (res => res.json()
|
||||||
).then ( data => { setUser(prevState => {return {...prevState, ...data}}); localStorage.setItem('user', JSON.stringify(user)); setEditMode(false)}
|
).then ( () => { setUser(prevState => {return {...prevState, ...data}}); localStorage.setItem('user', JSON.stringify(user)); setEditMode(false)}
|
||||||
).catch (error => {
|
).catch (error => {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
setErrorAlert(true);
|
setErrorAlert(true);
|
||||||
@ -114,7 +114,8 @@ const submitPrivacy = data => {
|
|||||||
{ errorAlert ? <BS.Alert variant="danger">Something went wrong, please try logging in and out again.</BS.Alert> : "" }
|
{ errorAlert ? <BS.Alert variant="danger">Something went wrong, please try logging in and out again.</BS.Alert> : "" }
|
||||||
{ editMode ?
|
{ editMode ?
|
||||||
<BS.Form onSubmit={handleSubmitEdit(submitEdit)}>
|
<BS.Form onSubmit={handleSubmitEdit(submitEdit)}>
|
||||||
{/* <BS.Form.Text className='mb-4'>Note: changes here may take a while to be reflected on the bot. This is due to the bot caching data.<br/> Try editing a member after to make the changes show up.</BS.Form.Text> */}
|
<BS.Form.Text className='mb-4'><b>Note:</b> if you refresh the page, the old data might show up again, this is due to the bot caching data.<br/>
|
||||||
|
Try editing a member to clear the cache, or wait a few minutes before refreshing.</BS.Form.Text>
|
||||||
<BS.Form.Row>
|
<BS.Form.Row>
|
||||||
<BS.Col className="mb-lg-2" xs={12} lg={3}>
|
<BS.Col className="mb-lg-2" xs={12} lg={3}>
|
||||||
<BS.Form.Label>Name:</BS.Form.Label>
|
<BS.Form.Label>Name:</BS.Form.Label>
|
||||||
|
Loading…
Reference in New Issue
Block a user