import { BuyMeACoffee20Filled, BuyMeACoffee20Regular } from "@/assets/BuyMeACoffee20"; import { buyMeACoffeeLink, githubLinks, storeLink } from "@/data/links"; import { track } from "@/features/analytics"; import useSettings from "@/hooks/useSettings"; import extLink from "@/utils/extLink"; import sendNotification from "@/utils/sendNotification"; import * as fui from "@fluentui/react-components"; import * as ic from "@fluentui/react-icons"; import { ReactElement } from "react"; export default function MoreButton(): ReactElement { const [tilesView, setTilesView] = useSettings("tilesView"); const SettingsIcon: ic.FluentIcon = ic.bundleIcon(ic.Settings20Filled, ic.Settings20Regular); const ViewIcon: ic.FluentIcon = ic.bundleIcon(ic.GridKanban20Filled, ic.GridKanban20Regular); const FeedbackIcon: ic.FluentIcon = ic.bundleIcon(ic.PersonFeedback20Filled, ic.PersonFeedback20Regular); const LearnIcon: ic.FluentIcon = ic.bundleIcon(ic.QuestionCircle20Filled, ic.QuestionCircle20Regular); const BmcIcon: ic.FluentIcon = ic.bundleIcon(BuyMeACoffee20Filled, BuyMeACoffee20Regular); return ( setTilesView(e.checkedItems.length > 0) } > } /> } onClick={ () => browser.runtime.openOptionsPage() }> { i18n.t("options_page.title") } }> { i18n.t("main.header.menu.tiles_view") } } { ...extLink(buyMeACoffeeLink) } onClick={ () => track("feedback_clicked") }> { i18n.t("common.cta.sponsor") } } { ...extLink(storeLink) } onClick={ () => track("bmc_clicked") }> { i18n.t("common.cta.feedback") } } { ...extLink(githubLinks.release) } > { i18n.t("main.header.menu.changelog") } { import.meta.env.DEV && Dev tools } onClick={ () => document.location.reload() } > Reload page } onClick={ () => browser.tabs.create({ url: browser.runtime.getURL("/sidepanel.html"), active: true }) } > Open in tab } onClick={ async () => await sendNotification({ icon: "/notification_icons/cloud_error.png", message: "Notification message", title: "Notification title" }) } > Show test notification } ); }