fix
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import React, {Component, PureComponent} from 'react';
|
||||
import {PKUHELPER_ROOT} from './flows_api';
|
||||
|
||||
import TimeAgo from 'react-timeago';
|
||||
import Linkify from 'react-linkify';
|
||||
@@ -9,7 +10,7 @@ import './Common.css';
|
||||
|
||||
const chinese_format=buildFormatter(chineseStrings);
|
||||
|
||||
export const API_BASE=window.location.protocol==='https:' ? '/api_proxy' : 'http://www.pkuhelper.com:10301/services/pkuhole';
|
||||
export const API_BASE=PKUHELPER_ROOT+'services/pkuhole';
|
||||
|
||||
const PID_RE=/(^|[^\d])([1-9]\d{4,5})(?!\d)/g;
|
||||
const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Japanese|Kind|Little|Magic|Naïve|Old|Powerful|Quiet|Rich|Superman|THU|Undefined|Valuable|Wifeless|Xiangbuchulai|Young|Zombie)\s)?(?:Alice|Bob|Carol|Dave|Eve|Francis|Grace|Hans|Isabella|Jason|Kate|Louis|Margaret|Nathan|Olivia|Paul|Queen|Richard|Susan|Thomas|Uma|Vivian|Winnie|Xander|Yasmine|Zach)|You Win(?: \d+)?|洞主)(?![A-Za-z])/gi;
|
||||
@@ -92,12 +93,10 @@ export class SafeTextarea extends Component {
|
||||
text: '',
|
||||
});
|
||||
}
|
||||
set_and_focus(text) {
|
||||
set(text) {
|
||||
this.change_callback(text);
|
||||
this.setState({
|
||||
text: text,
|
||||
},()=>{
|
||||
this.area_ref.current.focus();
|
||||
});
|
||||
}
|
||||
get() {
|
||||
|
||||
Reference in New Issue
Block a user