Skip to content

Commit

Permalink
Added link to force caddy update
Browse files Browse the repository at this point in the history
  • Loading branch information
jzongker committed Nov 1, 2024
1 parent 0e82b03 commit 4c1b12d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
6 changes: 5 additions & 1 deletion public/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,11 @@
"delete": "Delete",
"domain": "Domain",
"domains": "Domains",
"domMsg": "You can make your B1 website answer for any custom domain you wish. Enter the associated domain name here and then add the following record to your DNS:"
"domMsg": "You can make your B1 website answer for any custom domain you wish. Enter the associated domain name here and then add the following record to your DNS:",
"domMsg2": "If your DNS provider will not allow you to add a CNAME record you can alternatively use an A record:",
"domMsg3": "If you receive SSL errors after adding the DNS entry. Click here to ",
"domMsgConnect": "connect",
"domMsg4": ". It can take up to 5 minutes."
},
"givingSettingsEdit": {
"forceMsg": "Automatically forces users to cover the transaction fees",
Expand Down
15 changes: 14 additions & 1 deletion src/settings/components/DomainSettingsEdit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,26 @@ export const DomainSettingsEdit: React.FC<Props> = (props) => {
return result;
}

const relink = (e: React.MouseEvent) => {
e.preventDefault();
ApiHelper.get("/domains/caddy", "MembershipApi").then((data) => {
alert("Done. Please only click this link once.");
});
}

React.useEffect(() => { if (props.churchId) loadData() }, [props.churchId]); //eslint-disable-line
React.useEffect(checkSave, [props.saveTrigger]); //eslint-disable-line


return (
<>
<div className="subHead">{Locale.label("settings.domainSettingsEdit.domains")}</div>
<p>{Locale.label("settings.domainSettingsEdit.domMsg")} <i style={{ fontSize: 12 }}>CNAME: proxy.b1.church</i></p>
<p style={{fontSize:12}}>
{Locale.label("settings.domainSettingsEdit.domMsg")} <i style={{ fontSize: 12 }}>CNAME: proxy.b1.church</i>
{Locale.label("settings.domainSettingsEdit.domMsg2")} <i style={{ fontSize: 12 }}>A: 3.23.251.61</i>
{Locale.label("settings.domainSettingsEdit.domMsg3")} <a href="about:blank" onClick={relink}>{Locale.label("settings.domainSettingsEdit.domMsgConnect")}</a>
{Locale.label("settings.domainSettingsEdit.domMsg4")}
</p>
<Grid container spacing={3}>
<Grid item md={6} xs={12}>
<Table>
Expand Down

0 comments on commit 4c1b12d

Please sign in to comment.