Fixed some bugs

- Didn't add token to URL for settings
- Auth collapse wouldn't hide
This commit is contained in:
Henry Whitaker
2020-08-21 18:20:15 +01:00
parent a49979daae
commit 79a85fdba9
7 changed files with 19 additions and 148842 deletions

10907
public/css/app.css vendored

File diff suppressed because one or more lines are too long

137935
public/js/app.js vendored

File diff suppressed because one or more lines are too long

View File

@@ -30,6 +30,14 @@ License: MIT
* Released under the MIT License * Released under the MIT License
*/ */
/*!
* JavaScript Cookie v2.2.1
* https://github.com/js-cookie/js-cookie
*
* Copyright 2006, 2015 Klaus Hartl & Fagner Brack
* Released under the MIT license
*/
/*! /*!
* Sizzle CSS Selector Engine v2.3.5 * Sizzle CSS Selector Engine v2.3.5
* https://sizzlejs.com/ * https://sizzlejs.com/

View File

@@ -15,7 +15,7 @@ export default class Authentication extends Component {
} }
toggleCollapse = () => { toggleCollapse = () => {
if(this.state.show) { if(this.state.showCollapse) {
this.setState({ this.setState({
showCollapse: false showCollapse: false
}); });
@@ -27,7 +27,7 @@ export default class Authentication extends Component {
} }
toggleModal = () => { toggleModal = () => {
if(this.state.show) { if(this.state.showModal) {
this.setState({ this.setState({
showModal: false showModal: false
}); });

View File

@@ -57,6 +57,9 @@ export default class ResetPassword extends Component {
.then((resp) => { .then((resp) => {
toast.success('Password updated'); toast.success('Password updated');
this.toggleModal(); this.toggleModal();
if(this.state.logoutDevices == true) {
location.reload(true);
}
}) })
.catch((err) => { .catch((err) => {
if(err.response) { if(err.response) {

View File

@@ -20,7 +20,7 @@ export default class Setting extends Component {
} }
update = () => { update = () => {
var url = 'api/settings'; var url = 'api/settings?token=' + window.token;
var data = { var data = {
name: this.state.name, name: this.state.name,
value: this.state.value value: this.state.value

View File

@@ -23,7 +23,7 @@ export default class SettingWithModal extends Component {
} }
update = () => { update = () => {
var url = 'api/settings/bulk'; var url = 'api/settings/bulk?token=' + window.token;
var data = []; var data = [];
var settings = this.state.settings; var settings = this.state.settings;