Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[frogend/bugfix] Remove domain block edit functionality until implemented in backend #1199

Merged
merged 1 commit into from
Dec 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 16 additions & 5 deletions web/source/settings/admin/federation.js
Original file line number Diff line number Diff line change
Expand Up @@ -339,28 +339,39 @@ function InstancePage({domain, Form}) {
return (
<div>
<h1><BackButton to={base}/> Federation settings for: {domain}</h1>
{entry.new && "No stored block yet, you can add one below:"}
{entry.new
? "No stored block yet, you can add one below:"
: <b className="error">Editing domain blocks is not implemented yet, <a href="https://github.com/superseriousbusiness/gotosocial/issues/1198" target="_blank" rel="noopener noreferrer">check here for progress</a>.</b>
}

<Form.TextArea
id="public_comment"
name="Public comment"
inputProps={{
disabled: !entry.new
}}
/>

<Form.TextArea
id="private_comment"
name="Private comment"
inputProps={{
disabled: !entry.new
}}
/>

<Form.Checkbox
id="obfuscate"
name="Obfuscate domain? "
inputProps={{
disabled: !entry.new
}}
/>

<div className="messagebutton">
<button type="submit" onClick={updateBlock}>{entry.new ? "Add block" : "Save block"}</button>

{!entry.new &&
<button className="danger" onClick={removeBlock}>Remove block</button>
{entry.new
? <button type="submit" onClick={updateBlock}>{entry.new ? "Add block" : "Save block"}</button>
: <button className="danger" onClick={removeBlock}>Remove block</button>
}

{errorMsg.length > 0 &&
Expand Down