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 (
|
return (
|
||||||
<header className="navbar-expand-md">
|
<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="navbar">
|
||||||
<div className="container-xl">
|
<div className="container-xl">
|
||||||
<div className="row flex-column flex-md-row flex-fill align-items-center">
|
<div className="row flex-column flex-md-row flex-fill align-items-center">
|
||||||
|
|||||||
@@ -10,35 +10,42 @@ interface Props {
|
|||||||
color?: string;
|
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.
|
// when domain contains a wildcard, make the link go nowhere.
|
||||||
let onClick: ((e: React.MouseEvent) => void) | undefined;
|
// Apparently the domain can be null or undefined sometimes.
|
||||||
if (domain.includes("*")) {
|
// This try is just a safeguard to prevent the whole formatter from breaking.
|
||||||
onClick = (e: React.MouseEvent) => e.preventDefault();
|
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) {
|
export function DomainsFormatter({ domains, createdOn, niceName, provider, color }: Props) {
|
||||||
const elms: ReactNode[] = [];
|
const elms: ReactNode[] = [];
|
||||||
if (domains.length === 0 && !niceName) {
|
if ((!domains || domains.length === 0) && !niceName) {
|
||||||
elms.push(
|
elms.push(
|
||||||
<span key="nice-name" className="badge bg-danger-lt me-2">
|
<span key="nice-name" className="badge bg-danger-lt me-2">
|
||||||
Unknown
|
Unknown
|
||||||
</span>,
|
</span>,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (niceName && provider !== "letsencrypt") {
|
if (!domains || (niceName && provider !== "letsencrypt")) {
|
||||||
elms.push(
|
elms.push(
|
||||||
<span key="nice-name" className="badge bg-info-lt me-2">
|
<span key="nice-name" className="badge bg-info-lt me-2">
|
||||||
{niceName}
|
{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 (
|
return (
|
||||||
<div className="flex-fill">
|
<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/[yourlang].json
|
||||||
- frontend/src/locale/src/lang-list.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/src/locale/IntlProvider.tsx
|
||||||
|
- frontend/check-locales.cjs
|
||||||
|
|
||||||
|
|
||||||
## Checking for missing translations in languages
|
## Checking for missing translations in languages
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
import * as de from "./de/index";
|
import * as de from "./de/index";
|
||||||
import * as en from "./en/index";
|
import * as en from "./en/index";
|
||||||
import * as ja from "./ja/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 pl from "./pl/index";
|
||||||
import * as ru from "./ru/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 };
|
const items: any = { en, de, ja, sk, zh, pl, ru };
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user