/* * Vencord, a Discord client mod * Copyright (c) 2023 Vendicated, camila314, and contributors * SPDX-License-Identifier: GPL-3.0-or-later */ import "./styles.css"; import { addServerListElement, removeServerListElement, ServerListRenderPosition } from "@api/ServerList"; import ErrorBoundary from "@components/ErrorBoundary"; import { EquicordDevs } from "@utils/constants"; import definePlugin from "@utils/types"; import { findByCodeLazy } from "@webpack"; import { Tooltip } from "webpack/common/components"; const openPopout = findByCodeLazy(".QUICKSWITCHER_OPENED,{"); function SearchIcon() { return ( ); } export default definePlugin({ name: "ServerSearch", authors: [EquicordDevs.camila314], description: "Navigate your servers better with a quick search button", renderButton() { return
{({ onMouseEnter, onMouseLeave }) => (
openPopout("DM_SEARCH")}>
)}
; }, start() { addServerListElement(ServerListRenderPosition.Above, this.renderButton); }, stop() { removeServerListElement(ServerListRenderPosition.Above, this.renderButton); } });