mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-17 07:35:14 +00:00
Merge branch 'develop' into develop
This commit is contained in:
@@ -190,7 +190,7 @@ export function SiteMenu() {
|
||||
|
||||
return (
|
||||
<header className="navbar-expand-md">
|
||||
<div className="collapse navbar-collapse" id="navbar-menu">
|
||||
<div className="collapse navbar-collapse" id="navbar-menu">
|
||||
<div className="navbar">
|
||||
<div className="container-xl">
|
||||
<div className="row flex-column flex-md-row flex-fill align-items-center">
|
||||
|
||||
@@ -10,35 +10,42 @@ interface Props {
|
||||
color?: string;
|
||||
}
|
||||
|
||||
const DomainLink = ({ domain, color }: { domain: string; color?: string }) => {
|
||||
const DomainLink = ({ domain, color }: { domain?: string; color?: string }) => {
|
||||
// when domain contains a wildcard, make the link go nowhere.
|
||||
let onClick: ((e: React.MouseEvent) => void) | undefined;
|
||||
if (domain.includes("*")) {
|
||||
onClick = (e: React.MouseEvent) => e.preventDefault();
|
||||
// Apparently the domain can be null or undefined sometimes.
|
||||
// This try is just a safeguard to prevent the whole formatter from breaking.
|
||||
if (!domain) return null;
|
||||
try {
|
||||
let onClick: ((e: React.MouseEvent) => void) | undefined;
|
||||
if (domain.includes("*")) {
|
||||
onClick = (e: React.MouseEvent) => e.preventDefault();
|
||||
}
|
||||
return (
|
||||
<a
|
||||
key={domain}
|
||||
href={`http://${domain}`}
|
||||
target="_blank"
|
||||
onClick={onClick}
|
||||
className={cn("badge", color ? `bg-${color}-lt` : null, "domain-name", "me-2")}
|
||||
>
|
||||
{domain}
|
||||
</a>
|
||||
);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
return (
|
||||
<a
|
||||
key={domain}
|
||||
href={`http://${domain}`}
|
||||
target="_blank"
|
||||
onClick={onClick}
|
||||
className={cn("badge", color ? `bg-${color}-lt` : null, "domain-name", "me-2")}
|
||||
>
|
||||
{domain}
|
||||
</a>
|
||||
);
|
||||
};
|
||||
|
||||
export function DomainsFormatter({ domains, createdOn, niceName, provider, color }: Props) {
|
||||
const elms: ReactNode[] = [];
|
||||
if (domains.length === 0 && !niceName) {
|
||||
if ((!domains || domains.length === 0) && !niceName) {
|
||||
elms.push(
|
||||
<span key="nice-name" className="badge bg-danger-lt me-2">
|
||||
Unknown
|
||||
</span>,
|
||||
);
|
||||
}
|
||||
if (niceName && provider !== "letsencrypt") {
|
||||
if (!domains || (niceName && provider !== "letsencrypt")) {
|
||||
elms.push(
|
||||
<span key="nice-name" className="badge bg-info-lt me-2">
|
||||
{niceName}
|
||||
@@ -46,7 +53,9 @@ export function DomainsFormatter({ domains, createdOn, niceName, provider, color
|
||||
);
|
||||
}
|
||||
|
||||
domains.map((domain: string) => elms.push(<DomainLink key={domain} domain={domain} color={color} />));
|
||||
if (domains) {
|
||||
domains.map((domain: string) => elms.push(<DomainLink key={domain} domain={domain} color={color} />));
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex-fill">
|
||||
|
||||
@@ -39,8 +39,9 @@ not be complete by the time you're reading this:
|
||||
|
||||
- frontend/src/locale/src/[yourlang].json
|
||||
- frontend/src/locale/src/lang-list.json
|
||||
- frontend/src/locale/src/HelpDoc/*
|
||||
- frontend/src/locale/src/HelpDoc/[yourlang]/*
|
||||
- frontend/src/locale/IntlProvider.tsx
|
||||
- frontend/check-locales.cjs
|
||||
|
||||
|
||||
## Checking for missing translations in languages
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import * as de from "./de/index";
|
||||
import * as en from "./en/index";
|
||||
import * as ja from "./ja/index";
|
||||
import * as sk from "./sk/index";
|
||||
import * as zh from "./zh/index";
|
||||
import * as pl from "./pl/index";
|
||||
import * as ru from "./ru/index";
|
||||
import * as sk from "./sk/index";
|
||||
import * as zh from "./zh/index";
|
||||
|
||||
const items: any = { en, de, ja, sk, zh, pl, ru };
|
||||
|
||||
|
||||
Reference in New Issue
Block a user