ux update
This commit is contained in:
@@ -55,7 +55,6 @@
|
|||||||
font-size: .9em;
|
font-size: .9em;
|
||||||
vertical-align: .05em;
|
vertical-align: .05em;
|
||||||
cursor: inherit;
|
cursor: inherit;
|
||||||
}
|
padding: 0 .1rem;
|
||||||
.icon+label::before {
|
margin-left: .15rem;
|
||||||
content: ' ';
|
|
||||||
}
|
}
|
||||||
33
src/Flows.js
33
src/Flows.js
@@ -342,6 +342,15 @@ class FlowSidebar extends PureComponent {
|
|||||||
replies_cnt[r.name]++;
|
replies_cnt[r.name]++;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
let main_thread_elem=(
|
||||||
|
<ClickHandler callback={(e)=>{this.show_reply_bar('',e);}}>
|
||||||
|
<FlowItem info={this.state.info} attention={this.state.attention} img_clickable={true}
|
||||||
|
color_picker={this.color_picker} show_pid={show_pid} replies={this.state.replies}
|
||||||
|
set_variant={(variant)=>{this.set_variant(null,variant);}}
|
||||||
|
/>
|
||||||
|
</ClickHandler>
|
||||||
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flow-item-row sidebar-flow-item">
|
<div className="flow-item-row sidebar-flow-item">
|
||||||
<div className="box box-tip">
|
<div className="box box-tip">
|
||||||
@@ -356,10 +365,14 @@ class FlowSidebar extends PureComponent {
|
|||||||
<a onClick={this.load_replies.bind(this)}>
|
<a onClick={this.load_replies.bind(this)}>
|
||||||
<span className="icon icon-refresh" /><label>刷新</label>
|
<span className="icon icon-refresh" /><label>刷新</label>
|
||||||
</a>
|
</a>
|
||||||
|
{(this.state.replies.length>1 || this.state.rev) &&
|
||||||
<a onClick={this.toggle_rev.bind(this)}>
|
<span>
|
||||||
<span className="icon icon-order-rev" /><label>{this.state.rev ? '还原' : '逆序'}</label>
|
|
||||||
</a>
|
<a onClick={this.toggle_rev.bind(this)}>
|
||||||
|
<span className="icon icon-order-rev" /><label>{this.state.rev ? '还原' : '逆序'}</label>
|
||||||
|
</a>
|
||||||
|
</span>
|
||||||
|
}
|
||||||
{!!this.props.token &&
|
{!!this.props.token &&
|
||||||
<span>
|
<span>
|
||||||
|
|
||||||
@@ -374,12 +387,9 @@ class FlowSidebar extends PureComponent {
|
|||||||
</span>
|
</span>
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<ClickHandler callback={(e)=>{this.show_reply_bar('',e);}}>
|
{!this.state.rev &&
|
||||||
<FlowItem info={this.state.info} attention={this.state.attention} img_clickable={true}
|
main_thread_elem
|
||||||
color_picker={this.color_picker} show_pid={show_pid} replies={this.state.replies}
|
}
|
||||||
set_variant={(variant)=>{this.set_variant(null,variant);}}
|
|
||||||
/>
|
|
||||||
</ClickHandler>
|
|
||||||
{!!this.state.error_msg &&
|
{!!this.state.error_msg &&
|
||||||
<div className="box box-tip flow-item">
|
<div className="box box-tip flow-item">
|
||||||
<p>回复加载失败</p>
|
<p>回复加载失败</p>
|
||||||
@@ -411,6 +421,9 @@ class FlowSidebar extends PureComponent {
|
|||||||
</ClickHandler>
|
</ClickHandler>
|
||||||
</LazyLoad>
|
</LazyLoad>
|
||||||
))}
|
))}
|
||||||
|
{this.state.rev &&
|
||||||
|
main_thread_elem
|
||||||
|
}
|
||||||
{!!this.props.token ?
|
{!!this.props.token ?
|
||||||
<ReplyForm pid={this.state.info.pid} token={this.props.token}
|
<ReplyForm pid={this.state.info.pid} token={this.props.token}
|
||||||
area_ref={this.reply_ref} on_complete={this.load_replies.bind(this)} /> :
|
area_ref={this.reply_ref} on_complete={this.load_replies.bind(this)} /> :
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export class Sidebar extends PureComponent {
|
|||||||
{this.props.content}
|
{this.props.content}
|
||||||
</div>
|
</div>
|
||||||
<div className="sidebar-title">
|
<div className="sidebar-title">
|
||||||
<a onClick={this.props.do_close}> <span className="icon icon-back" /> </a>
|
<a className="no-underline" onClick={this.props.do_close}> <span className="icon icon-back" /> </a>
|
||||||
{this.props.title}
|
{this.props.title}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -130,18 +130,18 @@ class ControlBar extends PureComponent {
|
|||||||
return (
|
return (
|
||||||
<TokenCtx.Consumer>{({value: token})=>(
|
<TokenCtx.Consumer>{({value: token})=>(
|
||||||
<div className="control-bar">
|
<div className="control-bar">
|
||||||
<a className="control-btn" onClick={this.do_refresh_bound}>
|
<a className="no-underline control-btn" onClick={this.do_refresh_bound}>
|
||||||
<span className="icon icon-refresh" />
|
<span className="icon icon-refresh" />
|
||||||
</a>
|
</a>
|
||||||
{!!token &&
|
{!!token &&
|
||||||
<a className="control-btn" onClick={this.do_attention_bound}>
|
<a className="no-underline control-btn" onClick={this.do_attention_bound}>
|
||||||
<span className="icon icon-attention" />
|
<span className="icon icon-attention" />
|
||||||
</a>
|
</a>
|
||||||
}
|
}
|
||||||
<input className="control-search" value={this.state.search_text} placeholder="搜索 或 #PID"
|
<input className="control-search" value={this.state.search_text} placeholder="搜索 或 #PID"
|
||||||
onChange={this.on_change_bound} onKeyPress={this.on_keypress_bound}
|
onChange={this.on_change_bound} onKeyPress={this.on_keypress_bound}
|
||||||
/>
|
/>
|
||||||
<a className="control-btn" onClick={()=>{
|
<a className="no-underline control-btn" onClick={()=>{
|
||||||
this.props.show_sidebar(
|
this.props.show_sidebar(
|
||||||
'P大树洞',
|
'P大树洞',
|
||||||
<div>
|
<div>
|
||||||
@@ -170,7 +170,7 @@ class ControlBar extends PureComponent {
|
|||||||
<span className={'icon icon-'+(token ? 'about' : 'login')} />
|
<span className={'icon icon-'+(token ? 'about' : 'login')} />
|
||||||
</a>
|
</a>
|
||||||
{!!token &&
|
{!!token &&
|
||||||
<a className="control-btn" onClick={()=>{
|
<a className="no-underline control-btn" onClick={()=>{
|
||||||
this.props.show_sidebar(
|
this.props.show_sidebar(
|
||||||
'发表树洞',
|
'发表树洞',
|
||||||
<PostForm token={token} on_complete={()=>{
|
<PostForm token={token} on_complete={()=>{
|
||||||
|
|||||||
@@ -15,12 +15,19 @@ html {
|
|||||||
scrollbar-width: none;
|
scrollbar-width: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
:root {
|
||||||
color: #00c;
|
--var-link-color: #00c;
|
||||||
|
}
|
||||||
|
.root-dark-mode .left-container, .root-dark-mode .sidebar, .root-dark-mode .sidebar-title, .root-dark-mode .balance-popover {
|
||||||
|
--var-link-color: #9bf;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root-dark-mode .left-container a, .root-dark-mode .sidebar a, .root-dark-mode .sidebar-title a, .root-dark-mode .balance-popover a {
|
a {
|
||||||
color: #9bf;
|
color: var(--var-link-color);
|
||||||
|
}
|
||||||
|
a:not(.no-underline):hover {
|
||||||
|
border-bottom: 1px solid var(--var-link-color);
|
||||||
|
margin-bottom: -1px;
|
||||||
}
|
}
|
||||||
|
|
||||||
input, textarea {
|
input, textarea {
|
||||||
|
|||||||
Reference in New Issue
Block a user