Compare commits

..

4 Commits

Author SHA1 Message Date
Eduard Gert
8eebec78b4 Preserve query params for ssh and rdp (#559)
Some checks failed
build and push / build_n_push (push) Has been cancelled
2026-02-16 17:34:08 +01:00
raghvendra
3e01a6dafd refactor: simplify FullScreenLoading to use boolean prop instead of string union (#555) 2026-02-16 11:10:26 +01:00
Maycon Santos
1555b94043 Fix service cluster status (#556)
Some checks failed
build and push / build_n_push (push) Has been cancelled
2026-02-16 09:23:22 +01:00
Eduard Gert
6c62127d42 Update announcement (#553) 2026-02-13 20:56:40 +01:00
9 changed files with 21 additions and 18 deletions

View File

@@ -1,9 +1,9 @@
[
{
"tag": "New",
"text": "Custom DNS Zones for Private Network Resolution",
"link": "https://netbird.io/knowledge-hub/custom-dns-zones",
"linkText": "Read Release Article",
"text": "NetBird Reverse Proxy - Expose internal services to the public with automatic TLS and optional authentication.",
"link": "https://docs.netbird.io/manage/reverse-proxy",
"linkText": "Learn more",
"variant": "important",
"isExternal": true,
"closeable": true,

View File

@@ -6,5 +6,5 @@ import React from "react";
export default function Redirect() {
useRedirect("/events/audit");
return <FullScreenLoading height={"auto"} />;
return <FullScreenLoading fullScreen={false} />;
}

View File

@@ -11,5 +11,5 @@ export default function DNS() {
router.push("/dns/nameservers");
}, [router]);
return <FullScreenLoading height={"auto"} />;
return <FullScreenLoading fullScreen={false} />;
}

View File

@@ -11,5 +11,5 @@ export default function ReverseProxyRedirectPage() {
router.replace("/reverse-proxy/services");
}, [router]);
return <FullScreenLoading height={"auto"} />;
return <FullScreenLoading fullScreen={false} />;
}

View File

@@ -11,5 +11,5 @@ export default function Team() {
router.push("/team/users");
}, [router]);
return <FullScreenLoading height={"auto"} />;
return <FullScreenLoading fullScreen={false} />;
}

View File

@@ -4,6 +4,7 @@ import * as React from "react";
import { useEffect } from "react";
const QUERY_PARAMS_KEY = "netbird-query-params";
const PRESERVE_QUERY_PARAMS_PATHS = ["/peer/ssh", "/peer/rdp"];
const VALID_PARAMS = [
"tab",
"search",
@@ -28,9 +29,9 @@ export const SecureProvider = ({ children }: Props) => {
const currentPath = usePathname();
useEffect(() => {
if (isAuthenticated) {
if (isAuthenticated && !PRESERVE_QUERY_PARAMS_PATHS.includes(currentPath)) {
localStorage.removeItem(QUERY_PARAMS_KEY);
} else {
} else if (!isAuthenticated) {
try {
const params = window.location.search.substring(1);
if (params) {
@@ -41,7 +42,7 @@ export const SecureProvider = ({ children }: Props) => {
}
} catch (e) {}
}
}, [isAuthenticated]);
}, [isAuthenticated, currentPath]);
useEffect(() => {
let timeout: NodeJS.Timeout | undefined = undefined;

View File

@@ -2,18 +2,17 @@ import { cn } from "@utils/helpers";
import LoadingIcon from "@/assets/icons/LoadingIcon";
type Props = {
height?: "screen" | "auto";
fullScreen?: boolean
};
export default function FullScreenLoading({ height = "screen" }: Props) {
export default function FullScreenLoading({ fullScreen = true }: Props) {
return (
<div
className={cn(
"flex items-center justify-center w-screen",
height == "screen" && "h-screen",
height == "auto" && "h-auto",
fullScreen && "h-screen",
)}
>
<LoadingIcon className={"fill-netbird"} size={44} />
<LoadingIcon className="fill-netbird" size={44} />
</div>
);
}

View File

@@ -8,7 +8,8 @@ import React, {
useState,
} from "react";
import { usePermissions } from "@/contexts/PermissionsProvider";
import { isNetBirdHosted } from "@utils/netbird";
import { isLocalDev, isNetBirdHosted } from "@utils/netbird";
import announcementFile from "../../announcements.json";
const ANNOUNCEMENTS_URL =
"https://raw.githubusercontent.com/netbirdio/dashboard/main/announcements.json";
@@ -64,7 +65,9 @@ const getAnnouncements = async (): Promise<AnnouncementInfo[]> => {
let raw: Announcement[];
if (stored && now - stored.timestamp < CACHE_DURATION_MS) {
if (isLocalDev()) {
raw = announcementFile as Announcement[];
} else if (stored && now - stored.timestamp < CACHE_DURATION_MS) {
raw = stored.announcements;
} else {
const response = await fetch(ANNOUNCEMENTS_URL);

View File

@@ -405,7 +405,7 @@ export default function ReverseProxyModal({
</div>
</div>
{reverseProxy?.proxy_cluster && (
{reverseProxy?.proxy_cluster && !isClusterConnected && (
<Callout variant={"error"}>
Cluster {reverseProxy.proxy_cluster} is offline. Make sure the
proxy server is running and connected to the right management