Skip to content

Commit a333cb2

Browse files
committed
optimize: 优化代码
1 parent aaca6a3 commit a333cb2

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

src/main.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ async function setupApp() {
2929
if (!container) return;
3030

3131
const root = createRoot(container);
32+
3233
root.render(
3334
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
3435
// @ts-ignore

src/pages/loading.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const GlobalLoading = memo(() => {
1313
];
1414

1515
return (
16-
<div className="fixed-center flex-col bg-layout">
16+
<div className="fixed-center flex-col">
1717
<SystemLogo className="size-128px text-primary" />
1818
<div className="my-36px h-56px w-56px">
1919
<div className="relative h-full animate-spin">

src/plugins/app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { createElement } from 'react';
44
import { $t } from '../locales';
55

66
export function setupAppVersionNotification() {
7-
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y';
7+
const canAutoUpdateApp = import.meta.env.VITE_AUTOMATICALLY_DETECT_UPDATE === 'Y' && import.meta.env.PROD;
88

99
if (!canAutoUpdateApp) return;
1010

src/plugins/loading.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function setupLoading() {
3636
.join('\n');
3737

3838
const loading = `
39-
<div class="fixed-center bg-layout flex-col" style="${primaryColor}">
39+
<div class="fixed-center flex-col" style="${primaryColor}">
4040
${logoWithClass}
4141
<div class="w-56px h-56px my-36px">
4242
<div class="relative h-full animate-spin">

0 commit comments

Comments
 (0)