diff --git a/packages/hydrojudge/src/daemon.ts b/packages/hydrojudge/src/daemon.ts index c4b637c48..6cee00045 100644 --- a/packages/hydrojudge/src/daemon.ts +++ b/packages/hydrojudge/src/daemon.ts @@ -14,7 +14,7 @@ import './utils'; import PQueue from 'p-queue'; -import { fs } from '@hydrooj/utils'; +import { fs, Time } from '@hydrooj/utils'; import { getConfig } from './config'; import HydroHost from './hosts/hydro'; import Vj4Host from './hosts/vj4'; @@ -53,6 +53,10 @@ async function daemon() { const queue = new PQueue({ concurrency: Infinity }); await fs.ensureDir(getConfig('tmp_dir')); queue.on('error', (e) => log.error(e)); + if (!Object.keys(_hosts).length) { + log.warn('No host configured'); + setInterval(() => log.warn('No host configured'), Time.hour); + } for (const i in _hosts) { _hosts[i].host ||= i; hosts[i] = _hosts[i].type === 'vj4' ? new Vj4Host(_hosts[i]) : new HydroHost(_hosts[i]); diff --git a/packages/ui-default/components/datepicker/datepicker.page.tsx b/packages/ui-default/components/datepicker/datepicker.page.tsx index 99a008681..7d338d267 100644 --- a/packages/ui-default/components/datepicker/datepicker.page.tsx +++ b/packages/ui-default/components/datepicker/datepicker.page.tsx @@ -41,7 +41,7 @@ function initTimePicker(input: HTMLInputElement) { }).on('mousedown', (e) => { e.preventDefault(); $input.val(time).trigger('change'); - closeDropdown(); // eslint-disable-line no-use-before-define + closeDropdown(); // eslint-disable-line ts/no-use-before-define }).on('mouseenter', function () { $(this).css('background', 'var(--highlight-color, #e8f0fe)'); }).on('mouseleave', function () {