import { Link } from "@tanstack/react-router";
import useModalStore from "@/stores/modalStore";
import { Blend, BookOpen, Diff, Home, Info, Languages, Minus, Puzzle, Settings, TrendingUpDown, Wrench, X } from "lucide-react";
import { AppService } from "@bindings/g-launcher/internal/app-service";
import LanguageSwitcher from "../languageSwitcher";
import { useTranslation } from "react-i18next";
import useSettingStore from "@/stores/settingStore";
export default function Header() {
const { setIsOpenSettingModal, setIsOpenCloseModal } = useModalStore()
const { closingOption } = useSettingStore()
const { t } = useTranslation()
const controlButtons = [
{
icon: ,
action: () => setIsOpenSettingModal(true),
tip: t("header.settings"),
},
{
icon: ,
action: () => AppService.MinimizeApp(),
tip: t("header.minimize"),
},
{
icon: ,
action: () => {
if (closingOption.isAsk) {
setIsOpenCloseModal(true)
return
}
if (closingOption.isMinimize) {
AppService.HideApp()
return
}
AppService.CloseApp()
},
tip: t("header.close"),
},
]
return (
{/* LEFT */}
- {t("header.home")}
-
{t("header.tools")}
- {t("header.language")}
- {t("header.client_update")}
-
{t("header.plugins")}
- {t("header.analysis")}
- {t("header.firefly_tools")}
- {t("header.how_to")}
- {t("header.about")}
Firefly
Launcher
{t("header.by")}
{/* CENTER */}
-
{t("header.home")}
-
{t("header.tools")}
-
{t("header.language")}
-
{t("header.client_update")}
-
{t("header.plugins")}
-
{t("header.analysis")}
-
{t("header.firefly_tools")}
-
{t("header.how_to")}
-
{t("header.about")}
{/* RIGHT */}
{controlButtons.map((btn, i) => (
))}
)
}