aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/packages/ui/src/pages
diff options
context:
space:
mode:
author苏向夜 <fu050409@163.com>2026-03-29 01:19:25 +0800
committer苏向夜 <fu050409@163.com>2026-03-29 01:19:25 +0800
commit397cbb34b327a0addfdf8e36f859b456956b66fe (patch)
tree81d5c51437ddcbe49cc8023151956cba7b909da8 /packages/ui/src/pages
parente16320b34fa2dbb75e19142f7e8e31ecd41a512c (diff)
downloadDropOut-397cbb34b327a0addfdf8e36f859b456956b66fe.tar.gz
DropOut-397cbb34b327a0addfdf8e36f859b456956b66fe.zip
fix(lint): apply ui code lint
Diffstat (limited to 'packages/ui/src/pages')
-rw-r--r--packages/ui/src/pages/home-view.tsx10
-rw-r--r--packages/ui/src/pages/index.tsx7
-rw-r--r--packages/ui/src/pages/instances-view.tsx16
3 files changed, 23 insertions, 10 deletions
diff --git a/packages/ui/src/pages/home-view.tsx b/packages/ui/src/pages/home-view.tsx
index 6060370..da7238f 100644
--- a/packages/ui/src/pages/home-view.tsx
+++ b/packages/ui/src/pages/home-view.tsx
@@ -32,20 +32,20 @@ export function HomeView() {
const handleSaturnTouchStart = (e: React.TouchEvent) => {
if (e.touches && e.touches.length === 1) {
- const clientX = e.touches[0].clientX;
- saturn?.handleTouchStart(clientX);
+ const clientX = e.touches[0].clientX;
+ saturn?.handleTouchStart(clientX);
}
};
const handleSaturnTouchMove = (e: React.TouchEvent) => {
if (e.touches && e.touches.length === 1) {
- const clientX = e.touches[0].clientX;
- saturn?.handleTouchMove(clientX);
+ const clientX = e.touches[0].clientX;
+ saturn?.handleTouchMove(clientX);
}
};
const handleSaturnTouchEnd = () => {
- saturn?.handleTouchEnd();
+ saturn?.handleTouchEnd();
};
return (
diff --git a/packages/ui/src/pages/index.tsx b/packages/ui/src/pages/index.tsx
index bccca22..2acd377 100644
--- a/packages/ui/src/pages/index.tsx
+++ b/packages/ui/src/pages/index.tsx
@@ -22,7 +22,12 @@ export function IndexPage() {
void initGameLifecycle().catch((error) => {
console.error("Failed to initialize game lifecycle:", error);
});
- }, [authStore.init, settingsStore.refresh, instanceStore.refresh, initGameLifecycle]);
+ }, [
+ authStore.init,
+ settingsStore.refresh,
+ instanceStore.refresh,
+ initGameLifecycle,
+ ]);
return (
<div className="relative h-screen w-full overflow-hidden bg-background font-sans">
diff --git a/packages/ui/src/pages/instances-view.tsx b/packages/ui/src/pages/instances-view.tsx
index 07a2135..7bb3302 100644
--- a/packages/ui/src/pages/instances-view.tsx
+++ b/packages/ui/src/pages/instances-view.tsx
@@ -35,7 +35,9 @@ export function InstancesView() {
const startGame = useGameStore((state) => state.startGame);
const stopGame = useGameStore((state) => state.stopGame);
const runningInstanceId = useGameStore((state) => state.runningInstanceId);
- const launchingInstanceId = useGameStore((state) => state.launchingInstanceId);
+ const launchingInstanceId = useGameStore(
+ (state) => state.launchingInstanceId,
+ );
const stoppingInstanceId = useGameStore((state) => state.stoppingInstanceId);
const [isImporting, setIsImporting] = useState(false);
const [repairing, setRepairing] = useState(false);
@@ -191,7 +193,8 @@ export function InstancesView() {
const isRunning = runningInstanceId === instance.id;
const isLaunching = launchingInstanceId === instance.id;
const isStopping = stoppingInstanceId === instance.id;
- const otherInstanceRunning = runningInstanceId !== null && !isRunning;
+ const otherInstanceRunning =
+ runningInstanceId !== null && !isRunning;
return (
<li
@@ -259,7 +262,10 @@ export function InstancesView() {
try {
await instancesStore.setActiveInstance(instance);
} catch (error) {
- console.error("Failed to set active instance:", error);
+ console.error(
+ "Failed to set active instance:",
+ error,
+ );
toast.error("Error setting active instance");
return;
}
@@ -284,7 +290,9 @@ export function InstancesView() {
() => undefined,
);
}}
- disabled={otherInstanceRunning || isLaunching || isStopping}
+ disabled={
+ otherInstanceRunning || isLaunching || isStopping
+ }
>
{isLaunching || isStopping ? (
<span className="text-xs">...</span>