Skip to content

Commit 8f7344c

Browse files
committed
Adjust responsiveness
1 parent 6aaff74 commit 8f7344c

File tree

4 files changed

+10
-9
lines changed

4 files changed

+10
-9
lines changed

chessai/app.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import logging
55
import pathlib
66
import threading
7+
import time
78

89
import cv2
910
import imutils
@@ -42,9 +43,8 @@
4243

4344

4445
def run_window():
45-
from tkinter import Tk
4646
import webview
47-
webview.create_window("ChessAI - Chinese Chess Analyzer", 'http://127.0.0.1:5678', width=1400, height=800)
47+
webview.create_window("ChessAI - Chinese Chess Analyzer", 'http://127.0.0.1:3000', width=1200, height=800)
4848
webview.start()
4949
os._exit(0)
5050

@@ -187,6 +187,7 @@ def run_webapp():
187187
# Run the app in a separate thread
188188
thread = threading.Thread(target=run_webapp)
189189
thread.start()
190+
time.sleep(3)
190191

191192
# Run the window in the main thread
192193
run_window()

frontend/app/page.tsx

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22

33
import { useEffect, useRef, useState } from "react"
44
import { Button } from "@/registry/default/ui/button"
5-
import { Checkbox } from "@/registry/default/ui/checkbox"
65
import {
76
Select,
87
SelectContent,
98
SelectItem,
109
SelectTrigger,
1110
SelectValue,
1211
} from "@/registry/default/ui/select"
13-
import { set } from "date-fns"
1412

1513
import { DebugImages } from "@/components/debug-images"
1614

1715
const DotBgStyle = {
1816
backgroundImage: "radial-gradient(#888888 0.75px, transparent 0)",
1917
backgroundSize: "32px 32px",
2018
backgroundPosition: "-19px -19px",
19+
minHeight: "calc(100vh - 5rem)",
2120
}
2221

2322
export default function IndexPage() {
@@ -72,10 +71,10 @@ export default function IndexPage() {
7271
}, [])
7372

7473
return (
75-
<div style={DotBgStyle} className="min-h-screen pt-6">
76-
<section className="container flex flex-row gap-6 py-2">
77-
<div className="flex w-[250px] flex-col gap-2">
78-
<h2 className="text-xl font-semibold leading-none">Camera</h2>
74+
<div style={DotBgStyle} className="pt-6">
75+
<section className="container flex flex-row gap-8 py-2">
76+
<div className="flex w-[250px] flex-col gap-4">
77+
<h2 className="text-xl font-semibold leading-none">Board Camera</h2>
7978
<img
8079
src="/api/xiangqi/original_frame"
8180
className="rounded-md"

frontend/components/site-header.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { ThemeToggle } from "@/components/theme-toggle"
88

99
export function SiteHeader() {
1010
return (
11-
<header className="sticky top-0 z-40 w-full border-b bg-background">
11+
<header className="container sticky top-0 z-40 w-full border-b bg-background">
1212
<div className="flex h-16 items-center space-x-4 px-4 sm:justify-between sm:space-x-0">
1313
<MainNav items={siteConfig.mainNav} />
1414
<div className="flex flex-1 items-center justify-end space-x-4">

setup.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ def get_install_requires():
3939
"pyinstaller==5.13.2",
4040
"svglib==1.5.1",
4141
"reportlab==4.0.4",
42+
"serial==0.0.97",
4243
]
4344

4445
return install_requires

0 commit comments

Comments
 (0)