bar
This commit is contained in:
+17
-8
@@ -91,14 +91,23 @@ export interface RollCallActions {
|
||||
}
|
||||
|
||||
export const COLORS = [
|
||||
"#0f141a", // 黑色
|
||||
"#d92d20", // 红色
|
||||
"#0070f3", // 蓝色
|
||||
"#6d6df6", // 紫色
|
||||
"#00b8d9", // 青色
|
||||
"#36b37e", // 绿色
|
||||
"#ff991f", // 橙色
|
||||
"#8754ad", // 深紫
|
||||
"#d92d20",
|
||||
"#0070f3",
|
||||
"#6d6df6",
|
||||
"#00b8d9",
|
||||
"#36b37e",
|
||||
"#ff991f",
|
||||
"#8754ad",
|
||||
"#e63946",
|
||||
"#457b9d",
|
||||
"#2a9d8f",
|
||||
"#f4a261",
|
||||
"#264653",
|
||||
"#9d4edd",
|
||||
"#fb5607",
|
||||
"#06d6a0",
|
||||
"#118ab2",
|
||||
"#ffd166",
|
||||
]
|
||||
|
||||
export function useRollCallLogic(): [RollCallState, RollCallActions] {
|
||||
|
||||
@@ -101,13 +101,6 @@ export function SettingsPanel({
|
||||
|
||||
return (
|
||||
<div className="flex flex-col gap-0">
|
||||
|
||||
{/* Title */}
|
||||
<div className="flex items-center gap-2 mb-6">
|
||||
<span className="w-2 h-2 bg-[#0f141a] flex-shrink-0" />
|
||||
<span className="text-sm tracking-[0.2em] uppercase text-[#16191f] leading-none">ROLL CALL</span>
|
||||
</div>
|
||||
|
||||
{/* Mode selector */}
|
||||
<div className="flex gap-2 mb-6">
|
||||
<button
|
||||
|
||||
@@ -0,0 +1,77 @@
|
||||
"use client"
|
||||
|
||||
import { getCurrentWindow } from '@tauri-apps/api/window'
|
||||
|
||||
export function TitleBar() {
|
||||
const handleMinimize = async () => {
|
||||
const window = getCurrentWindow()
|
||||
await window.minimize()
|
||||
}
|
||||
|
||||
const handleMaximize = async () => {
|
||||
const window = getCurrentWindow()
|
||||
const isMaximized = await window.isMaximized()
|
||||
if (isMaximized) {
|
||||
await window.unmaximize()
|
||||
} else {
|
||||
await window.maximize()
|
||||
}
|
||||
}
|
||||
|
||||
const handleClose = async () => {
|
||||
const window = getCurrentWindow()
|
||||
await window.close()
|
||||
}
|
||||
|
||||
return (
|
||||
<div
|
||||
className="h-10 bg-[#ffffff] flex items-center justify-between px-4 select-none border-b border-[#e2e6ea]"
|
||||
style={{
|
||||
WebkitAppRegion: 'drag'
|
||||
} as React.CSSProperties}
|
||||
>
|
||||
{/* Left: App title */}
|
||||
<div className="flex items-center gap-2">
|
||||
<span className="w-2 h-2 bg-[#0f141a] flex-shrink-0" />
|
||||
<span className="text-xs tracking-[0.2em] uppercase text-[#0f141a] leading-none font-mono">
|
||||
ROLL CALL
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Right: Window controls */}
|
||||
<div
|
||||
className="flex gap-1"
|
||||
style={{ WebkitAppRegion: 'no-drag' } as React.CSSProperties}
|
||||
>
|
||||
<button
|
||||
onClick={handleMinimize}
|
||||
className="w-8 h-8 flex items-center justify-center text-[#8a95a1] hover:text-[#0f141a] hover:bg-[#f1f3f5] transition-colors"
|
||||
title="最小化"
|
||||
>
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor">
|
||||
<line x1="1" y1="5" x2="9" y2="5" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
onClick={handleMaximize}
|
||||
className="w-8 h-8 flex items-center justify-center text-[#8a95a1] hover:text-[#0f141a] hover:bg-[#f1f3f5] transition-colors"
|
||||
title="最大化"
|
||||
>
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor">
|
||||
<rect x="1" y="1" width="8" height="8" stroke="currentColor" strokeWidth="1.5" fill="none"/>
|
||||
</svg>
|
||||
</button>
|
||||
<button
|
||||
onClick={handleClose}
|
||||
className="w-8 h-8 flex items-center justify-center text-[#8a95a1] hover:text-[#ffffff] hover:bg-[#d92d20] transition-colors"
|
||||
title="关闭"
|
||||
>
|
||||
<svg width="10" height="10" viewBox="0 0 10 10" fill="currentColor">
|
||||
<line x1="2" y1="2" x2="8" y2="8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>
|
||||
<line x1="8" y1="2" x2="2" y2="8" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round"/>
|
||||
</svg>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user