Files
nextcloud/php/templates/layout.twig
T
Pablo Zmdl 93cf3d3931 Two factor authentication for both login variants
This adds optional two factor authentication based on shared
TOTP-secrets to both login variants (password and AIO token
authentication).

The 2FA can be enabled as soon as the containers are running in a
section below the backup configuration. As long as it is not enabled,
the AIO UI shows a warning at the top, and inside the Nextcloud a
notification is shown to all Nextcloud admins, strongly recommending to
enable it. The Nextcloud admin notification is sent via the
mastercontainer's `cron.sh`, thus will be renewed whenever it is
dismissed.

In order to show the notices, this PR includes a notification system for
the AIO UI, providing two variants: notices, and warnings. Notices have
a green background and border and vanish after 5 seconds. Warnings have
a orange-leaning yellow background and border and don't vanish (and
can't be dismissed manually, neither).

Another visual improvement is highlighted section headlines: If the URL
hash matches an `h2` element's ID, the `h2` is highlighted and if the
`h2` is followed by a `detail` element, that `detail` is opened. If
effect, browsing to `#two-factor-auth` jumps to the section, which is
highlighted and opened already (as shown in the second screenshot
below).

Signed-off-by: Pablo Zmdl <pablo@nextcloud.com>
AI-assistant: Claude Opus 4.8
2026-08-20 16:33:29 +02:00

27 lines
942 B
Twig

<!DOCTYPE html>
<html lang="en">
<head>
<title>AIO</title>
<link rel="stylesheet" href="style.css?v14" media="all" />
<link rel="icon" href="img/favicon.png">
<script type="text/javascript" src="forms.js?v2"></script>
<script type="text/javascript" src="toggle-dark-mode.js?v2"></script>
<script type="text/javascript" src="click-handlers.js?v2"></script>
<script type="text/javascript" src="notifications.js?v1"></script>
<script type="text/javascript" src="expand-anchored-details.js?v1"></script>
</head>
<body>
<div class="wrapper">
{% block body %}{% endblock %}
</div>
<div id="overlay">
<div class="loader"></div>
<iframe name="overlay-log" id="overlay-log"></iframe>
</div>
<button id="theme-toggle">
<span id="theme-icon"></span>
</button>
</body>
</html>