diff --git a/client/pages/adminpage.js b/client/pages/adminpage.js
index 9b08e58c..0a034176 100644
--- a/client/pages/adminpage.js
+++ b/client/pages/adminpage.js
@@ -53,19 +53,24 @@ export class AdminPage extends React.Component {
constructor(props){
super(props);
this.state = {
- isAdmin: null
+ isAdmin: null,
+ isSaving: false
};
}
+ isSaving(yesOrNo){
+ this.setState({isSaving: yesOrNo});
+ }
+
render(){
return (
-
+
-
+ } />
@@ -82,10 +87,16 @@ export class AdminPage extends React.Component {
const SideMenu = (props) => {
return (
-
-
-
-
+ { props.isLoading ?
+
+
+
+
:
+
+
+
+
+ }
{ t("Admin console") }
-
diff --git a/client/pages/adminpage.scss b/client/pages/adminpage.scss
index eae5f7c2..5167c7fe 100644
--- a/client/pages/adminpage.scss
+++ b/client/pages/adminpage.scss
@@ -121,6 +121,8 @@
}
}
.header{
+ display: block;
+ height: 40px;
img{
width: 40px;
height: 40px;
diff --git a/client/pages/adminpage/config.js b/client/pages/adminpage/config.js
index cdb8da82..c3b78061 100644
--- a/client/pages/adminpage/config.js
+++ b/client/pages/adminpage/config.js
@@ -1,7 +1,8 @@
import React from 'react';
import { FormBuilder } from '../../components/';
import { Config } from '../../model/';
-import { format } from '../../helpers';
+import { format, notify } from '../../helpers';
+import { t } from '../../locales/';
export class ConfigPage extends React.Component {
constructor(props){
@@ -36,8 +37,13 @@ export class ConfigPage extends React.Component {
onChange(form){
form.connections = window.CONFIG.connections;
- Config.save(form);
- this.setState({refresh: Math.random()});
+ this.props.isSaving(true);
+ Config.save(form, true, () => {
+ this.props.isSaving(false);
+ }, (err) => {
+ notify.send(err || t('Oops'), 'error');
+ this.props.isSaving(false);
+ });
}
render(){