Browse Source

结构与界面

pull/6/head
hole-thu 5 years ago
parent
commit
7199d5ecf4
  1. 1
      .gitignore
  2. 24
      public/index.html
  3. 2
      src/UserAction.js
  4. 1
      src/fonts_7/icomoon.css
  5. 0
      src/fonts_7/icomoon.svg
  6. 0
      src/fonts_7/icomoon.ttf
  7. 0
      src/fonts_7/icomoon.woff
  8. 1
      src/index.js
  9. 6
      src/infrastructure/widgets.js

1
.gitignore vendored

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

24
public/index.html

@ -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>

2
src/UserAction.js

@ -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">

1
public/static/fonts_7/icomoon.css → src/fonts_7/icomoon.css

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

0
public/static/fonts_7/icomoon.svg → src/fonts_7/icomoon.svg

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
public/static/fonts_7/icomoon.ttf → src/fonts_7/icomoon.ttf

0
public/static/fonts_7/icomoon.woff → src/fonts_7/icomoon.woff

1
src/index.js

@ -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';

6
src/infrastructure/widgets.js

@ -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大树洞

Loading…
Cancel
Save