Skip to content

ServerKit is a lightweight, modern server control panel for managing web applications, databases, and services on your VPS or dedicated server. Built with Python/Flask backend and React frontend.

Let DomainField callers state their own DNS step

Juan Denisf81345ea7513
diff --git a/frontend/src/components/DomainField.jsx b/frontend/src/components/DomainField.jsx
index c9ba9110..61df0022 100644
--- a/frontend/src/components/DomainField.jsx
+++ b/frontend/src/components/DomainField.jsx
@@ -36,6 +36,9 @@ function loadBases() {
* - custom: any hostname the user controls, with the existing ServerKit
* domains offered as suggestions.
*
+ * `hint(name)` replaces the own-domain DNS line when the record is not an A
+ * record at this server (a tunnel route, an edge proxy).
+ *
* `onChange` receives the normalized hostname ('' while incomplete) and
* `{ mode, valid, base, label, dnsMode, https }` so the caller can pick the
* right API (give-subdomain vs create-domain) without re-deriving anything.
@@ -46,6 +49,7 @@ export default function DomainField({
modes = ['subdomain', 'custom'],
defaultLabel = '',
exclude = [],
+ hint,
disabled = false,
autoFocus = false,
id,
@@ -146,6 +150,8 @@ export default function DomainField({
: { text: t('app.domainField.recordCreated', 'ServerKit creates the DNS record for {{name}}.', { name: fqdn }) };
} else if (fqdn && existingRow) {
status = { text: t('app.domainField.alreadyInServerkit', 'Already in ServerKit.') };
+ } else if (fqdn && hint) {
+ status = { text: hint(fqdn) };
} else if (fqdn) {
status = { text: t('app.domainField.pointARecord', 'Point an A record for {{name}} at this server.', { name: fqdn }) };
} else if (activeMode === 'custom' && !allowSubdomain && modes.includes('subdomain') && basesLoaded) {
diff --git a/frontend/src/components/serverdetail/CloudflaredTab.jsx b/frontend/src/components/serverdetail/CloudflaredTab.jsx
index 1a85e4b3..8d5e1298 100644
--- a/frontend/src/components/serverdetail/CloudflaredTab.jsx
+++ b/frontend/src/components/serverdetail/CloudflaredTab.jsx
@@ -546,6 +546,7 @@ const CloudflaredTab = ({ serverId, serverStatus }) => {
modes={['custom']}
value={routeHostname}
onChange={setRouteHostname}
+ hint={(name) => t('app.cloudflaredTab.routeCreatesRecord', 'Adding the route creates the Cloudflare DNS record for {{name}}.', { name })}
autoFocus
/>
</div>
diff --git a/frontend/src/pages/RemoteAccess.jsx b/frontend/src/pages/RemoteAccess.jsx
index d8c0a815..d0675b33 100644
--- a/frontend/src/pages/RemoteAccess.jsx
+++ b/frontend/src/pages/RemoteAccess.jsx
@@ -420,6 +420,7 @@ const RemoteAccess = ({ serverId }) => {
modes={['custom']}
value={form.hostname}
onChange={(fqdn) => setField('hostname', fqdn)}
+ hint={(name) => t('app.remoteAccess.pointAtEdge', 'Point {{name}} at the edge server; the tunnel carries it from there.', { name })}
/>
</div>
<div className="ra-service-field">