mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 09:46:28 +08:00
fix ci warnings
This commit is contained in:
13 files changed
+30
-22
No files matched your search
@@ -9,7 +9,7 @@ import ReactDOM from 'react-dom/client';
|
||||
import { AutoloadPage } from 'vj/misc/Page';
|
||||
import { request } from 'vj/utils';
|
||||
|
||||
function renderReactions(reactions, self, rootEle) {
|
||||
function renderReactions(reactions = {}, self = {}, rootEle) {
|
||||
let html = '';
|
||||
for (const [k, v] of Object.entries(reactions).sort(([, v1], [, v2]) => +v2 - +v1)) {
|
||||
if (!v) continue;
|
||||
|
||||
@@ -50,12 +50,17 @@ export default new AutoloadPage('omnibar', () => {
|
||||
href={`${base}/p/${pid || docId}`}
|
||||
>
|
||||
<div>
|
||||
<a
|
||||
href={psdict[`${domainId}#${docId}`]?.rid && `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`}
|
||||
<p
|
||||
onClick={(ev) => {
|
||||
if (psdict[`${domainId}#${docId}`]?.rid) {
|
||||
window.location.href = `${base}/record/${psdict[`${domainId}#${docId}`]?.rid}`;
|
||||
}
|
||||
ev.preventDefault();
|
||||
}}
|
||||
className={`record-status--text ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}
|
||||
>
|
||||
<span className={`icon record-status--icon ${STATUS_CODES[psdict[`${domainId}#${docId}`]?.status]}`}></span>
|
||||
</a>
|
||||
</p>
|
||||
<div>{title}</div>
|
||||
</div>
|
||||
<div>
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"monaco-editor": "0.52.2",
|
||||
"monaco-editor-nls": "^3.1.0",
|
||||
"monaco-editor-webpack-plugin": "^7.1.0",
|
||||
"monaco-themes": "^0.4.5",
|
||||
"monaco-themes": "^0.4.6",
|
||||
"monaco-yaml": "5.1.1",
|
||||
"nanoid": "^5.1.5",
|
||||
"normalize.css": "^8.0.1",
|
||||
|
||||
@@ -42,7 +42,7 @@ const page = new NamedPage(['contest_edit', 'contest_create', 'homework_create',
|
||||
});
|
||||
}
|
||||
const message = `Confirm deleting this ${pagename.split('_')[0]}? Its files and status will be deleted as well.`;
|
||||
confirm(i18n(message)).then((yes) => {
|
||||
return confirm(i18n(message)).then((yes) => {
|
||||
if (yes) {
|
||||
confirmed = true;
|
||||
ev.target.click();
|
||||
|
||||
Reference in new issue
Block a user