Skip to content
This repository was archived by the owner on Jan 31, 2019. It is now read-only.

Commit dfef971

Browse files
committed
version 1.1.3
1 parent 9a021f8 commit dfef971

File tree

12 files changed

+132
-22
lines changed

12 files changed

+132
-22
lines changed

assets/changelog-2.jpg

-47 KB
Binary file not shown.

assets/changelog.jpg

-3.18 KB
Loading

config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export default {
2-
HOST: 'http://localhost',
2+
HOST: 'http://ruarua.live',
33
}

index.html

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@
22
<html lang="en">
33
<head>
44
<meta charset="UTF-8">
5-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<meta http-equiv="X-UA-Compatible" content="ie=edge">
7-
<title>RUARUA.LIVE | 全球直播聚合</title>
5+
<title>RUARUA.LIVE - 全球直播聚合平台</title>
6+
<meta name="description" content="全球直播聚合平台">
7+
<meta name="viewport" content="width=device-width, initial-scale=1">
8+
<meta name="explanation" content="Microsoft browsers require custom 404 pages to be at least 512 bytes in length.">
89
<link rel="icon" type="image/png" href="/assets/logo-text.png">
910
</head>
1011
<body>

src/actions/cheeseActions.js

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* global API_HOST */
2+
import fetch from 'isomorphic-fetch';
3+
import config from '../../config';
4+
5+
const API_HOST = `${config.HOST}:3000`
6+
const url = '/api/cheese';
7+
8+
const REQUEST = 'cheese/REQUEST';
9+
const OK = 'cheese/OK';
10+
const ERROR = 'cheese/ERROR';
11+
12+
export const cheeseActions = {
13+
REQUEST,
14+
OK,
15+
ERROR,
16+
};
17+
18+
const getCheeseRequest = () => ({
19+
type: REQUEST,
20+
});
21+
22+
const getCheeseOk = payload => ({
23+
type: OK,
24+
payload,
25+
});
26+
27+
const getCheeseError = payload => ({
28+
type: ERROR,
29+
payload,
30+
});
31+
32+
33+
const getCheese = () => (dispatch) => {
34+
dispatch(getCheeseRequest());
35+
return fetch(`${API_HOST}${url}`)
36+
.then(res => res.json())
37+
.then(json => dispatch(getCheeseOk(json)))
38+
.catch(err => dispatch(getCheeseError(err)));
39+
};
40+
41+
export {
42+
getCheese,
43+
};

src/actions/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,5 @@ export * from './layoutsActions';
66
export * from './metadataActions';
77
export * from './emojiActions';
88
export * from './alertActions';
9-
export * from './inviteActions';
9+
export * from './inviteActions';
10+
export * from './cheeseActions';

src/components/Alert/Alert.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class Alert extends React.Component {
88
constructor(props) {
99
super(props)
1010
this.state = {
11-
autoHideDuration: 2500,
11+
autoHideDuration: 4000,
1212
};
1313
}
1414

src/components/Changelog/Changelog.jsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,18 @@ class ChangeLog extends React.Component {
4646
autoScrollBodyContent={true}
4747
>
4848
<section className={styles.changeLogSec}>
49-
<h4>版本更新<span>version 1.1.0</span></h4>
50-
<img src={require('../../../assets/changelog.jpg')} alt="" />
49+
<h4>版本更新<span>version 1.1.3</span></h4>
50+
<img src='/assets/changelog.jpg'alt="" />
5151
<h2>
5252
更新内容
5353
</h2>
5454
<ul>
55-
<li>添加搜索功能(针对roomTitle和roomAnchor的检索)</li>
56-
<li>添加观看分享功能(将当前观看房间发送至聊天, 其余用户点击相应分享可直接观看)</li>
57-
<li>添加类目平台分类功能</li>
58-
<li>优化视频显示比例</li>
59-
<li>优化图片按需加载</li>
60-
<li>依然一大堆BUG.. <strong>#NeedYOU!</strong></li>
55+
<li>添加网站ico以及meta信息</li>
56+
<li>优化类目栏展现</li>
57+
<li>添加Bilibili源(all和单机游戏类目)</li>
58+
<li>添加Github开源地址,期待你的加入 <strong><a href="https://github.com/EthanOrange/tv" target="_blank">View Github</a></strong></li>
59+
<li>添加赞助功能, 希望有能力的伙伴能和网站一同前行</li>
60+
<li>依然一大堆BUG和ISSUE <strong>#NeedYOU</strong></li>
6161
</ul>
6262
<div style={{
6363
textAlign: 'center'

src/components/Footer/Cheese.jsx

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import React from 'react';
2+
import {connect} from 'react-redux';
23
import Dialog from 'material-ui/Dialog';
34
import FlatButton from 'material-ui/FlatButton';
45
import IconButton from 'material-ui/IconButton';
5-
import styles from './Footer.css';
6+
import styles from './Footer.css';3
7+
import TextField from 'material-ui/TextField';
68

9+
import {
10+
alertOpen,
11+
getCheese,
12+
} from 'actions';
713
import {IconCheese} from '../Icons';
814

915
/**
@@ -12,16 +18,16 @@ import {IconCheese} from '../Icons';
1218
*
1319
* You can also close this dialog by clicking outside the dialog, or with the 'Esc' key.
1420
*/
15-
export default class Cheese extends React.Component {
21+
class Cheese extends React.Component {
1622
constructor(props) {
1723
super(props)
1824
this.handleOpen = this.handleOpen.bind(this)
1925
this.handleClose = this.handleClose.bind(this)
2026
this.handleCheese = this.handleCheese.bind(this)
27+
this.handleSubmit = this.handleSubmit.bind(this)
2128

2229
this.state = {
2330
open: false,
24-
cheese: false,
2531
};
2632
}
2733

@@ -33,19 +39,28 @@ export default class Cheese extends React.Component {
3339
this.setState({open: false});
3440
};
3541

42+
handleSubmit() {
43+
this.props.alertOpen('RUARUA.live有您的支持甚感荣幸, 24小时之内您将出现在赞助榜单中.')
44+
//this.props.getCheese() 等待cheese接口
45+
this.handleClose()
46+
}
47+
3648
handleCheese() {
3749
this.setState({
3850
cheese: true,
3951
})
4052
}
4153

4254
render() {
55+
const submitText = '扫码赞助之后请点这里';
56+
const submitAction = this.handleSubmit;
57+
4358
const actions = [
4459
<FlatButton
45-
label="扫码赞助之后请点这里"
60+
label={submitText}
4661
primary={true}
4762
keyboardFocused={true}
48-
onTouchTap={this.handleCheese}
63+
onTouchTap={submitAction}
4964
/>,
5065
<FlatButton
5166
label="下次再说"
@@ -55,6 +70,8 @@ export default class Cheese extends React.Component {
5570
];
5671

5772
return (
73+
74+
5875
<div className={styles.btn}>
5976
<IconButton
6077
tooltip="给予赞助"
@@ -75,7 +92,7 @@ export default class Cheese extends React.Component {
7592
<div className={styles.cheeseContent}>
7693
<section>
7794
<h2>需要你的帮助!</h2>
78-
<p>RUARUA.live是无盈利的开源站点,如果您对网站有兴趣,希望网站持续提供优质资源, 也许您能帮我们分担一点服务器费用...</p>
95+
<p>RUARUA.live是无盈利的开源站点,如果您对网站有兴趣,希望网站持续提供优质资源, 也许您能帮我分担一点服务器费用...</p>
7996
</section>
8097
<section className={styles.payContent}>
8198
<section className={styles.cheeseSvgBox}>
@@ -100,4 +117,11 @@ export default class Cheese extends React.Component {
100117
</div>
101118
);
102119
}
103-
}
120+
}
121+
122+
const mapDispatchToProps = (dispatch, ownProps) => ({
123+
alertOpen: (clas) => dispatch(alertOpen(clas)),
124+
getCheese: (body) => dispatch(getCheese(body)),
125+
})
126+
127+
export default connect(null, mapDispatchToProps)(Cheese)

src/components/Nav/Nav.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class Nav extends React.Component {
5555
<section className={styles.copySec}>
5656
<Github />
5757
<Cheese />
58-
<Bug />
58+
{/*<Bug />*/}
5959
</section>
6060
</div>
6161
)

0 commit comments

Comments
 (0)