Open platform to collect and prioritize feedback
enhancement: suggest ALIAS instead of A (#678)
Guilherme Oenningbbffb24b26bc
diff --git a/app/handlers/admin.go b/app/handlers/admin.goindex fbf8f2739..02c100a82 100644--- a/app/handlers/admin.go+++ b/app/handlers/admin.go@@ -2,24 +2,15 @@ package handlersimport ("github.com/getfider/fider/app/actions"- "github.com/getfider/fider/app/pkg/env""github.com/getfider/fider/app/pkg/web")// GeneralSettingsPage is the general settings pagefunc GeneralSettingsPage() web.HandlerFunc {return func(c web.Context) error {- publicIP, err := env.GetPublicIP()- if err != nil {- c.Logger().Error(err)- }-return c.Page(web.Props{Title: "General · Site Settings",ChunkName: "GeneralSettings.page",- Data: web.Map{- "publicIP": publicIP,- },})}}diff --git a/public/pages/Administration/pages/GeneralSettings.page.tsx b/public/pages/Administration/pages/GeneralSettings.page.tsxindex 3189340dd..772feeef0 100644--- a/public/pages/Administration/pages/GeneralSettings.page.tsx+++ b/public/pages/Administration/pages/GeneralSettings.page.tsx@@ -16,10 +16,6 @@ import { actions, Failure, fileToBase64, Fider } from "@fider/services";import { FaCogs } from "react-icons/fa";import { AdminBasePage } from "../components/AdminBasePage";-interface GeneralSettingsPageProps {- publicIP: string;-}-interface GeneralSettingsPageState {logo?: ImageUploadState;title: string;@@ -29,7 +25,7 @@ interface GeneralSettingsPageState {error?: Failure;}-export default class GeneralSettingsPage extends AdminBasePage<GeneralSettingsPageProps, GeneralSettingsPageState> {+export default class GeneralSettingsPage extends AdminBasePage<{}, GeneralSettingsPageState> {private fileSelector?: HTMLInputElement | null;public id = "p-admin-general";@@ -38,7 +34,7 @@ export default class GeneralSettingsPage extends AdminBasePage<GeneralSettingsPapublic title = "General";public subtitle = "Manage your site settings";- constructor(props: GeneralSettingsPageProps) {+ constructor(props: {}) {super(props);this.state = {@@ -93,13 +89,15 @@ export default class GeneralSettingsPage extends AdminBasePage<GeneralSettingsPa};public dnsInstructions(): JSX.Element {- const isApex = this.state.cname.split(".").length === 2;- const recordType = isApex ? "A" : "CNAME";- const publicIP = this.props.publicIP || "<error>";- const targetRecord = isApex ? publicIP : `${Fider.session.tenant.subdomain}${Fider.settings.domain}`;+ const isApex = this.state.cname.split(".").length <= 2;+ const recordType = isApex ? "ALIAS" : "CNAME";return (<>- <strong>{this.state.cname}</strong> {recordType} <strong>{targetRecord}</strong>+ <strong>{this.state.cname}</strong> {recordType}{" "}+ <strong>+ {Fider.session.tenant.subdomain}+ {Fider.settings.domain}+ </strong></>);}