import { CheckIcon, DotsVerticalIcon, EyeIcon, PlayIcon, PlusIcon, SearchMdIcon, } from '@untitled-theme/icons-solid'; import type { Accessor, Setter } from 'solid-js'; import { For, Show, createSignal } from 'solid-js'; import { useNavigate } from '@solidjs/router'; import image from '../../assets/images/header.png'; import ContextMenu from '../components/overlay/ContextMenu'; import Button from '../components/base/Button'; import Tag from '../components/base/Tag'; import TextField from '../components/base/TextField'; import ClusterCover from '~ui/components/game/ClusterCover'; import type { Cluster } from '~bindings'; import useCommand from '~ui/hooks/useCommand'; import { bridge } from '~imports'; import { upperFirst } from '~utils/primitives'; import { useClusterModalController } from '~ui/components/overlay/cluster/ClusterCreationModal'; // TODO: Replace this into it's own component // possibly with the core ui lirbary with autogenerated and optimized svgs pls function OneConfigLogo() { return ( ); } function Banner() { return (

Building worlds

A description would go here if I was smart

} /> }>Verified
); } interface ClusterCardContextMenuProps { pos: Accessor<{ x: number; y: number }>; contextMenuVisible: Accessor; setContextMenuVisible: Setter; id: string; } function ClusterCardContextMenu(props: ClusterCardContextMenuProps) { const navigate = useNavigate(); function viewCluster() { navigate(`/clusters/?id=${props.id}`); } return ( } text="View" onClick={() => viewCluster()} /> } text="Launch" onClick={() => {}} /> ); } function ClusterCard(props: Cluster) { const navigate = useNavigate(); const [pos, setPos] = createSignal({ x: 0, y: 0 }); const [contextMenuVisible, setContextMenuVisible] = createSignal(false); let ref!: HTMLDivElement; function openClusterPage(_e: MouseEvent) { navigate(`/clusters/?id=${props.uuid}`); } function openContextMenu(e: MouseEvent) { e.preventDefault(); e.stopPropagation(); setContextMenuVisible(!contextMenuVisible()); } function onMouseDown(e: MouseEvent) { setPos({ x: e.clientX, y: e.clientY }); } return ( <>
openClusterPage(e)} onMouseDown={e => onMouseDown(e)} onContextMenu={e => openContextMenu(e)} ref={ref} class="relative h-[152px] group flex flex-col rounded-xl bg-component-bg hover:bg-component-bg-hover active:bg-component-bg-pressed border border-gray-05" >

{props.meta.name}

{upperFirst(props.meta.loader)} {' '} {props.meta.mc_version} {/* {' '} {props.instance.mods && `• ${props.mods} mods`} */}

); } interface ClusterGroupProps { title: string; clusters: Cluster[]; } function ClusterGroup(props: ClusterGroupProps) { return (

{props.title}

{item => }
); } function HomePage() { const [clusters, { refetch }] = useCommand(bridge.commands.getClusters); const { setVisible } = useClusterModalController(); async function newInstance() { setVisible(true); } return (
} placeholder="Search for something..." />
); } export default HomePage;