diff --git a/ui/localization/messages/en.json b/ui/localization/messages/en.json index a7bf672d..8bb66473 100644 --- a/ui/localization/messages/en.json +++ b/ui/localization/messages/en.json @@ -457,5 +457,53 @@ "wake_on_lan_magic_sent_success": "Magic Packet sent successfully", "wake_on_lan": "Wake On LAN", "welcome_to_jetkvm_description": "Control any computer remotely", - "welcome_to_jetkvm": "Welcome to JetKVM" + "welcome_to_jetkvm": "Welcome to JetKVM", + + "access_adopt_kvm": "Adopt KVM to Cloud", + "access_adopted_message": "Your device is adopted to the Cloud", + "access_auth_mode_no_password": "Current mode: No password", + "access_auth_mode_password": "Current mode: Password protected", + "access_authentication_mode_title": "Authentication Mode", + "access_certificate_label": "Certificate", + "access_change_password_button": "Change Password", + "access_change_password_description": "Update your device access password", + "access_change_password_title": "Change Password", + "access_cloud_api_url_label": "Cloud API URL", + "access_cloud_app_url_label": "Cloud Application URL", + "access_cloud_provider_description": "Select the cloud provider for your device", + "access_cloud_provider_title": "Cloud Provider", + "access_cloud_security_title": "Cloud Security", + "access_confirm_deregister": "Are you sure you want to de-register this device?", + "access_deregister": "De-register from Cloud", + "access_description": "Manage the Access Control of the device", + "access_disable_protection": "Disable Protection", + "access_enable_password": "Enable Password", + "access_failed_deregister": "Failed to de-register device: {error}", + "access_failed_update_cloud_url": "Failed to update cloud URL: {error}", + "access_failed_update_tls": "Failed to update TLS settings: {error}", + "access_github_link": "GitHub", + "access_https_description": "Configure secure HTTPS access to your device", + "access_https_mode_title": "HTTPS Mode", + "access_learn_security": "Learn about our cloud security", + "access_local_description": "Manage the mode of local access to the device", + "access_local_title": "Local", + "access_no_device_id": "No device ID available", + "access_private_key_description": "For security reasons, it will not be displayed after saving.", + "access_private_key_label": "Private Key", + "access_provider_custom": "Custom", + "access_provider_jetkvm": "JetKVM Cloud", + "access_remote_description": "Manage the mode of Remote access to the device", + "access_security_encryption": "End-to-end encryption using WebRTC (DTLS and SRTP)", + "access_security_oidc": "OIDC (OpenID Connect) authentication", + "access_security_open_source": "All cloud components are open-source and available on GitHub.", + "access_security_streams": "All streams encrypted in transit", + "access_security_zero_trust": "Zero Trust security model", + "access_title": "Access", + "access_tls_certificate_description": "Paste your TLS certificate below. For certificate chains, include the entire chain (leaf, intermediate, and root certificates).", + "access_tls_certificate_title": "TLS Certificate", + "access_tls_custom": "Custom", + "access_tls_disabled": "Disabled", + "access_tls_self_signed": "Self-signed", + "access_tls_updated": "TLS settings updated successfully", + "access_update_tls_settings": "Update TLS Settings" } \ No newline at end of file diff --git a/ui/src/routes/devices.$id.settings._index.tsx b/ui/src/routes/devices.$id.settings._index.tsx index e4a9d7f1..a1954d6d 100644 --- a/ui/src/routes/devices.$id.settings._index.tsx +++ b/ui/src/routes/devices.$id.settings._index.tsx @@ -1,7 +1,7 @@ import { redirect } from "react-router"; import type { LoaderFunction, LoaderFunctionArgs } from "react-router"; -import { getDeviceUiPath } from "../hooks/useAppNavigation"; +import { getDeviceUiPath } from "@hooks/useAppNavigation"; const loader: LoaderFunction = ({ params }: LoaderFunctionArgs) => { return redirect(getDeviceUiPath("/settings/general", params.id)); diff --git a/ui/src/routes/devices.$id.settings.access._index.tsx b/ui/src/routes/devices.$id.settings.access._index.tsx index f30bfef1..50a85c7b 100644 --- a/ui/src/routes/devices.$id.settings.access._index.tsx +++ b/ui/src/routes/devices.$id.settings.access._index.tsx @@ -1,22 +1,22 @@ -import { useLoaderData, useNavigate } from "react-router"; -import type { LoaderFunction } from "react-router"; -import { ShieldCheckIcon } from "@heroicons/react/24/outline"; import { useCallback, useEffect, useState } from "react"; +import { useLoaderData, useNavigate, type LoaderFunction } from "react-router"; +import { ShieldCheckIcon } from "@heroicons/react/24/outline"; -import api from "@/api"; -import { SettingsPageHeader } from "@components/SettingsPageheader"; -import { GridCard } from "@/components/Card"; -import { Button, LinkButton } from "@/components/Button"; -import { InputFieldWithLabel } from "@/components/InputField"; -import { SelectMenuBasic } from "@/components/SelectMenuBasic"; +import { useDeviceUiNavigation } from "@hooks/useAppNavigation"; +import { JsonRpcResponse, useJsonRpc } from "@hooks/useJsonRpc"; +import { GridCard } from "@components/Card"; +import { Button, LinkButton } from "@components/Button"; +import { InputFieldWithLabel } from "@components/InputField"; +import { SelectMenuBasic } from "@components/SelectMenuBasic"; import { SettingsItem } from "@components/SettingsItem"; -import { SettingsSectionHeader } from "@/components/SettingsSectionHeader"; -import { useDeviceUiNavigation } from "@/hooks/useAppNavigation"; +import { SettingsPageHeader } from "@components/SettingsPageheader"; +import { SettingsSectionHeader } from "@components/SettingsSectionHeader"; +import { TextAreaWithLabel } from "@components/TextArea"; +import api from "@/api"; import notifications from "@/notifications"; import { DEVICE_API } from "@/ui.config"; -import { JsonRpcResponse, useJsonRpc } from "@/hooks/useJsonRpc"; import { isOnDevice } from "@/main"; -import { TextAreaWithLabel } from "@components/TextArea"; +import { m } from "@localizations/messages.js"; import { LocalDevice } from "./devices.$id"; import { CloudState } from "./adopt"; @@ -92,7 +92,7 @@ export default function SettingsAccessIndexRoute() { send("deregisterDevice", {}, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error( - `Failed to de-register device: ${resp.error.data || "Unknown error"}`, + m.access_failed_deregister({ error: resp.error.data || "Unknown error" }), ); return; } @@ -107,14 +107,14 @@ export default function SettingsAccessIndexRoute() { const onCloudAdoptClick = useCallback( (cloudApiUrl: string, cloudAppUrl: string) => { if (!deviceId) { - notifications.error("No device ID available"); + notifications.error(m.access_no_device_id()); return; } send("setCloudUrl", { apiUrl: cloudApiUrl, appUrl: cloudAppUrl }, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error( - `Failed to update cloud URL: ${resp.error.data || "Unknown error"}`, + m.access_failed_update_cloud_url({ error: resp.error.data || "Unknown error" }), ); return; } @@ -160,12 +160,12 @@ export default function SettingsAccessIndexRoute() { send("setTLSState", { state }, (resp: JsonRpcResponse) => { if ("error" in resp) { notifications.error( - `Failed to update TLS settings: ${resp.error.data || "Unknown error"}`, + m.access_failed_update_tls({ error: resp.error.data || "Unknown error" }), ); return; } - notifications.success("TLS settings updated successfully"); + notifications.success(m.access_tls_updated()); }); }, [send]); @@ -206,22 +206,22 @@ export default function SettingsAccessIndexRoute() { return (
{loaderData?.authMode && ( <>
<> handleTlsModeChange(e.target.value)} disabled={tlsMode === "unknown"} options={[ - { value: "disabled", label: "Disabled" }, - { value: "self-signed", label: "Self-signed" }, - { value: "custom", label: "Custom" }, + { value: "disabled", label: m.access_tls_disabled() }, + { value: "self-signed", label: m.access_tls_self_signed() }, + { value: "custom", label: m.access_tls_custom() }, ]} /> @@ -240,12 +240,12 @@ export default function SettingsAccessIndexRoute() {
@@ -282,14 +282,14 @@ export default function SettingsAccessIndexRoute() { )} {loaderData.authMode === "password" ? (