fix: compact filter popover; feat: i18n (de/en)
Build & Push Docker Image / build (push) Successful in 2m31s
Build & Push Docker Image / build (push) Successful in 2m31s
This commit is contained in:
@@ -11,6 +11,7 @@ import {
|
||||
CommandSeparator,
|
||||
} from "@/components/ui/command";
|
||||
import { useAuth } from "@/hooks/use-auth";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import {
|
||||
Compass,
|
||||
PlusCircle,
|
||||
@@ -23,6 +24,7 @@ import {
|
||||
|
||||
export function CommandPalette() {
|
||||
const [, navigate] = useLocation();
|
||||
const { t } = useTranslation();
|
||||
const { isAuthenticated, isAdmin, hasFeature } = useAuth();
|
||||
const [open, setOpen] = useState(false);
|
||||
const [search, setSearch] = useState("");
|
||||
@@ -65,7 +67,7 @@ export function CommandPalette() {
|
||||
return (
|
||||
<CommandDialog open={open} onOpenChange={setOpen}>
|
||||
<CommandInput
|
||||
placeholder="Search tools or jump to…"
|
||||
placeholder={`${t("common.search")}…`}
|
||||
value={search}
|
||||
onValueChange={(v) => {
|
||||
setSearch(v);
|
||||
@@ -78,27 +80,27 @@ export function CommandPalette() {
|
||||
</CommandEmpty>
|
||||
<CommandGroup heading="Navigate">
|
||||
<CommandItem onSelect={() => go("/tools")}>
|
||||
<Compass className="mr-2 h-4 w-4" /> Browse Tools
|
||||
<Compass className="mr-2 h-4 w-4" /> {t("nav.browseTools")}
|
||||
</CommandItem>
|
||||
<CommandItem onSelect={() => go("/tools/new")}>
|
||||
<PlusCircle className="mr-2 h-4 w-4" /> Add a Tool
|
||||
<PlusCircle className="mr-2 h-4 w-4" /> {t("nav.addTool")}
|
||||
</CommandItem>
|
||||
<CommandItem onSelect={() => go("/analytics")}>
|
||||
<BarChart3 className="mr-2 h-4 w-4" /> Analytics
|
||||
<BarChart3 className="mr-2 h-4 w-4" /> {t("nav.analytics")}
|
||||
</CommandItem>
|
||||
{showWatchlist && (
|
||||
<CommandItem onSelect={() => go("/watchlist")}>
|
||||
<Star className="mr-2 h-4 w-4" /> My Watchlist
|
||||
<Star className="mr-2 h-4 w-4" /> {t("nav.watchlist")}
|
||||
</CommandItem>
|
||||
)}
|
||||
{showTrash && (
|
||||
<CommandItem onSelect={() => go("/trash")}>
|
||||
<Trash2 className="mr-2 h-4 w-4" /> Trash
|
||||
<Trash2 className="mr-2 h-4 w-4" /> {t("nav.trash")}
|
||||
</CommandItem>
|
||||
)}
|
||||
{isAdmin && (
|
||||
<CommandItem onSelect={() => go("/admin")}>
|
||||
<ShieldCheck className="mr-2 h-4 w-4" /> Admin
|
||||
<ShieldCheck className="mr-2 h-4 w-4" /> {t("nav.admin")}
|
||||
</CommandItem>
|
||||
)}
|
||||
</CommandGroup>
|
||||
|
||||
Reference in New Issue
Block a user