update
This commit is contained in:
5
package-lock.json
generated
5
package-lock.json
generated
@@ -10400,11 +10400,6 @@
|
|||||||
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz",
|
"resolved": "https://registry.npmjs.org/react-is/-/react-is-16.9.0.tgz",
|
||||||
"integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw=="
|
"integrity": "sha512-tJBzzzIgnnRfEm046qRcURvwQnZVXmuCbscxUO5RWrGTXpon2d4c8mI0D8WE6ydVIm29JiLB6+RslkIvym9Rjw=="
|
||||||
},
|
},
|
||||||
"react-lazyload": {
|
|
||||||
"version": "2.3.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/react-lazyload/-/react-lazyload-2.3.0.tgz",
|
|
||||||
"integrity": "sha512-0z3qmL+qtSERdfKFpn0yKXm+1Gg1ZLZBXnCzHhSGiu1L8iDARuCkbOypxEx9+ETxZvMnXj98xvWCs5jyXTuM2w=="
|
|
||||||
},
|
|
||||||
"react-scripts": {
|
"react-scripts": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/react-scripts/-/react-scripts-3.1.1.tgz",
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
"pressure": "^2.1.2",
|
"pressure": "^2.1.2",
|
||||||
"react": "^16.9.0",
|
"react": "^16.9.0",
|
||||||
"react-dom": "^16.9.0",
|
"react-dom": "^16.9.0",
|
||||||
"react-lazyload": "latest",
|
|
||||||
"react-scripts": "^3.1.1",
|
"react-scripts": "^3.1.1",
|
||||||
"react-timeago": "^4.1.9"
|
"react-timeago": "^4.1.9"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -32,6 +32,7 @@
|
|||||||
_czc.push(["_setAccount","1274501752"]);
|
_czc.push(["_setAccount","1274501752"]);
|
||||||
_czc.push(["_setCustomVar","has_token",localStorage['TOKEN']?'yes':'no',1]);
|
_czc.push(["_setCustomVar","has_token",localStorage['TOKEN']?'yes':'no',1]);
|
||||||
_czc.push(["_setCustomVar","standalone",((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone))?'yes':'no',1]);
|
_czc.push(["_setCustomVar","standalone",((window.matchMedia('(display-mode: standalone)').matches) || (window.navigator.standalone))?'yes':'no',1]);
|
||||||
|
_czc.push(["_setCustomVar","build_info","%REACT_APP_BUILD_INFO%"||'---']);
|
||||||
try {
|
try {
|
||||||
var config=JSON.parse(localStorage['hole_config']||'{}');
|
var config=JSON.parse(localStorage['hole_config']||'{}');
|
||||||
for(var key in config)
|
for(var key in config)
|
||||||
|
|||||||
@@ -15,9 +15,11 @@ export class BalanceShower extends PureComponent {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
do_load(token) {
|
do_load(e,token) {
|
||||||
if(this.state.loading_status==='loading')
|
if(this.state.loading_status==='loading')
|
||||||
return;
|
return;
|
||||||
|
if(e.target.closest('a')) // clicking at a link
|
||||||
|
return;
|
||||||
if(!token || !window.config.easter_egg) {
|
if(!token || !window.config.easter_egg) {
|
||||||
this.setState({
|
this.setState({
|
||||||
loading_status: 'idle',
|
loading_status: 'idle',
|
||||||
@@ -71,7 +73,7 @@ export class BalanceShower extends PureComponent {
|
|||||||
render() {
|
render() {
|
||||||
return (
|
return (
|
||||||
<TokenCtx.Consumer>{(token)=>(
|
<TokenCtx.Consumer>{(token)=>(
|
||||||
<div onClick={()=>this.do_load(token.value)}>
|
<div onClick={(e)=>this.do_load(e,token.value)}>
|
||||||
<div className="balance-popover">{this.render_popover()}</div>
|
<div className="balance-popover">{this.render_popover()}</div>
|
||||||
{this.props.children}
|
{this.props.children}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.root-dark-mode .bg-img {
|
.root-dark-mode .bg-img {
|
||||||
opacity: .6;
|
opacity: .65;
|
||||||
}
|
}
|
||||||
|
|
||||||
.black-outline {
|
.black-outline {
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ class ConfigColorScheme extends PureComponent {
|
|||||||
<small>#color_scheme</small>
|
<small>#color_scheme</small>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
选择浅色或深色模式,或者与系统颜色模式一致
|
选择浅色或深色模式,深色模式下将会调暗图片亮度
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -161,7 +161,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.root-dark-mode .flow-item-row p.img img {
|
.root-dark-mode .flow-item-row p.img img {
|
||||||
filter: brightness(.85);
|
filter: brightness(85%);
|
||||||
}
|
}
|
||||||
|
|
||||||
.box-header-badge {
|
.box-header-badge {
|
||||||
|
|||||||
@@ -39,8 +39,8 @@ const HELP_TEXT=(
|
|||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
window.location.reload(true);
|
window.location.reload(true);
|
||||||
},200);
|
},200);
|
||||||
}}>强制检查更新</a>
|
}}>强制检查更新</a>
|
||||||
({process.env.REACT_APP_BUILD_INFO||'---'} {process.env.NODE_ENV})
|
({process.env.REACT_APP_BUILD_INFO||'---'} {process.env.NODE_ENV} 会自动在后台检查更新并在下次访问时更新)
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ a {
|
|||||||
color: #00c;
|
color: #00c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.root-dark-mode .left-container a, .root-dark-mode .sidebar a, .root-dark-mode .sidebar-title a {
|
.root-dark-mode .left-container a, .root-dark-mode .sidebar a, .root-dark-mode .sidebar-title a, .root-dark-mode .balance-popover a {
|
||||||
color: #9bf;
|
color: #9bf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
// regexp should match the WHOLE segmented part
|
// regexp should match the WHOLE segmented part
|
||||||
export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([1-9]\d{4,5})(?![\d\u20e3\ufe0e\ufe0f])/g;
|
export const PID_RE=/(^|[^\d\u20e3\ufe0e\ufe0f])([2-9]\d{4,5}|1\d{4,6})(?![\d\u20e3\ufe0e\ufe0f])/g;
|
||||||
export const URL_PID_RE=/((?:https?:\/\/)?pkuhelper\.pku\.edu\.cn\/hole\/?#(?:#|%23)([1-9]\d{4,5}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g;
|
export const URL_PID_RE=/((?:https?:\/\/)?pkuhelper\.pku\.edu\.cn\/hole\/?#(?:#|%23)([2-9]\d{4,5}|1\d{4,6}))(?!\d|\u20e3|\ufe0e|\ufe0f)/g;
|
||||||
export const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Jolly|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;
|
export const NICKNAME_RE=/(^|[^A-Za-z])((?:(?:Angry|Baby|Crazy|Diligent|Excited|Fat|Greedy|Hungry|Interesting|Jolly|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;
|
||||||
export const URL_RE=/(^|[^.@a-zA-Z0-9_])((?:https?:\/\/)?(?:(?:[\w-]+\.)+[a-zA-Z]{2,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{1,5})?(?:\/[\w~!@#$%^&*()\-_=+[\]{};:,./?|]*)?)(?![a-zA-Z0-9])/gi;
|
export const URL_RE=/(^|[^.@a-zA-Z0-9_])((?:https?:\/\/)?(?:(?:[\w-]+\.)+[a-zA-Z]{2,3}|\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})(?::\d{1,5})?(?:\/[\w~!@#$%^&*()\-_=+[\]{};:,./?|]*)?)(?![a-zA-Z0-9])/gi;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user