mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add server-wide and user-only federation controls (#133)
### Description Completes #122 ### Please confirm - [x] I am the legal owner or represent the legal owner of all work submitted (including LLM-generated code, if any) - [x] I consent to my changes being added to this FOSS project - [x] I have confirmed that this does not add new errors or warnings with `utils/clippy.sh` - [ ] This PR used LLMs to generate some or all of the code changes Reviewed-on: https://git.ngram.ca/OpenJam/rc-servers/pulls/133
This commit is contained in:
90
assets/templates/rc_society/user_federation.html.hbs
Normal file
90
assets/templates/rc_society/user_federation.html.hbs
Normal file
@@ -0,0 +1,90 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<!-- Primary Meta Tags -->
|
||||
<title>Garages - Openjam</title>
|
||||
<meta name="title" content="Federation - Openjam" />
|
||||
<meta name="description" content="User federation controls for third-party Robocraft servers" />
|
||||
|
||||
<!-- Open Graph / Facebook -->
|
||||
<meta property="og:type" content="website" />
|
||||
<meta property="og:url" content="https://git.ngram.ca/OpenJam/rc-servers" />
|
||||
<meta property="og:title" content="Federation - Openjam" />
|
||||
<meta property="og:description" content="View your federation settings for third-party Robocraft servers" />
|
||||
<meta property="og:image" content="https://git.ngram.ca/OpenJam/rc-servers/raw/branch/main/assets/robocraft/favicon.jpg" />
|
||||
|
||||
<!-- Twitter -->
|
||||
<meta property="twitter:card" content="summary" />
|
||||
<meta property="twitter:url" content="https://git.ngram.ca/OpenJam/rc-servers" />
|
||||
<meta property="twitter:title" content="Federation - Openjam" />
|
||||
<meta property="twitter:description" content="View your federation settings for third-party Robocraft servers" />
|
||||
<meta property="twitter:image" content="https://git.ngram.ca/OpenJam/rc-servers/raw/branch/main/assets/robocraft/favicon.jpg" />
|
||||
|
||||
|
||||
<link rel="icon" type="image/x-icon" href="/favicon.ico">
|
||||
{{> stylesheet}}
|
||||
</head>
|
||||
<body>
|
||||
<div class="form-stripe">
|
||||
<div class="form-header-right">
|
||||
Welcome {{form.display_name}}! |
|
||||
<a href="/">Home</a>
|
||||
</div>
|
||||
<h1 class="form-banner">{{form.display_name}} Federation Settings</h1>
|
||||
{{#if error}}
|
||||
<div class="form-error">
|
||||
<p class="form-error-message">{{error}}</p>
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="access-grid">
|
||||
<div class="access-box">
|
||||
{{#if form.enabled}}
|
||||
<h4 class="access-box-title">Disable Federation</h4>
|
||||
<form class="inline-form box-details" method="post" action="./off">
|
||||
<div class="box-details-value">Turn Off</div>
|
||||
<div class="box-details-key box-details-input"><input class="form-submit-button" type="submit" value="Confirm" /></div>
|
||||
</form>
|
||||
{{else}}
|
||||
<h4 class="access-box-title">Enable Federation</h4>
|
||||
<form class="inline-form box-details" method="post" action="./on">
|
||||
<div class="box-details-value">Turn On</div>
|
||||
<div class="box-details-key box-details-input"><input class="form-submit-button" type="submit" value="Confirm" /></div>
|
||||
</form>
|
||||
{{/if}}
|
||||
</div>
|
||||
<div class="access-box">
|
||||
<h4 class="access-box-title">Defederated Domains</h4>
|
||||
<div class="box-details">
|
||||
{{#each form.defederated}}
|
||||
<form class="inline-form" method="post" action="./list/remove/{{this}}">
|
||||
<div class="box-details-key">{{this}}</div>
|
||||
<div class="box-details-input box-details-value">
|
||||
<input type="submit" value="Remove" />
|
||||
</div>
|
||||
</form>
|
||||
{{else}}
|
||||
<div class="box-details-key">No Domains</div>
|
||||
<div class="box-details-value">To Remove</div>
|
||||
{{/each}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="access-box">
|
||||
<h4 class="access-box-title">Defederated A Domain</h4>
|
||||
<form class="inline-form box-details" method="post" action="./list/add">
|
||||
<div class="box-details-value box-details-input box-details-input-text"><input class="form-input-box" placeholder="example.com" type="text" id="domain" name="domain" required /></div>
|
||||
<div class="box-details-key box-details-input"><input class="form-submit-button" type="submit" value="Add" /></div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
<div class="footer">
|
||||
{{version}}
|
||||
| <a href="{{source_url}}#readme">About</a>
|
||||
| <a href="https://liberapay.com/NGram">Support Me</a>
|
||||
</div>
|
||||
</footer>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user