ArchiveBox/archivebox/templates/core/navigation.html
Nick Sweeting d044f5ee0e
Isolate OpenCode in its plugin and stop forced Git initialization (#1869)
* Stop initializing Git repositories for OpenCode sessions

* Isolate optional AI failures behind a lazy plugin adapter

* Keep explicit plugin enable flags boolean after config resolution

* Use Django login redirect encoding at the optional agent boundary

* Cover cold-start failures and real browser storage isolation

* Verify persisted dismissal and native storage denial variants

* Keep headless browser interaction independent of display timing

* Install optional OpenCode clients through the plugin extra
2026-09-03 16:05:30 -07:00

51 lines
3.0 KiB
HTML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% load i18n static core_tags %}
<div id="user-tools">
<a href="{% url 'add' %}" class="navbar-item navbar-add-link">Add </a>
<span class="navbar-separator navbar-separator-wide" aria-hidden="true"></span>
<a href="/admin/crawls/crawl/" class="navbar-item navbar-crawls">Crawls</a>
<span class="navbar-separator" aria-hidden="true">|</span>
<a href="{% url 'Home' %}" class="navbar-item navbar-snapshots">Snapshots</a>
<span class="navbar-separator" aria-hidden="true">|</span>
<a href="/admin/core/archiveresult/?o=-1" class="navbar-item navbar-log">Log</a>
<span class="navbar-separator" aria-hidden="true">|</span>
<a href="/admin/core/tag/" class="navbar-item navbar-tags">Tags</a>
<span class="navbar-separator navbar-separator-wide" aria-hidden="true"></span>
{% plugin_ui "opencode" "navigation" %}
<a href="{% url 'Docs' %}" class="navbar-item navbar-docs" target="_blank" rel="noopener noreferrer">Docs</a>
<span class="navbar-separator" aria-hidden="true">|</span>
<a href="/api/v1/docs" class="navbar-item navbar-api">API</a>
<span class="navbar-separator" aria-hidden="true">|</span>
<a href="/admin/" class="navbar-item navbar-admin">Admin</a>
<span class="navbar-separator navbar-separator-wide" aria-hidden="true"></span>
{% if user.is_authenticated %}
{% block welcome-msg %}
<span class="navbar-item navbar-user">
<span class="navbar-user-label">{% trans 'User' %}</span>
<strong class="navbar-username" title="{% firstof user.get_short_name user.get_username %}">{% firstof user.get_short_name user.get_username %}</strong>
</span>
<span class="navbar-separator navbar-separator-wide" aria-hidden="true"></span>
{% endblock %}
{% block userlinks %}
{% if user.has_usable_password %}
<a href="{% url 'admin:password_change' %}" class="navbar-item navbar-account" title="Change your account password">Account</a>
<span class="navbar-separator navbar-account-separator" aria-hidden="true">/</span>
{% endif %}
<form method="post" action="{% url 'admin:logout' %}" class="navbar-logout-form">
{% csrf_token %}
<button type="submit" class="navbar-item navbar-logout">{% trans 'Log out' %}</button>
</form>
{% endblock %}
{% elif request.COOKIES.archivebox_admin_logged_in == "1" %}
{% comment %}
Authenticated on the admin host but the session cookie is admin-host-
scoped (security boundary — web.* must NEVER see the session).
The hint cookie is the only signal that crosses, so link back to the
admin host where the session and CSRF cookie are available.
{% endcomment %}
<a href="/admin/" class="navbar-item navbar-account">Account</a>
{% else %}
<a href="{% url 'admin:login' %}" class="navbar-item navbar-login">{% trans 'Log in' %}</a>
{% endif %}
</div>