fix some UI issues
This commit is contained in:
@@ -398,15 +398,15 @@
|
|||||||
margin: 0 0.25em;
|
margin: 0 0.25em;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-content-wrapper {
|
.box-post {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-content-wrapper .box-content {
|
.box .box-post-main {
|
||||||
flex: 1 1;
|
flex: 1 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-content-wrapper .box-content-vote {
|
.box .box-post-vote {
|
||||||
flex: 0 0;
|
flex: 0 0;
|
||||||
margin-left: 6px;
|
margin-left: 6px;
|
||||||
}
|
}
|
||||||
|
|||||||
52
src/Flows.js
52
src/Flows.js
@@ -246,12 +246,13 @@ class FlowItem extends PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
<div
|
<div
|
||||||
className="box"
|
className="box box-post"
|
||||||
style={{
|
style={{
|
||||||
'--box-bgcolor-light': _display_color[0],
|
'--box-bgcolor-light': _display_color[0],
|
||||||
'--box-bgcolor-dark': _display_color[1],
|
'--box-bgcolor-dark': _display_color[1],
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
<div className="box-post-main">
|
||||||
{!!window.LATEST_POST_ID &&
|
{!!window.LATEST_POST_ID &&
|
||||||
parseInt(info.pid, 10) > window.LATEST_POST_ID && (
|
parseInt(info.pid, 10) > window.LATEST_POST_ID && (
|
||||||
<div className="flow-item-dot" />
|
<div className="flow-item-dot" />
|
||||||
@@ -338,7 +339,10 @@ class FlowItem extends PureComponent {
|
|||||||
placeholder="编辑折叠警告"
|
placeholder="编辑折叠警告"
|
||||||
onChange={this.on_cw_change.bind(this)}
|
onChange={this.on_cw_change.bind(this)}
|
||||||
/>
|
/>
|
||||||
<button type="button" onClick={(e) => do_edit_cw(cw, info.pid)}>
|
<button
|
||||||
|
type="button"
|
||||||
|
onClick={(e) => do_edit_cw(cw, info.pid)}
|
||||||
|
>
|
||||||
更新
|
更新
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@@ -349,7 +353,6 @@ class FlowItem extends PureComponent {
|
|||||||
{!!info.hot_score && (
|
{!!info.hot_score && (
|
||||||
<span className="box-header">hot score: {info.hot_score}</span>
|
<span className="box-header">hot score: {info.hot_score}</span>
|
||||||
)}
|
)}
|
||||||
<div className="box-content-wrapper">
|
|
||||||
<div className="box-content">
|
<div className="box-content">
|
||||||
<HighlightedMarkdown
|
<HighlightedMarkdown
|
||||||
text={info.text}
|
text={info.text}
|
||||||
@@ -358,8 +361,30 @@ class FlowItem extends PureComponent {
|
|||||||
search_param={search_param}
|
search_param={search_param}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
{info.poll && (
|
||||||
|
<div className="box-poll">
|
||||||
|
<Poll
|
||||||
|
key={info.poll.answers.map((a) => a.votes).join('_')}
|
||||||
|
question={''}
|
||||||
|
answers={info.poll.answers}
|
||||||
|
onVote={do_vote}
|
||||||
|
customStyles={{ theme: 'cyan' }}
|
||||||
|
noStorage={true}
|
||||||
|
vote={
|
||||||
|
localStorage['VOTE_RECORD:' + info.pid] || info.poll.vote
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!!(attention && info.variant.latest_reply) && (
|
||||||
|
<p className="box-footer">
|
||||||
|
最新回复{' '}
|
||||||
|
<Time stamp={info.variant.latest_reply} short={false} />
|
||||||
|
</p>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
{do_react && (
|
{do_react && (
|
||||||
<div className="box-content-vote">
|
<div className="box-post-vote">
|
||||||
<span
|
<span
|
||||||
className="clickable"
|
className="clickable"
|
||||||
onClick={() => do_react(info.reaction_status === 1 ? 0 : 1)}
|
onClick={() => do_react(info.reaction_status === 1 ? 0 : 1)}
|
||||||
@@ -402,25 +427,6 @@ class FlowItem extends PureComponent {
|
|||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
{info.poll && (
|
|
||||||
<div className="box-poll">
|
|
||||||
<Poll
|
|
||||||
key={info.poll.answers.map((a) => a.votes).join('_')}
|
|
||||||
question={''}
|
|
||||||
answers={info.poll.answers}
|
|
||||||
onVote={do_vote}
|
|
||||||
customStyles={{ theme: 'cyan' }}
|
|
||||||
noStorage={true}
|
|
||||||
vote={localStorage['VOTE_RECORD:' + info.pid] || info.poll.vote}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{!!(attention && info.variant.latest_reply) && (
|
|
||||||
<p className="box-footer">
|
|
||||||
最新回复 <Time stamp={info.variant.latest_reply} short={false} />
|
|
||||||
</p>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -317,6 +317,7 @@ a.app-switcher-item,
|
|||||||
|
|
||||||
.time-str {
|
.time-str {
|
||||||
color: #999999;
|
color: #999999;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.button {
|
a.button {
|
||||||
|
|||||||
Reference in New Issue
Block a user