forked from newthuhole/hole_thu_frontend
add copy tooltip and fix reply
This commit is contained in:
@@ -155,3 +155,18 @@
|
|||||||
.box-id {
|
.box-id {
|
||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
|
.box-id a:hover::before {
|
||||||
|
content: "复制全文";
|
||||||
|
position: relative;
|
||||||
|
width: 5em;
|
||||||
|
height: 1.3em;
|
||||||
|
line-height: 1.3em;
|
||||||
|
margin-bottom: -1.3em;
|
||||||
|
border-radius: 3px;
|
||||||
|
text-align: center;
|
||||||
|
top: -1.5em;
|
||||||
|
display: block;
|
||||||
|
color: white;
|
||||||
|
background-color: rgba(0,0,0,.6);
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
@@ -10,7 +10,7 @@ import {TokenCtx, ReplyForm} from './UserAction';
|
|||||||
import {API} from './flows_api';
|
import {API} from './flows_api';
|
||||||
|
|
||||||
const IMAGE_BASE='http://www.pkuhelper.com:10301/services/pkuhole/images/';
|
const IMAGE_BASE='http://www.pkuhelper.com:10301/services/pkuhole/images/';
|
||||||
const AUDIO_BASE='/audio_proxy/';
|
const AUDIO_BASE='http://www.pkuhelper.com:10301/services/pkuhole/audios/';
|
||||||
|
|
||||||
const SEARCH_PAGESIZE=50;
|
const SEARCH_PAGESIZE=50;
|
||||||
const CLICKABLE_TAGS={a: true, audio: true};
|
const CLICKABLE_TAGS={a: true, audio: true};
|
||||||
@@ -256,7 +256,8 @@ class FlowSidebar extends PureComponent {
|
|||||||
do_reply(name,event) {
|
do_reply(name,event) {
|
||||||
if(event.target.tagName.toLowerCase()!=='a') {
|
if(event.target.tagName.toLowerCase()!=='a') {
|
||||||
let text=this.reply_ref.current.get();
|
let text=this.reply_ref.current.get();
|
||||||
this.reply_ref.current.set_and_focus('Re '+name+': ');
|
if(/^\s*(Re (洞主|\b[A-Z][a-z]+){0,2}:)?\s*$/.test(text)) // text is nearly empty so we can replace it
|
||||||
|
this.reply_ref.current.set_and_focus('Re '+name+': ');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user