burncloud_client_shared/components/
title_bar.rs1use dioxus::prelude::*;
2
3#[component]
4pub fn TitleBar() -> Element {
5 rsx! {
6 div {
7 class: "title-bar",
8 style: "-webkit-app-region: drag;",
9 div { class: "flex items-center gap-md",
10 span { class: "text-title font-semibold",
11 "BurnCloud - 大模型本地部署平台"
12 }
13 }
14 div {
15 class: "flex items-center gap-xs",
16 style: "-webkit-app-region: no-drag;",
17 button {
18 class: "btn btn-subtle",
19 style: "min-height: 28px; padding: 4px 8px;",
20 onclick: move |_| {
21 dioxus::desktop::window().set_minimized(true);
22 },
23 "—"
24 }
25 button {
26 class: "btn btn-subtle",
27 style: "min-height: 28px; padding: 4px 8px;",
28 onclick: move |_| {
29 let window = dioxus::desktop::window();
30 let is_maximized = window.is_maximized();
31 window.set_maximized(!is_maximized);
32 },
33 "☐"
34 }
35 button {
36 class: "btn btn-subtle",
37 style: "min-height: 28px; padding: 4px 8px; color: #d13438;",
38 onclick: move |_| {
39
40 dioxus::desktop::window().set_visible(false);
41 },
43 "✕"
44 }
45 }
46 }
47 }
48}