Skip to content

Commit

Permalink
added warning if custom port is used
Browse files Browse the repository at this point in the history
  • Loading branch information
sinamics committed Jan 13, 2024
1 parent ae62a53 commit c9eb63f
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 0 deletions.
32 changes: 32 additions & 0 deletions src/components/adminPage/controller/privateRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,38 @@ const PrivateRoot = () => {
<div className="space-y-5">
{getPlanet?.rootNodes?.map((node, i) => (
<div key={node.id} className="border border-primary rounded p-4 my-4">
{!node.endpoints.toString().includes("9993") ? (
<div role="alert" className="alert shadow-lg mb-5">
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
className="stroke-info shrink-0 w-6 h-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth="2"
d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
></path>
</svg>
<div>
<h3 className="font-bold">
{t("controller.generatePlanet.customPortIsInUse")}
</h3>
<div className="text-xs">
{t.rich(
"controller.generatePlanet.customPortIsInUseDescription",
{
kbd: (content) => (
<kbd className="kbd kbd-xs">{content}</kbd>
),
},
)}
</div>
</div>
</div>
) : null}
<p className="tracking-wide font-medium">Root #{i + 1}</p>
<p>
<strong>Comments:</strong> {node.comments}
Expand Down
2 changes: 2 additions & 0 deletions src/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@
"generatePlanet": {
"updatePlanetWarning": "Updating the planet file will modify the core structure of your ZeroTier network, impacting routes, flexibility, and potentially availability. Proceed with caution, understanding the implications.",
"customPlanetInUse": "Custom Planet is currently in use!",
"customPortIsInUse": "NOTE! Custom port used",
"customPortIsInUseDescription": "You need to add <kbd>ZT_PRIMARY_PORT:port</kbd> to the ZeroTier Docker Compose environment variables.",
"downloadPlanetInfo": "Should you need it, the planet file is available for download at the following URL:",
"downloadPlanetUrl": "api/planet",
"generatePrivateRootLabel": "Generate private root",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@
"generatePlanet": {
"updatePlanetWarning": "Actualizar el archivo del planeta modificará la estructura central de tu red ZeroTier, impactando rutas, flexibilidad y potencialmente disponibilidad. Procede con precaución, entendiendo las implicaciones.",
"customPlanetInUse": "¡El Planeta Personalizado está actualmente en uso!",
"customPortIsInUse": "¡NOTA! Puerto personalizado utilizado",
"customPortIsInUseDescription": "Necesitas agregar <kbd>ZT_PRIMARY_PORT:puerto</kbd> a las variables de entorno de ZeroTier Docker Compose.",
"downloadPlanetInfo": "En caso de que lo necesite, el archivo del planeta está disponible para descargar en la siguiente URL:",
"downloadPlanetUrl": "api/planet",
"generatePrivateRootLabel": "Generar raíz privada",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/fr/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@
"generatePlanet": {
"updatePlanetWarning": "La mise à jour du fichier planète modifiera la structure de base de votre réseau ZeroTier, ce qui aura un impact sur les routes, la flexibilité et potentiellement la disponibilité. Procédez avec prudence, en comprenant les implications.",
"customPlanetInUse": "La planète personnalisé est actuellement utilisé !",
"customPortIsInUse": "NOTE ! Port personnalisé utilisé",
"customPortIsInUseDescription": "Vous devez ajouter <kbd>ZT_PRIMARY_PORT:port</kbd> aux variables d'environnement de ZeroTier Docker Compose.",
"downloadPlanetInfo": "Vous pouvez également télécharger le fichier planète en accédant à l'URL :",
"downloadPlanetUrl": "api/planet",
"generatePrivateRootLabel": "Générer une racine privée",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/no/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@
"generatePlanet": {
"updatePlanetWarning": "Oppdatering av planetfilen vil endre kjernestrukturen i ZeroTier-nettverket ditt, påvirke ruter, fleksibilitet og potensielt tilgjengelighet. Fortsett med forsiktighet, og forstå konsekvensene.",
"customPlanetInUse": "Egendefinert Planet er for tiden i bruk!",
"customPortIsInUse": "MERK! Tilpasset port brukt",
"customPortIsInUseDescription": "Du må legge til <kbd>ZT_PRIMARY_PORT:port</kbd> i miljøvariablene for ZeroTier Docker Compose.",
"downloadPlanetInfo": "Skulle du trenge det, er planetfilen tilgjengelig for nedlasting på følgende nettadresse:",
"downloadPlanetUrl": "api/planet",
"generatePrivateRootLabel": "Generer privat rot",
Expand Down
2 changes: 2 additions & 0 deletions src/locales/zh/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@
"generatePlanet": {
"updatePlanetWarning": "更新planet文件将修改您的ZeroTier网络的核心结构,影响路由,灵活性和可能的可用性。小心进行,理解其中的含义。",
"customPlanetInUse": "自定义星球目前正在使用中!",
"customPortIsInUse": "注意!使用了自定义端口",
"customPortIsInUseDescription": "你需要在 ZeroTier Docker Compose 的环境变量中添加 <kbd>ZT_PRIMARY_PORT:端口</kbd>。",
"downloadPlanetInfo": "如果您需要,可以从以下网址下载行星文件:",
"downloadPlanetUrl": "api/planet",
"generatePrivateRootLabel": "生成私有根",
Expand Down

0 comments on commit c9eb63f

Please sign in to comment.