Skip to content

Commit bac081b

Browse files
committed
add light/system theme
1 parent df8a05a commit bac081b

File tree

92 files changed

+342
-281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

92 files changed

+342
-281
lines changed

src/app/(dashboard)/dns/settings/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ const SettingDisabledManagementGroups = ({
128128
</div>
129129
<div
130130
className={
131-
"flex justify-end bg-nb-gray-900/20 border-t border-nb-gray-900 px-8 py-5"
131+
"flex justify-end bg-gray-50 dark:bg-nb-gray-900/20 border-t border-gray-200 dark:border-nb-gray-900 px-8 py-5"
132132
}
133133
>
134134
<Button

src/app/(dashboard)/peer/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ function PeerOverview() {
179179
<ModalTrigger>
180180
<div
181181
className={
182-
"flex items-center gap-2 dark:text-neutral-300 text-neutral-500 hover:text-neutral-100 transition-all hover:bg-nb-gray-800/60 py-2 px-3 rounded-md cursor-pointer"
182+
"flex items-center gap-2 text-neutral-500 dark:text-neutral-300 hover:text-neutral-700 dark:hover:text-neutral-100 transition-all hover:bg-gray-100 dark:hover:bg-nb-gray-800/60 py-2 px-3 rounded-md cursor-pointer"
183183
}
184184
>
185185
<PencilIcon size={16} />
@@ -241,10 +241,10 @@ function PeerOverview() {
241241
{isOwnerOrAdmin && !!peer?.user_id && (
242242
<div
243243
className={cn(
244-
"border border-nb-gray-900 border-t-0 rounded-b-md bg-nb-gray-940 px-[1.28rem] pt-3 pb-5 flex flex-col gap-4 mx-[0.25rem]",
244+
"border border-gray-200 dark:border-nb-gray-900 border-t-0 rounded-b-md bg-gray-50 dark:bg-nb-gray-940 px-[1.28rem] pt-3 pb-5 flex flex-col gap-4 mx-[0.25rem]",
245245
!loginExpiration
246246
? "opacity-50 pointer-events-none"
247-
: "bg-nb-gray-930/80",
247+
: "bg-gray-100 dark:bg-nb-gray-930/80",
248248
)}
249249
>
250250
<PeerExpirationToggle

src/app/(dashboard)/settings/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default function NetBirdSettings() {
5959
</VerticalTabs.Trigger>
6060
</VerticalTabs.List>
6161
<RestrictedAccess page={"Settings"}>
62-
<div className={"border-l border-nb-gray-930 w-full"}>
62+
<div className={"border-l border-gray-200 dark:border-nb-gray-930 w-full"}>
6363
{account && <AuthenticationTab account={account} />}
6464
{account && <PermissionsTab account={account} />}
6565
{account && <GroupsTab account={account} />}

src/app/(dashboard)/team/user/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ function UserOverview({ user, initialGroups }: Readonly<Props>) {
143143
<div className={"flex items-center gap-3"}>
144144
<div
145145
className={
146-
"w-10 h-10 rounded-full relative flex items-center justify-center text-white uppercase text-md font-medium bg-nb-gray-900"
146+
"w-10 h-10 rounded-full relative flex items-center justify-center text-gray-700 dark:text-white uppercase text-md font-medium bg-gray-200 dark:bg-nb-gray-900"
147147
}
148148
style={
149149
user.is_service_user

src/assets/netbird-full-light.svg

Lines changed: 19 additions & 0 deletions
Loading

src/auth/OIDCError.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ export const OIDCError = () => {
4040
>
4141
<div
4242
className={
43-
"bg-nb-gray-930 mb-3 border border-nb-gray-900 h-12 w-12 rounded-md flex items-center justify-center "
43+
"bg-gray-100 dark:bg-nb-gray-930 mb-3 border border-gray-200 dark:border-nb-gray-900 h-12 w-12 rounded-md flex items-center justify-center "
4444
}
4545
>
4646
<NetBirdIcon size={23} />

src/auth/SessionLost.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const SessionLost = () => {
2626
>
2727
<div
2828
className={
29-
"bg-nb-gray-930 mb-3 border border-nb-gray-900 h-10 w-10 rounded-md flex items-center justify-center "
29+
"bg-gray-100 dark:bg-nb-gray-930 mb-3 border border-gray-200 dark:border-nb-gray-900 h-10 w-10 rounded-md flex items-center justify-center "
3030
}
3131
>
3232
<NetBirdIcon size={20} />

src/components/Badge.tsx

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,34 +16,34 @@ const variants = cva("", {
1616
blue: [
1717
"bg-sky-100 border-sky-500 text-sky-800 border border-transparent",
1818
],
19-
blueDark: ["bg-sky-900 border-sky-500 text-white border"],
20-
"blue-darker": ["bg-sky-900 border-sky-500 text-white border"],
21-
red: ["bg-red-950/40 border-red-500 border text-red-500"],
22-
purple: ["bg-purple-950/50 border-purple-500 border text-purple-500"],
23-
yellow: ["bg-yellow-950 border-yellow-500 border text-yellow-400"],
24-
gray: ["bg-nb-gray-930/60 border-nb-gray-800/40 text-nb-gray-300 border"],
19+
blueDark: ["bg-sky-100 border-sky-600 text-sky-800 border dark:bg-sky-900 dark:border-sky-500 dark:text-white"],
20+
"blue-darker": ["bg-sky-100 border-sky-600 text-sky-800 border dark:bg-sky-900 dark:border-sky-500 dark:text-white"],
21+
red: ["bg-red-100 border-red-400 text-red-600 border dark:bg-red-950/40 dark:border-red-500 dark:text-red-500"],
22+
purple: ["bg-purple-100 border-purple-400 text-purple-600 border dark:bg-purple-950/50 dark:border-purple-500 dark:text-purple-500"],
23+
yellow: ["bg-yellow-100 border-yellow-400 text-yellow-600 border dark:bg-yellow-950 dark:border-yellow-500 dark:text-yellow-400"],
24+
gray: ["bg-gray-100 border-gray-300 text-gray-600 border dark:bg-nb-gray-930/60 dark:border-nb-gray-800/40 dark:text-nb-gray-300"],
2525
grayer: [
26-
"bg-nb-gray-900/40 border-nb-gray-800/40 text-nb-gray-300 border",
26+
"bg-gray-100 border-gray-300 text-gray-600 border dark:bg-nb-gray-900/40 dark:border-nb-gray-800/40 dark:text-nb-gray-300",
2727
],
2828
"gray-ghost": [
29-
"bg-nb-gray-900 border-nb-gray-800 text-nb-gray-300 border border-nb-gray-800/50",
29+
"bg-gray-50 border-gray-200 text-gray-500 border dark:bg-nb-gray-900 dark:border-nb-gray-800 dark:text-nb-gray-300 dark:border-nb-gray-800/50",
3030
],
31-
green: ["bg-green-950 border-green-500 border text-green-400"],
32-
netbird: ["bg-netbird-950 border-netbird-500 border text-netbird-500"],
31+
green: ["bg-green-100 border-green-400 text-green-600 border dark:bg-green-950 dark:border-green-500 dark:text-green-400"],
32+
netbird: ["bg-netbird-100 border-netbird-400 text-netbird-600 border dark:bg-netbird-950 dark:border-netbird-500 dark:text-netbird-500"],
3333
},
3434
hover: {
3535
none: [],
36-
blue: ["hover:bg-sky-200"],
37-
purple: ["hover:bg-purple-950/40"],
38-
yellow: ["hover:bg-yellow-950/40"],
39-
blueDark: ["hover:bg-sky-800"],
40-
"blue-darker": ["hover:bg-sky-800"],
41-
red: ["hover:bg-red-950/40"],
42-
gray: ["hover:bg-nb-gray-900"],
43-
grayer: ["hover:bg-nb-gray-900"],
44-
"gray-ghost": ["hover:bg-nb-gray-900"],
45-
green: ["hover:bg-green-950/50"],
46-
netbird: ["hover:bg-netbird-950/50"],
36+
blue: ["hover:bg-sky-200 dark:hover:bg-sky-800"],
37+
purple: ["hover:bg-purple-200 dark:hover:bg-purple-950/40"],
38+
yellow: ["hover:bg-yellow-200 dark:hover:bg-yellow-950/40"],
39+
blueDark: ["hover:bg-sky-200 dark:hover:bg-sky-800"],
40+
"blue-darker": ["hover:bg-sky-200 dark:hover:bg-sky-800"],
41+
red: ["hover:bg-red-200 dark:hover:bg-red-950/40"],
42+
gray: ["hover:bg-gray-200 dark:hover:bg-nb-gray-900"],
43+
grayer: ["hover:bg-gray-200 dark:hover:bg-nb-gray-900"],
44+
"gray-ghost": ["hover:bg-gray-100 dark:hover:bg-nb-gray-900"],
45+
green: ["hover:bg-green-200 dark:hover:bg-green-950/50"],
46+
netbird: ["hover:bg-netbird-200 dark:hover:bg-netbird-950/50"],
4747
},
4848
},
4949
});

src/components/Button.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export const buttonVariants = cva(
6363
"dark:focus:ring-zinc-800/50 dark:bg-transparent dark:text-netbird dark:border-netbird dark:hover:bg-nb-gray-900/30",
6464
],
6565
"danger-outline": [
66-
"", // TODO - add danger button styles for light mode
66+
"bg-transparent focus:ring-red-400/20 hover:bg-red-50 text-red-500 border-red-500",
6767
"enabled:dark:focus:ring-red-800/20 enabled:dark:focus:bg-red-950/40 enabled:hover:dark:bg-red-950/50 enabled:dark:hover:border-red-800/50 dark:bg-transparent dark:text-red-500",
6868
"",
6969
],
@@ -72,7 +72,7 @@ export const buttonVariants = cva(
7272
"dark:bg-transparent dark:text-nb-gray-400 dark:border-transparent dark:hover:text-white dark:hover:bg-zinc-800/50 dark:hover:border-nb-gray-800/50",
7373
],
7474
danger: [
75-
"", // TODO - add danger button styles for light mode
75+
"bg-red-600 text-white hover:bg-red-700 focus:ring-red-400/50",
7676
"dark:focus:ring-red-700/20 dark:focus:bg-red-700 hover:dark:bg-red-700 dark:hover:border-red-800/50 dark:bg-red-600 dark:text-red-100",
7777
],
7878
},

src/components/Card.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function Card({ children, className, ...props }: Props) {
1313
<div
1414
{...props}
1515
className={cn(
16-
"bg-nb-gray-940 rounded-md border border-nb-gray-900 w-1/2 overflow-hidden",
16+
"bg-white dark:bg-nb-gray-940 rounded-md border border-gray-200 dark:border-nb-gray-900 w-1/2 overflow-hidden",
1717
className,
1818
)}
1919
>
@@ -48,7 +48,7 @@ function CardListItem({
4848
return (
4949
<li
5050
className={cn(
51-
"flex justify-between px-4 border-b border-nb-gray-900 py-4 last:border-b-0 items-center h-full",
51+
"flex justify-between px-4 border-b border-gray-200 dark:border-nb-gray-900 py-4 last:border-b-0 items-center h-full",
5252
className,
5353
)}
5454
>
@@ -95,8 +95,8 @@ const CardTextItem = ({
9595
return (
9696
<div
9797
className={cn(
98-
"text-right text-nb-gray-400 text-sm flex items-center gap-2",
99-
copy && "cursor-pointer hover:text-nb-gray-300 transition-all",
98+
"text-right text-gray-500 dark:text-nb-gray-400 text-sm flex items-center gap-2",
99+
copy && "cursor-pointer hover:text-gray-700 dark:hover:text-nb-gray-300 transition-all",
100100
)}
101101
onClick={() =>
102102
copy &&

0 commit comments

Comments
 (0)