diff --git a/src/BalanceShower.js b/src/BalanceShower.js
index 86ebf52..97f7c97 100644
--- a/src/BalanceShower.js
+++ b/src/BalanceShower.js
@@ -63,7 +63,7 @@ export class BalanceShower extends PureComponent {
else if(this.state.loading_status==='error')
return (
);
else if(this.state.loading_status==='done')
- return (校园卡 ¥{this.state.balance}
);
+ return (校园卡 ¥{this.state.balance.toFixed(2)}
);
else
return null;
}
diff --git a/src/Flows.css b/src/Flows.css
index d8af56a..5965922 100644
--- a/src/Flows.css
+++ b/src/Flows.css
@@ -15,7 +15,7 @@
.root-dark-mode .box {
background-color: var(--box-bgcolor-dark);
color: var(--foreground-dark);
- box-shadow: 0 0 5px rgba(255,255,255,.15);
+ box-shadow: 0 0 3px rgba(255,255,255,.2);
}
.root-dark-mode .sidebar .box {
@@ -145,7 +145,7 @@
}
.box-header, .box-footer {
- font-size: small;
+ font-size: .8em;
}
.flow-item-row p.img {
@@ -161,7 +161,7 @@
}
.root-dark-mode .flow-item-row p.img img {
- filter: brightness(.8);
+ filter: brightness(.85);
}
.box-header-badge {
diff --git a/src/Sidebar.css b/src/Sidebar.css
index 576f834..a255479 100644
--- a/src/Sidebar.css
+++ b/src/Sidebar.css
@@ -24,7 +24,7 @@
opacity: .5;
}
.root-dark-mode .sidebar-on .sidebar-shadow:active {
- opacity: .3;
+ opacity: .65;
}
.sidebar {
diff --git a/src/UserAction.js b/src/UserAction.js
index 285204f..29dc2cc 100644
--- a/src/UserAction.js
+++ b/src/UserAction.js
@@ -109,7 +109,7 @@ export class LoginForm extends Component {
})
.catch((e)=>{
console.error(e);
- alert('发送失败。'+e);
+ alert('发送失败\n'+e);
this.setState({
loading_status: 'done',
});
@@ -139,20 +139,19 @@ export class LoginForm extends Component {
.then(get_json)
.then((json)=>{
if(json.code!==0) {
- if(json.msg) alert(json.msg);
+ if(json.msg) throw new Error(json.msg);
throw new Error(JSON.stringify(json));
}
- let freshman_welcome=json.uid.indexOf('19')===0 && (+new Date())<1567958400000; // 2019-09-09 0:00 GMT+8
set_token(json.user_token);
- alert(`成功以 ${json.name} 的身份登录`+(freshman_welcome ? '\n欢迎来到北京大学!' : ''));
+ alert(`成功以 ${json.name} 的身份登录`);
this.setState({
loading_status: 'done',
});
})
.catch((e)=>{
console.error(e);
- alert('登录失败');
+ alert('登录失败\n'+e);
this.setState({
loading_status: 'done',
});
diff --git a/src/index.js b/src/index.js
index 80546cc..e2a3d40 100644
--- a/src/index.js
+++ b/src/index.js
@@ -2,10 +2,10 @@ import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
-import {elevate} from './infrastructure/elevator';
+//import {elevate} from './infrastructure/elevator';
import registerServiceWorker from './registerServiceWorker';
-elevate();
+//elevate();
ReactDOM.render(, document.getElementById('root'));
registerServiceWorker();