mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-12-02 05:17:33 +00:00
feat: Add a page with some information about the server
This commit is contained in:
14 files changed
+293
-133
No files matched your search
@@ -1,32 +1,36 @@
|
||||
<div class="card">
|
||||
{{ avatar }}
|
||||
<div class="info">
|
||||
<p class="name">
|
||||
{% if let Some(display_name) = display_name %}
|
||||
{{ display_name }}
|
||||
{% else %}
|
||||
Unknown device
|
||||
{% endif %}
|
||||
<div class="name">
|
||||
<span>
|
||||
{% if let Some(display_name) = display_name %}
|
||||
{{ display_name }}
|
||||
{% else %}
|
||||
Unknown device
|
||||
{% endif %}
|
||||
</span>
|
||||
{% if style == DeviceCardStyle::Detailed %}
|
||||
<span class="id">
|
||||
• {{ device_id }}
|
||||
{% if let Some(metadata) = oauth_metadata %}
|
||||
• <a href="{{ metadata.client_uri }}">Client website</a>
|
||||
{% else %}
|
||||
(legacy)
|
||||
{% endif %}
|
||||
<ul class="id bullet-separated">
|
||||
<li>{{ device_id }}</li>
|
||||
<li>
|
||||
{% if let Some(metadata) = oauth_metadata %}
|
||||
<a href="{{ metadata.client_uri }}">Client website</a>
|
||||
{% else %}
|
||||
(legacy)
|
||||
{% endif %}
|
||||
</li>
|
||||
</span>
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div>
|
||||
Last active: {{ last_active }}
|
||||
</p>
|
||||
<p>
|
||||
</div>
|
||||
<div>
|
||||
{% if style == DeviceCardStyle::Detailed %}
|
||||
<a href="{{ crate::ROUTE_PREFIX }}/account/device/{{ device_id }}/remove">Remove</a>
|
||||
{% else %}
|
||||
<a href="{{ crate::ROUTE_PREFIX }}/account/device/{{ device_id }}/">Details</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -19,16 +19,8 @@
|
||||
{%~ block content %}{% endblock ~%}
|
||||
{%~ block footer ~%}
|
||||
<footer>
|
||||
<img class="logo" src="{{ crate::ROUTE_PREFIX }}/resources/logo.svg">
|
||||
<p>Powered by <a href="https://continuwuity.org">Continuwuity</a> {{ env!("CARGO_PKG_VERSION") }}
|
||||
{%~ if let Some(version_info) = conduwuit_build_metadata::version_tag() ~%}
|
||||
{%~ if let Some(url) = conduwuit_build_metadata::GIT_REMOTE_COMMIT_URL.or(conduwuit_build_metadata::GIT_REMOTE_WEB_URL) ~%}
|
||||
(<a href="{{ url }}">{{ version_info }}</a>)
|
||||
{%~ else ~%}
|
||||
({{ version_info }})
|
||||
{%~ endif ~%}
|
||||
{%~ endif ~%}
|
||||
</p>
|
||||
<a href="{{ crate::ROUTE_PREFIX }}/"><img class="logo" src="{{ crate::ROUTE_PREFIX }}/resources/logo.svg"></a>
|
||||
<p>Powered by <a href="https://continuwuity.org">Continuwuity</a> {{ env!("CARGO_PKG_VERSION") }} • <a href="{{ crate::ROUTE_PREFIX }}/about">About</a></p>
|
||||
</footer>
|
||||
{%~ endblock ~%}
|
||||
</body>
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
{% extends "_layout.html.j2" %}
|
||||
|
||||
{%- block title -%}
|
||||
About server
|
||||
{%- endblock -%}
|
||||
|
||||
{%- block content -%}
|
||||
<div class="panel">
|
||||
<h1>About {{ server_name }}</h1>
|
||||
{% if let Some(support_page) = support_page %}
|
||||
<p>
|
||||
Support: <a href="{{ support_page }} target="_blank">{{ support_page }}</a>
|
||||
</p>
|
||||
{% endif %}
|
||||
{% if !contacts.is_empty() %}
|
||||
<p>
|
||||
Contact the operators of this server:
|
||||
</p>
|
||||
<ul>
|
||||
{% for contact in contacts %}
|
||||
<li>
|
||||
{%- match contact.role -%}
|
||||
{%- when ContactRole::Admin -%}
|
||||
Administrator
|
||||
{%- when ContactRole::Security -%}
|
||||
Security
|
||||
{%- when ContactRole::Moderator -%}
|
||||
Moderator
|
||||
{%- when _ -%}
|
||||
Contact
|
||||
{%- endmatch -%}
|
||||
: <ul class="bullet-separated">
|
||||
{%- if let Some(matrix_id) = contact.matrix_id -%}
|
||||
<li><a href="matrix:u/{{ matrix_id.localpart() }}:{{ matrix_id.server_name() }}?action=chat" target="_blank">{{ matrix_id }}</a></li>
|
||||
{%- endif -%}
|
||||
{%- if let Some(email_address) = contact.email_address -%}
|
||||
<li><a href="mailto:{{ email_address }}" target="_blank">{{ email_address }}</a>
|
||||
{%- if let Some(pgp_key) = contact.pgp_key -%}
|
||||
(<a href="{{ pgp_key }}" target="_blank">PGP</a>)
|
||||
{%- endif -%}
|
||||
</li>
|
||||
{%- endif -%}
|
||||
</ul>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% if !terms.is_empty() %}
|
||||
<p>
|
||||
By using {{ server_name }} you agree to the following policies:
|
||||
</p>
|
||||
<ul>
|
||||
{% for (id, document) in terms %}
|
||||
<li>
|
||||
<a target="_blank" href="{{ document.url }}">{{ document.name }}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
<p>
|
||||
Server version {{ env!("CARGO_PKG_VERSION") }}
|
||||
{%~ if let Some(version_info) = conduwuit_build_metadata::version_tag() ~%}
|
||||
{%~ if let Some(url) = conduwuit_build_metadata::GIT_REMOTE_COMMIT_URL.or(conduwuit_build_metadata::GIT_REMOTE_WEB_URL) ~%}
|
||||
(<a href="{{ url }}">{{ version_info }}</a>)
|
||||
{%~ else ~%}
|
||||
({{ version_info }})
|
||||
{%~ endif ~%}
|
||||
{%~ endif ~%}
|
||||
</p>
|
||||
<hr>
|
||||
<p>
|
||||
{{ server_name }} is powered by <a class="project-name" href="https://continuwuity.org">Continuwuity</a>,
|
||||
a high-performance and community-driven <a href="https://matrix.org">Matrix</a> homeserver
|
||||
maintained as an open source project by volunteers from around the world.
|
||||
</p>
|
||||
<p>
|
||||
<ul class="bullet-separated">
|
||||
<li><a href="https://forgejo.ellis.link/continuwuation/continuwuity">Source code</a></li>
|
||||
<li><a href="https://matrix.to/#/#continuwuity:continuwuity.org">Official Matrix chatroom</a></li>
|
||||
<li><span class="project-name">❤</span> <a href="https://opencollective.com/continuwuity">Support the project</a></li>
|
||||
</ul>
|
||||
</p>
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -58,8 +58,10 @@ Your account
|
||||
<p>
|
||||
Settings here <em class="negative">may affect the integrity of your account</em>.
|
||||
</p>
|
||||
<a href="cross_signing_reset">Reset your digital identity</a> •
|
||||
<a href="deactivate">Deactivate your account</a>
|
||||
<ul class="bullet-separated">
|
||||
<li><a href="cross_signing_reset">Reset your digital identity</a></li>
|
||||
<li><a href="deactivate">Deactivate your account</a></li>
|
||||
</ul>
|
||||
</details>
|
||||
</section>
|
||||
{% when AccountBody::Locked %}
|
||||
|
||||
@@ -9,16 +9,18 @@ Device information
|
||||
<h1>About device <a class="back" href="{{ crate::ROUTE_PREFIX }}/account/">Back</a></h1>
|
||||
{{ device_card }}
|
||||
{% if let Some((client_metadata, _)) = client_metadata %}
|
||||
<section>
|
||||
<p>
|
||||
{% if let Some(tos_uri) = &client_metadata.tos_uri %}
|
||||
<a href="{{ tos_uri }}">Terms of service</a>
|
||||
{% endif %}
|
||||
{% if let Some(policy_uri) = &client_metadata.policy_uri %}
|
||||
• <a href="{{ policy_uri }}">Policies</a>
|
||||
{% endif %}
|
||||
</p>
|
||||
</section>
|
||||
{% if client_metadata.tos_uri.is_some() || client_metadata.policy_uri.is_some() %}
|
||||
<section>
|
||||
<ul class="bullet-separated">
|
||||
{% if let Some(tos_uri) = &client_metadata.tos_uri %}
|
||||
<li><a href="{{ tos_uri }}">Terms of service</a></li>
|
||||
{% endif %}
|
||||
{% if let Some(policy_uri) = &client_metadata.policy_uri %}
|
||||
<li><a href="{{ policy_uri }}">Policies</a></li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<section>
|
||||
<p>
|
||||
|
||||
Reference in new issue
Block a user