Skip to content

Commit 3a90654

Browse files
authored
Merge pull request #764 from l3montree-dev/star-banner
2 parents 796923a + 8c30171 commit 3a90654

4 files changed

Lines changed: 39 additions & 2 deletions

File tree

src/components/common/DynamicHeader.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ export default function DynamicHeader({ Title, menu, z }: Props) {
7070
<h1 className="font-display whitespace-nowrap text-lg font-semibold leading-7 text-header-foreground">
7171
{Title}
7272
</h1>
73+
7374
<UserNav />
7475
</div>
7576
</div>
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright (C) 2026 Lars Hermges, l3montree GmbH
2+
//
3+
// This program is free software: you can redistribute it and/or modify
4+
// it under the terms of the GNU Affero General Public License as
5+
// published by the Free Software Foundation, either version 3 of the
6+
// License, or (at your option) any later version.
7+
//
8+
// This program is distributed in the hope that it will be useful,
9+
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10+
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11+
// GNU Affero General Public License for more details.
12+
//
13+
// You should have received a copy of the GNU Affero General Public License
14+
// along with this program. If not, see <http://www.gnu.org/licenses/>.
15+
16+
import { Star } from "lucide-react";
17+
18+
export default function StarRepo() {
19+
return (
20+
<div className="flex h-7 overflow-hidden rounded-md border border-[#d0d7de] bg-[#f1f3f5] text-[#59636e] shadow-sm dark:border-[#3d444d] dark:bg-[#212830] dark:text-[#f0f6fc]">
21+
<a
22+
href={`https://github.com/l3montree-dev/devguard`}
23+
target="_blank"
24+
rel="noopener noreferrer"
25+
className="flex items-center gap-2 px-3 text-sm font-semibold !text-[#59636e] hover:bg-[#e9ecef] hover:no-underline dark:!text-[#f0f6fc] dark:hover:bg-[#2a313c]"
26+
aria-label="Star DevGuard on GitHub"
27+
data-umami-event="Github Star Button Clicked"
28+
>
29+
<Star className="h-4 w-4 text-[#535c66] dark:text-[#9198a1]" />
30+
<span>Star</span>
31+
</a>
32+
</div>
33+
);
34+
}

src/components/navigation/UserNav.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ import {
4141
import { useConfig } from "../../context/ConfigContext";
4242
import { getUserFullName } from "../../types/auth";
4343
import HelpDropdown from "./HelpDropdown";
44+
import StarRepo from "./StarRepo";
4445

4546
export default function UserNav() {
4647
const { setTheme } = useTheme();
@@ -55,7 +56,8 @@ export default function UserNav() {
5556
};
5657

5758
return (
58-
<div className="flex text-header-foreground user-nav flex-row justify-between gap-1">
59+
<div className="flex items-center text-header-foreground user-nav flex-row justify-between gap-1">
60+
<StarRepo />
5961
<HelpDropdown />
6062
<DropdownMenu>
6163
<DropdownMenuTrigger aria-label="Open tools menu">

src/components/ui/tabs.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const TabsTrigger = React.forwardRef<
2727
<TabsPrimitive.Trigger
2828
ref={ref}
2929
className={cn(
30-
"inline-flex cursor-pointer border border-transparent data-[state=active]:border-border dark:data-[state=active]:border-transparent items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",
30+
"inline-flex cursor-pointer border border-transparent data-[state=active]:border-border dark:data-[state=active]:border-transparent items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-secondary data-[state=active]:text-foreground data-[state=active]:shadow-sm",
3131
className,
3232
)}
3333
{...props}

0 commit comments

Comments
 (0)