forked from newthuhole/hole_thu_frontend
improve ui
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, {Component, PureComponent} from 'react';
|
||||
import copy from 'copy-to-clipboard';
|
||||
import {ColorPicker} from './color_picker';
|
||||
import {Time, TitleLine, HighlightedText} from './Common';
|
||||
import './Flows.css';
|
||||
@@ -67,6 +68,11 @@ function Reply(props) {
|
||||
}
|
||||
|
||||
function FlowItem(props) {
|
||||
function copy_link(event) {
|
||||
event.preventDefault();
|
||||
copy(event.target.href);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flow-item box">
|
||||
{parseInt(props.info.pid,10)>window.LATEST_POST_ID && <div className="flow-item-dot" /> }
|
||||
@@ -83,7 +89,8 @@ function FlowItem(props) {
|
||||
<span className="icon icon-reply" />
|
||||
</span>
|
||||
}
|
||||
<code className="box-id">#{props.info.pid}</code>
|
||||
<code className="box-id"><a href={'##'+props.info.pid} onClick={copy_link}>#{props.info.pid}</a></code>
|
||||
|
||||
<Time stamp={props.info.timestamp} />
|
||||
</div>
|
||||
<HighlightedText text={props.info.text} color_picker={props.color_picker} show_pid={props.show_pid} />
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
user-select: text;
|
||||
transition: left 150ms ease-out;
|
||||
position: fixed;
|
||||
left: 100%;
|
||||
|
||||
@@ -3,6 +3,7 @@ body {
|
||||
padding: 0;
|
||||
background-size: cover;
|
||||
overflow-x: hidden;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
body::-webkit-scrollbar {
|
||||
|
||||
Reference in New Issue
Block a user