mirror of
https://github.com/whyour/qinglong.git
synced 2026-06-30 20:35:09 +08:00
添加ql -l update
This commit is contained in:
@@ -106,6 +106,24 @@ const CheckUpdate = ({ ws }: any) => {
|
||||
|
||||
useEffect(() => {
|
||||
ws.onmessage = (e) => {
|
||||
setValue(value + e.data);
|
||||
modalRef.current.update({
|
||||
content: (
|
||||
<div style={{ height: '60vh', overflowY: 'auto' }}>
|
||||
<pre
|
||||
style={{
|
||||
wordBreak: 'break-all',
|
||||
whiteSpace: 'pre-wrap',
|
||||
paddingTop: 15,
|
||||
fontSize: 12,
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
{value + e.data}
|
||||
</pre>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
if (e.data.includes('重启面板')) {
|
||||
message.warning({
|
||||
content: (
|
||||
@@ -124,25 +142,6 @@ const CheckUpdate = ({ ws }: any) => {
|
||||
setTimeout(() => {
|
||||
window.location.reload();
|
||||
}, 10000);
|
||||
} else {
|
||||
modalRef.current.update({
|
||||
content: (
|
||||
<div style={{ height: '60vh', overflowY: 'auto' }}>
|
||||
<pre
|
||||
style={{
|
||||
wordBreak: 'break-all',
|
||||
whiteSpace: 'pre-wrap',
|
||||
paddingTop: 15,
|
||||
fontSize: 12,
|
||||
fontWeight: 400,
|
||||
}}
|
||||
>
|
||||
{value + e.data}
|
||||
</pre>
|
||||
</div>
|
||||
),
|
||||
});
|
||||
setValue(e.data);
|
||||
}
|
||||
};
|
||||
}, []);
|
||||
|
||||
Reference in New Issue
Block a user