2024-07-26 00:46:53 -05:00
|
|
|
import { Button } from "../ui/button";
|
2024-08-08 17:56:40 -05:00
|
|
|
import { Calendar, Star, TerminalIcon } from "lucide-react";
|
|
|
|
|
import { Dialog, DialogContent, DialogHeader, DialogTitle } from "../ui/dialog";
|
2024-07-26 00:46:53 -05:00
|
|
|
import { useState } from "react";
|
|
|
|
|
import { Changelog, version } from "@/version";
|
2024-08-08 17:56:40 -05:00
|
|
|
import events from "@/lib/commandEvent";
|
2024-07-26 00:46:53 -05:00
|
|
|
|
|
|
|
|
export default function InfoPopover() {
|
|
|
|
|
const [changeLog, setChangelog] = useState(false);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="grid w-full">
|
|
|
|
|
<strong className="text-center">The future of Minehut lists</strong>
|
|
|
|
|
<small className="text-center">
|
|
|
|
|
Use filters, intuitive keyboard shortcuts and other features for
|
|
|
|
|
completely free, and *open-source. <br /> Currently on version{" "}
|
|
|
|
|
<code>{version}</code>.<br />{" "}
|
|
|
|
|
<small>* Licensed under the MIT License</small>
|
|
|
|
|
</small>
|
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
<Button variant={"ghost"} onClick={() => setChangelog(true)}>
|
|
|
|
|
<Calendar size={18} className="mr-2" /> Changelog
|
|
|
|
|
</Button>
|
|
|
|
|
<Dialog open={changeLog} onOpenChange={setChangelog}>
|
|
|
|
|
<DialogContent>
|
|
|
|
|
<DialogHeader>
|
|
|
|
|
<DialogTitle>Changelog</DialogTitle>
|
|
|
|
|
<Changelog />
|
|
|
|
|
</DialogHeader>
|
|
|
|
|
</DialogContent>
|
|
|
|
|
</Dialog>
|
|
|
|
|
|
|
|
|
|
<Button
|
|
|
|
|
variant={"ghost"}
|
|
|
|
|
onClick={() =>
|
|
|
|
|
window
|
|
|
|
|
.open("https://github.com/DeveloLongScript/MHSF", "_blank")
|
|
|
|
|
?.focus()
|
|
|
|
|
}
|
|
|
|
|
>
|
|
|
|
|
<Star size={18} className="mr-2" /> Star on GitHub
|
|
|
|
|
</Button>
|
2024-08-03 09:51:45 -05:00
|
|
|
<Button variant="ghost" onClick={() => events.emit("cmd-event")}>
|
|
|
|
|
<TerminalIcon size={18} className="mr-2" /> Open commands
|
2024-07-26 00:46:53 -05:00
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|