2023-02-20 16:29:29 +01:00
|
|
|
{{- /*
|
2023-04-04 11:33:11 +02:00
|
|
|
// GoToSocial
|
|
|
|
|
// Copyright (C) GoToSocial Authors admin@gotosocial.org
|
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
|
|
|
|
//
|
|
|
|
|
// This program is free software: you can redistribute it and/or modify
|
|
|
|
|
// it under the terms of the GNU Affero General Public License as published by
|
|
|
|
|
// the Free Software Foundation, either version 3 of the License, or
|
|
|
|
|
// (at your option) any later version.
|
|
|
|
|
//
|
|
|
|
|
// This program is distributed in the hope that it will be useful,
|
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
// GNU Affero General Public License for more details.
|
|
|
|
|
//
|
|
|
|
|
// You should have received a copy of the GNU Affero General Public License
|
|
|
|
|
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
2023-02-20 16:29:29 +01:00
|
|
|
*/ -}}
|
|
|
|
|
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- define "description" -}}
|
|
|
|
|
{{- if .instance.Description }}
|
|
|
|
|
{{ .instance.Description | noescape }}
|
|
|
|
|
{{- else }}
|
2024-01-05 13:39:31 +01:00
|
|
|
<p>No description has yet been set for this instance.</p>
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
|
|
{{- define "termsAndConditions" -}}
|
|
|
|
|
{{- if .instance.Terms }}
|
|
|
|
|
{{ .instance.Terms | noescape }}
|
|
|
|
|
{{- else }}
|
|
|
|
|
<p>No terms and conditions have yet been set for this instance.</p>
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end }}
|
|
|
|
|
{{- end -}}
|
2023-02-20 16:29:29 +01:00
|
|
|
|
2024-02-23 16:08:32 +01:00
|
|
|
{{- define "languages" -}}
|
|
|
|
|
{{- if .languages }}
|
|
|
|
|
<p>This instance prefers the following languages:</p>
|
|
|
|
|
<ol>
|
|
|
|
|
{{- range .languages }}
|
|
|
|
|
<li>{{- . -}}</li>
|
|
|
|
|
{{- end }}
|
|
|
|
|
</ol>
|
|
|
|
|
{{- else }}
|
|
|
|
|
<p>No preferred languages have yet been set for this instance.</p>
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
|
|
|
|
{{- define "rules" -}}
|
|
|
|
|
{{- if .instance.Rules }}
|
|
|
|
|
<p>This instance has the following rules:</p>
|
|
|
|
|
<ol>
|
|
|
|
|
{{- range .instance.Rules }}
|
|
|
|
|
<li>{{- .Text -}}</li>
|
|
|
|
|
{{- end }}
|
|
|
|
|
</ol>
|
|
|
|
|
{{- else }}
|
|
|
|
|
<p>No rules have yet been set for this instance.</p>
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- define "customCSSLimits" -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
<a href="https://docs.gotosocial.org/en/latest/user_guide/settings/#custom-css" target="_blank" rel="noopener noreferrer">Custom CSS</a> is
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- if .instance.Configuration.Accounts.AllowCustomCSS -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
<b>enabled</b>
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- else -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
</b>disabled</b>
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
on account profiles.
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end -}}
|
2023-02-20 16:29:29 +01:00
|
|
|
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- define "statusLimits" -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
Statuses can contain up to
|
|
|
|
|
<b>{{- .instance.Configuration.Statuses.MaxCharacters }} characters</b>, and
|
|
|
|
|
<b>{{- .instance.Configuration.Statuses.MaxMediaAttachments }} media attachments</b>.
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end -}}
|
2023-08-19 14:33:15 +02:00
|
|
|
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- define "pollLimits" -}}
|
2024-04-11 11:45:53 +02:00
|
|
|
Polls can have up to
|
|
|
|
|
<b>{{- .instance.Configuration.Polls.MaxOptions }} options</b>, with
|
|
|
|
|
<b>{{- .instance.Configuration.Polls.MaxCharactersPerOption }} characters per option</b>.
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end -}}
|
2023-08-19 14:33:15 +02:00
|
|
|
|
[feature] Configurable max profile fields (#4175)
# Description
> If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements.
>
> If this is a documentation change, please briefly describe what you've changed and why.
Profile fields, right? So I made them a configurable amount and show them on the instance features. Closes #1876
All changes I did are described in the commits. I tried to cover as much as possible, but I don't know this codebase to know what I've missed. I have tested it manually and it works (settings page, `/api/v1/instances`, server-side validation).
Not done:
- An "Add profile fields" button, so that instances with a high profile fields count (e.g. 100) aren't an issue when trying to skip the profile fields (in some form, accessibility)
- Updating the swagger docs that specify a specific amount of profile fields for the updating endpoint (not sure how to proceed with that)
- Unchecked checklist items
## Checklist
Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]`
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
- [X] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [X] I/we have not leveraged AI to create the proposed changes.
- [x] I/we have performed a self-review of added code.
- [X] I/we have written code that is legible and maintainable by others.
- [ ] I/we have commented the added code, particularly in hard-to-understand areas.
- [X] I/we have made any necessary changes to documentation.
- [ ] I/we have added tests that cover new code.
- [X] I/we have run tests and they pass locally with the changes.
- [x] I/we have run `go fmt ./...` and `golangci-lint run`.
Notes about checklist:
- ["Approval" to work on this reference](https://matrix.to/#/!mlPctfMHjyopbOnliM:superseriousbusiness.org/$P0Z1Qmny6GNIgxhre69gll8KSD690HC8nVvNpXmu3nU?via=superseriousbusiness.org&via=matrix.org&via=tchncs.de)
- `golangci-lint run` output ignored due to complaining about ffmpeg and some other code I didn't touch
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4175
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: Jackson <jackson@jacksonchen666.com>
Co-committed-by: Jackson <jackson@jacksonchen666.com>
2025-05-14 13:25:21 +00:00
|
|
|
{{- define "profileLimits" -}}
|
|
|
|
|
Profiles can have up to
|
|
|
|
|
<b>{{- .instance.Configuration.Accounts.MaxProfileFields }} profile fields</b>.
|
|
|
|
|
{{- end -}}
|
|
|
|
|
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- with . }}
|
|
|
|
|
<main class="about">
|
2024-01-05 13:39:31 +01:00
|
|
|
<nav class="about-section" aria-labelledby="toc">
|
|
|
|
|
<h3 id="toc">Table of Contents</h3>
|
|
|
|
|
<div class="about-section-contents">
|
|
|
|
|
<ol>
|
|
|
|
|
<li><a href="#about">About {{ .instance.Title -}}</a></li>
|
|
|
|
|
<li><a href="#contact">Contact</a></li>
|
|
|
|
|
<li><a href="#features">Features</a></li>
|
|
|
|
|
<li><a href="#languages">Languages</a></li>
|
2024-10-09 11:46:43 +02:00
|
|
|
<li><a href="#signup">Register an Account on {{ .instance.Title -}}</a></li>
|
2024-01-05 13:39:31 +01:00
|
|
|
<li><a href="#rules">Rules</a></li>
|
|
|
|
|
<li><a href="#terms">Terms and Conditions</a></li>
|
2025-09-15 17:31:06 +02:00
|
|
|
<li><a href="#domain-permissions">Domain Permissions</a></li>
|
2024-01-05 13:39:31 +01:00
|
|
|
</ol>
|
|
|
|
|
</div>
|
|
|
|
|
</nav>
|
2023-12-27 11:23:52 +01:00
|
|
|
<section class="about-section" role="region" aria-labelledby="about">
|
|
|
|
|
<h3 id="about">About {{ .instance.Title -}}</h3>
|
2024-01-05 13:39:31 +01:00
|
|
|
<div class="about-section-contents">
|
|
|
|
|
{{- with . }}
|
|
|
|
|
{{- include "description" . | indent 3 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
|
|
|
|
<section class="about-section" role="region" aria-labelledby="contact">
|
|
|
|
|
<h3 id="contact">Admin Contact</h3>
|
2024-01-05 13:39:31 +01:00
|
|
|
<div class="about-section-contents">
|
|
|
|
|
{{- if .instance.ContactAccount }}
|
|
|
|
|
<a href="{{- .instance.ContactAccount.URL -}}" class="account-card">
|
|
|
|
|
<img class="avatar" src="{{- .instance.ContactAccount.Avatar -}}" alt=""/>
|
|
|
|
|
<h3>
|
|
|
|
|
{{- if .instance.ContactAccount.DisplayName -}}
|
|
|
|
|
{{- emojify .instance.ContactAccount.Emojis (escape .instance.ContactAccount.DisplayName) -}}
|
|
|
|
|
{{- else -}}
|
|
|
|
|
{{- .instance.ContactAccount.Username -}}
|
|
|
|
|
{{- end -}}
|
|
|
|
|
</h3>
|
|
|
|
|
<span>@{{- .instance.ContactAccount.Username -}}</span>
|
|
|
|
|
</a>
|
|
|
|
|
{{- else }}
|
|
|
|
|
<p>This instance has not yet set a contact account.</p>
|
|
|
|
|
{{- end }}
|
|
|
|
|
{{- if .instance.Email }}
|
|
|
|
|
<p>Email: <a href="mailto:{{- .instance.Email -}}">{{- .instance.Email -}}</a></p>
|
|
|
|
|
{{- else }}
|
|
|
|
|
<p>This instance has not yet set a contact email address.</p>
|
|
|
|
|
{{- end }}
|
|
|
|
|
</div>
|
|
|
|
|
</section>
|
|
|
|
|
<section class="about-section" role="region" aria-labelledby="features">
|
|
|
|
|
<h3 id="features">Instance Features</h3>
|
|
|
|
|
<div class="about-section-contents">
|
|
|
|
|
<ul>
|
|
|
|
|
<li>{{- template "statusLimits" . -}}</li>
|
|
|
|
|
<li>{{- template "pollLimits" . -}}</li>
|
[feature] Configurable max profile fields (#4175)
# Description
> If this is a code change, please include a summary of what you've coded, and link to the issue(s) it closes/implements.
>
> If this is a documentation change, please briefly describe what you've changed and why.
Profile fields, right? So I made them a configurable amount and show them on the instance features. Closes #1876
All changes I did are described in the commits. I tried to cover as much as possible, but I don't know this codebase to know what I've missed. I have tested it manually and it works (settings page, `/api/v1/instances`, server-side validation).
Not done:
- An "Add profile fields" button, so that instances with a high profile fields count (e.g. 100) aren't an issue when trying to skip the profile fields (in some form, accessibility)
- Updating the swagger docs that specify a specific amount of profile fields for the updating endpoint (not sure how to proceed with that)
- Unchecked checklist items
## Checklist
Please put an x inside each checkbox to indicate that you've read and followed it: `[ ]` -> `[x]`
If this is a documentation change, only the first checkbox must be filled (you can delete the others if you want).
- [X] I/we have read the [GoToSocial contribution guidelines](https://codeberg.org/superseriousbusiness/gotosocial/src/branch/main/CONTRIBUTING.md).
- [x] I/we have discussed the proposed changes already, either in an issue on the repository, or in the Matrix chat.
- [X] I/we have not leveraged AI to create the proposed changes.
- [x] I/we have performed a self-review of added code.
- [X] I/we have written code that is legible and maintainable by others.
- [ ] I/we have commented the added code, particularly in hard-to-understand areas.
- [X] I/we have made any necessary changes to documentation.
- [ ] I/we have added tests that cover new code.
- [X] I/we have run tests and they pass locally with the changes.
- [x] I/we have run `go fmt ./...` and `golangci-lint run`.
Notes about checklist:
- ["Approval" to work on this reference](https://matrix.to/#/!mlPctfMHjyopbOnliM:superseriousbusiness.org/$P0Z1Qmny6GNIgxhre69gll8KSD690HC8nVvNpXmu3nU?via=superseriousbusiness.org&via=matrix.org&via=tchncs.de)
- `golangci-lint run` output ignored due to complaining about ffmpeg and some other code I didn't touch
Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4175
Reviewed-by: kim <gruf@noreply.codeberg.org>
Co-authored-by: Jackson <jackson@jacksonchen666.com>
Co-committed-by: Jackson <jackson@jacksonchen666.com>
2025-05-14 13:25:21 +00:00
|
|
|
<li>{{- template "profileLimits" . -}}</li>
|
2024-04-11 11:45:53 +02:00
|
|
|
<li>{{- template "customCSSLimits" . -}}</li>
|
2024-01-05 13:39:31 +01:00
|
|
|
</ul>
|
|
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
|
|
|
|
<section class="about-section" role="region" aria-labelledby="languages">
|
|
|
|
|
<h3 id="languages">Languages</h3>
|
2024-01-05 13:39:31 +01:00
|
|
|
<div class="about-section-contents">
|
2024-02-23 16:08:32 +01:00
|
|
|
{{- with . }}
|
|
|
|
|
{{- include "languages" . | indent 3 }}
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end }}
|
2024-01-05 13:39:31 +01:00
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
2024-04-11 11:45:53 +02:00
|
|
|
{{- include "index_register.tmpl" . | indent 1 }}
|
2023-12-27 11:23:52 +01:00
|
|
|
<section class="about-section" role="region" aria-labelledby="rules">
|
|
|
|
|
<h3 id="rules">Instance Rules</h3>
|
2024-01-05 13:39:31 +01:00
|
|
|
<div class="about-section-contents">
|
2024-02-23 16:08:32 +01:00
|
|
|
{{- with . }}
|
|
|
|
|
{{- include "rules" . | indent 3 }}
|
2023-12-27 11:23:52 +01:00
|
|
|
{{- end }}
|
2024-01-05 13:39:31 +01:00
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
2024-01-05 13:39:31 +01:00
|
|
|
<section class="about-section" role="region" aria-labelledby="terms">
|
|
|
|
|
<h3 id="terms">Terms and Conditions</h3>
|
|
|
|
|
<div class="about-section-contents">
|
|
|
|
|
{{- with . }}
|
|
|
|
|
{{- include "termsAndConditions" . | indent 3 }}
|
|
|
|
|
{{- end }}
|
|
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
2025-05-20 11:47:40 +02:00
|
|
|
<section class="about-section" role="region" aria-labelledby="domain-permissions">
|
2025-09-15 17:31:06 +02:00
|
|
|
<h3 id="domain-permissions">Domain Permissions</h3>
|
2024-01-05 13:39:31 +01:00
|
|
|
<div class="about-section-contents">
|
|
|
|
|
<p>
|
|
|
|
|
ActivityPub instances federate with other instances by exchanging data with them over the network.
|
|
|
|
|
Exchanged data includes things like accounts, statuses, likes, boosts, and media attachments.
|
2025-05-20 11:47:40 +02:00
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
This exchange of data is open by default but can be <strong>blocked</strong> for instances
|
|
|
|
|
on specific domains via a domain block created by an instance admin.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
Alternatively, if this instance is running in allowlist mode, exchange of data with remote
|
|
|
|
|
instances must be explicitly <strong>allowed</strong> via a domain allow entry.
|
|
|
|
|
</p>
|
|
|
|
|
<p>
|
|
|
|
|
For more information on domain blocks, domain allows, etc, see the following pages (all links open in a new tab):
|
2024-01-05 13:39:31 +01:00
|
|
|
</p>
|
|
|
|
|
<ul>
|
2025-05-20 11:47:40 +02:00
|
|
|
<li><a href="https://docs.gotosocial.org/en/latest/admin/federation_modes/" target="_blank" rel="noreferrer">Federation modes</a></li>
|
|
|
|
|
<li><a href="https://docs.gotosocial.org/en/latest/admin/domain_blocks/" target="_blank" rel="noreferrer">Domain blocks</a></li>
|
|
|
|
|
<li><a href="https://docs.gotosocial.org/en/latest/admin/domain_permission_subscriptions/" target="_blank" rel="noreferrer">Domain permission subscriptions</a></li>
|
|
|
|
|
</ul>
|
|
|
|
|
<h4>Blocked domains</h4>
|
|
|
|
|
<p>When a domain block entry is created on this instance:</p>
|
|
|
|
|
<ul>
|
|
|
|
|
<li>No new data from instances on the blocked domain will be created on this instance.</li>
|
|
|
|
|
<li>Interaction between this instance and blocked instances is cut off in both directions.</li>
|
|
|
|
|
<li>(In case of an exact match): Any existing data from blocked instances are deleted from the storage of this instance.</li>
|
2024-01-05 13:39:31 +01:00
|
|
|
</ul>
|
|
|
|
|
<p>
|
|
|
|
|
{{- if .blocklistExposed }}
|
2025-05-20 11:47:40 +02:00
|
|
|
<a href="/about/domain_blocks">View the list of domains blocked by this instance</a>
|
|
|
|
|
{{- else }}
|
2025-09-15 17:31:06 +02:00
|
|
|
This instance does not publicly share its list of blocked domains.
|
2025-05-20 11:47:40 +02:00
|
|
|
{{- end }}
|
|
|
|
|
</p>
|
|
|
|
|
<h4>Allowed domains</h4>
|
|
|
|
|
<p>When an admin adds an explicit domain allow entry, instances on the domain and its subdomains are allowed to federate with this instance.</p>
|
|
|
|
|
<p>
|
|
|
|
|
{{- if .allowlistExposed }}
|
|
|
|
|
<a href="/about/domain_allows">View the list of domains explicitly allowed by this instance</a>
|
2024-01-05 13:39:31 +01:00
|
|
|
{{- else }}
|
2025-09-15 17:31:06 +02:00
|
|
|
This instance does not publicly share its list of explicitly allowed domains.
|
2024-01-05 13:39:31 +01:00
|
|
|
{{- end }}
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2023-12-27 11:23:52 +01:00
|
|
|
</section>
|
2023-02-20 16:29:29 +01:00
|
|
|
</main>
|
2024-10-31 00:26:26 +01:00
|
|
|
{{- end }}
|