结构与界面

This commit is contained in:
2020-09-12 12:29:34 +08:00
parent 1932e8910b
commit 7199d5ecf4
9 changed files with 30 additions and 5 deletions

1
.gitignore vendored
View File

@@ -2,3 +2,4 @@
node_modules/
/build/
build.*
*.log

View File

@@ -6,8 +6,6 @@
<link rel="icon" href="%PUBLIC_URL%/static/favicon/512.png">
<meta name="format-detection" content="telephone=no">
<link rel="stylesheet" href="%PUBLIC_URL%/static/fonts_7/icomoon.css" />
<meta name="mobile-web-app-capable" content="yes">
<link rel="shortcut icon" href="%PUBLIC_URL%/static/favicon/512.png">
<link rel="manifest" href="./static/manifest.json">
@@ -26,6 +24,26 @@
<title>新T树洞</title>
</head>
<body>
<div id="root">请开启javascript,或稍等片刻</div>
<div id="root">
请开启javascript,或 <a href="#" onClick="foce_reload">强制刷新</a>
</div>
</body>
<script>
foce_reload() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker
.getRegistrations()
.then((registrations) => {
for (let registration of registrations) {
console.log('unregister', registration);
registration.unregister();
}
});
}
cache().clear();
setTimeout(() => {
window.location.reload(true);
}, 200);
}
</script>
</html>

View File

@@ -56,6 +56,7 @@ export function InfoSidebar(props) {
<span className="icon icon-textfile" />
<label>树洞规范试行</label>
</a>
<p><em>强烈建议开始使用前先看一遍所有设置选项</em></p>
</div>
<div className="box help-desc-box">
<p>
@@ -85,6 +86,7 @@ export function InfoSidebar(props) {
</div>
<div className="box help-desc-box">
<p>意见反馈请加tag #意见反馈 或到github后端的issue区</p>
<p>新T树洞强烈期待有其他更多树洞的出现一起分布式互联构建清华树洞族详情见 关于 中的描述</p>
<p>联系我们<a href={"mailto:"+EMAIL}>{EMAIL}</a> </p>
</div>
<div className="box help-desc-box">

View File

@@ -110,3 +110,4 @@
}
.icon-trash:before {
content: "\1f5d1";
}

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,6 +1,7 @@
import React from 'react';
import ReactDOM from 'react-dom';
import './index.css';
import './fonts_7/icomoon.css'
import App from './App';
//import {elevate} from './infrastructure/elevator';
import registerServiceWorker from './registerServiceWorker';

View File

@@ -59,10 +59,12 @@ class LoginPopupSelf extends Component {
this.input_token_ref=React.createRef();
};
setThuhole(tar, ref) {
setThuhole(e, tar, ref) {
console.log(tar);
e.preventDefault();
tar.href = '/_login?p=thuhole&token=' + ref.current.value;
console.log(tar);
alert('应T大树洞要求已停止T大树洞token登陆');
}
render() {
@@ -84,7 +86,7 @@ class LoginPopupSelf extends Component {
<input ref={this.input_token_ref} placeholder="T大树洞Token" />
<br/>
<a href="/_login?p=thuhole" target="_blank"
onClick={(e) =>{this.setThuhole(e.target, this.input_token_ref)}}
onClick={(e) =>{this.setThuhole(e, e.target, this.input_token_ref)}}
>
<span className="icon icon-login" />
&nbsp;T大树洞