import { HStack, useColorModeValue, Image, Center, Icon, Kbd, CenterProps, } from "@hope-ui/solid" import { changeColor } from "seemly" import { Show, createMemo } from "solid-js" import { getMainColor, getSetting, local, objStore, State } from "~/store" import { BsSearch } from "solid-icons/bs" import { CenterLoading } from "~/components" import { Container } from "../Container" import { bus, joinBase } from "~/utils" import { Layout } from "./layout" import { isMac } from "~/utils/compatibility" export const Header = () => { const logos = getSetting("logo").split("\n") const defaultLogo = logos[0] === "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg" ? joinBase("/images/new_icon.png") : logos[0] const logo = useColorModeValue( defaultLogo, logos[logos.length - 1] === "https://cdn.jsdelivr.net/gh/alist-org/logo@main/logo.svg" ? joinBase("/images/new_icon.png") : logos[logos.length - 1] || defaultLogo, ) const stickyProps = createMemo(() => { switch (local["position_of_header_navbar"]) { case "sticky": return { position: "sticky", zIndex: "$sticky", top: 0 } default: return { position: undefined, zIndex: undefined, top: undefined } } }) return (
} /> { bus.emit("tool", "search") }} > {isMac ? Cmd : Ctrl} K
) }