fix(hubInfo):eslint no-empty-function/_unused-vars 修复
NodeJS with Webpack / build (push) Canceled after 0s
NodeJS with Webpack / build (push) Canceled after 0s
This commit is contained in:
1 parent
fdd7c2f639
commit
d7adc26272
2 files changed
+6
-3
No files matched your search
@@ -5,6 +5,9 @@ COPY . .
|
||||
|
||||
RUN npm install -g pnpm --registry=https://registry.npmmirror.com
|
||||
RUN pnpm config set registry https://registry.npmmirror.com
|
||||
# canvas 原生模块:预编译包/headers 走 npmmirror 镜像(GitHub 与 nodejs.org 直连 404/被墙)
|
||||
ENV canvas_binary_host_mirror=https://registry.npmmirror.com/-/binary/canvas/
|
||||
ENV npm_config_disturl=https://registry.npmmirror.com/-/binary/node/
|
||||
RUN pnpm install
|
||||
|
||||
RUN ["pnpm", "build"]
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
:content="hasNew ? `有新版本 v${upd.latest_version}` : `当前版本 v${version}`"
|
||||
placement="bottom"
|
||||
>
|
||||
<Tag :color="hasNew ? 'orange' : 'default'" class="ver-chip" @click="load(true)">
|
||||
<Tag :color="hasNew ? 'orange' : 'default'" class="ver-chip" @click="load()">v{{ version }}</Tag>
|
||||
v{{ version }}
|
||||
</Tag>
|
||||
</Tooltip>
|
||||
@@ -93,7 +93,7 @@ function openPanel() {
|
||||
}
|
||||
}
|
||||
|
||||
async function load(_force?: boolean) {
|
||||
async function load() {
|
||||
try {
|
||||
const d = await (await fetch('/api/hub/status')).json();
|
||||
if (d.version) version.value = d.version;
|
||||
@@ -116,7 +116,7 @@ async function load(_force?: boolean) {
|
||||
onMounted(() => {
|
||||
load();
|
||||
// 心跳(服务端已节流 30min,这里只是触发)
|
||||
fetch('/api/hub/heartbeat', { method: 'POST' }).catch(() => {});
|
||||
fetch('/api/hub/heartbeat', { method: 'POST' }).catch(() => { /* 心跳失败静默 */ });
|
||||
// 页面重新可见时补一次(服务端节流兜底)
|
||||
document.addEventListener('visibilitychange', () => {
|
||||
if (document.visibilityState === 'visible') load();
|
||||
|
||||
Reference in new issue
Block a user