mirror of
https://gitlab.com/allianceauth/allianceauth.git
synced 2026-02-05 14:46:20 +01:00
Compare commits
45 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
0ff4374efa | ||
|
|
18d0e58a48 | ||
|
|
84f44338dc | ||
|
|
2ba0412890 | ||
|
|
2326522b29 | ||
|
|
a7cb6ee434 | ||
|
|
2aeef63565 | ||
|
|
3c9e7335ef | ||
|
|
49067de325 | ||
|
|
471e7e29ae | ||
|
|
3ec5775406 | ||
|
|
e804d2b60d | ||
|
|
742438a95d | ||
|
|
5c60086baa | ||
|
|
e49041bb14 | ||
|
|
f3cbe91883 | ||
|
|
ea439a2176 | ||
|
|
56e1e76f11 | ||
|
|
5605eb129d | ||
|
|
87ef0f21a3 | ||
|
|
a1c7ce827e | ||
|
|
97466bcdfb | ||
|
|
ff3096b106 | ||
|
|
98f0d77f3f | ||
|
|
92548ba402 | ||
|
|
c46741d311 | ||
|
|
7c7c1abf7c | ||
|
|
fc303b1b0a | ||
|
|
4e220a9679 | ||
|
|
b17b1f7504 | ||
|
|
7081fc0e76 | ||
|
|
68e4574f19 | ||
|
|
e6e0a70012 | ||
|
|
13e38da942 | ||
|
|
468c1de26b | ||
|
|
22ef5ac0e5 | ||
|
|
ef2dc08958 | ||
|
|
6b84ffa16c | ||
|
|
d7a1096413 | ||
|
|
93b94a8bc2 | ||
|
|
9a95716105 | ||
|
|
dbfcf5d87a | ||
|
|
105d7d53b3 | ||
|
|
01cefe1457 | ||
|
|
7fe3db8017 |
@@ -4,8 +4,21 @@
|
|||||||
# pre-commit autoupdate
|
# pre-commit autoupdate
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
|
# Code Upgrades
|
||||||
|
- repo: https://github.com/asottile/pyupgrade
|
||||||
|
rev: v3.15.2
|
||||||
|
hooks:
|
||||||
|
- id: pyupgrade
|
||||||
|
args: [--py38-plus]
|
||||||
|
- repo: https://github.com/adamchainz/django-upgrade
|
||||||
|
rev: 1.17.0
|
||||||
|
hooks:
|
||||||
|
- id: django-upgrade
|
||||||
|
args: [--target-version=4.2]
|
||||||
|
|
||||||
|
# Formatting
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.4.0
|
rev: v4.6.0
|
||||||
hooks:
|
hooks:
|
||||||
# Identify invalid files
|
# Identify invalid files
|
||||||
- id: check-ast
|
- id: check-ast
|
||||||
@@ -13,27 +26,24 @@ repos:
|
|||||||
- id: check-json
|
- id: check-json
|
||||||
- id: check-toml
|
- id: check-toml
|
||||||
- id: check-xml
|
- id: check-xml
|
||||||
|
|
||||||
# git checks
|
# git checks
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
args: [ --maxkb=1000 ]
|
args: [--maxkb=1000]
|
||||||
- id: detect-private-key
|
- id: detect-private-key
|
||||||
- id: check-case-conflict
|
- id: check-case-conflict
|
||||||
|
|
||||||
# Python checks
|
# Python checks
|
||||||
# - id: check-docstring-first
|
# - id: check-docstring-first
|
||||||
- id: debug-statements
|
- id: debug-statements
|
||||||
# - id: requirements-txt-fixer
|
# - id: requirements-txt-fixer
|
||||||
- id: fix-encoding-pragma
|
- id: fix-encoding-pragma
|
||||||
args: [ --remove ]
|
args: [--remove]
|
||||||
- id: fix-byte-order-marker
|
- id: fix-byte-order-marker
|
||||||
|
|
||||||
# General quality checks
|
# General quality checks
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
args: [ --fix=lf ]
|
args: [--fix=lf]
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
args: [ --markdown-linebreak-ext=md ]
|
args: [--markdown-linebreak-ext=md]
|
||||||
exclude: |
|
exclude: |
|
||||||
(?x)(
|
(?x)(
|
||||||
\.min\.css|
|
\.min\.css|
|
||||||
@@ -52,9 +62,8 @@ repos:
|
|||||||
\.mo|
|
\.mo|
|
||||||
swagger\.json
|
swagger\.json
|
||||||
)
|
)
|
||||||
|
|
||||||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python
|
||||||
rev: 2.7.2
|
rev: 2.7.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: editorconfig-checker
|
- id: editorconfig-checker
|
||||||
exclude: |
|
exclude: |
|
||||||
@@ -66,20 +75,20 @@ repos:
|
|||||||
swagger\.json
|
swagger\.json
|
||||||
)
|
)
|
||||||
|
|
||||||
- repo: https://github.com/asottile/pyupgrade
|
# Infrastructure
|
||||||
rev: v3.10.1
|
- repo: https://github.com/tox-dev/pyproject-fmt
|
||||||
|
rev: 2.0.3
|
||||||
hooks:
|
hooks:
|
||||||
- id: pyupgrade
|
- id: pyproject-fmt
|
||||||
args: [ --py38-plus ]
|
name: pyproject.toml formatter
|
||||||
|
description: "Format the pyproject.toml file."
|
||||||
- repo: https://github.com/adamchainz/django-upgrade
|
args:
|
||||||
rev: 1.14.0
|
- --indent=4
|
||||||
|
additional_dependencies:
|
||||||
|
- tox==4.15.0 # https://github.com/tox-dev/tox/releases/latest
|
||||||
|
- repo: https://github.com/abravalheri/validate-pyproject
|
||||||
|
rev: v0.17
|
||||||
hooks:
|
hooks:
|
||||||
- id: django-upgrade
|
- id: validate-pyproject
|
||||||
args: [--target-version=4.2]
|
name: Validate pyproject.toml
|
||||||
|
description: "Validate the pyproject.toml file."
|
||||||
- repo: https://github.com/asottile/setup-cfg-fmt
|
|
||||||
rev: v2.3.0
|
|
||||||
hooks:
|
|
||||||
- id: setup-cfg-fmt
|
|
||||||
args: [ --include-version-classifiers ]
|
|
||||||
|
|||||||
10
.tx/config
10
.tx/config
@@ -1,10 +0,0 @@
|
|||||||
[main]
|
|
||||||
host = https://app.transifex.com
|
|
||||||
lang_map = zh-Hans: zh_Hans
|
|
||||||
|
|
||||||
[o:alliance-auth:p:alliance-auth:r:django-po]
|
|
||||||
file_filter = allianceauth/locale/<lang>/LC_MESSAGES/django.po
|
|
||||||
source_file = allianceauth/locale/en/LC_MESSAGES/django.po
|
|
||||||
source_lang = en
|
|
||||||
type = PO
|
|
||||||
minimum_perc = 0
|
|
||||||
@@ -5,7 +5,7 @@ manage online service access.
|
|||||||
# This will make sure the app is always imported when
|
# This will make sure the app is always imported when
|
||||||
# Django starts so that shared_task will use this app.
|
# Django starts so that shared_task will use this app.
|
||||||
|
|
||||||
__version__ = '4.0.0rc1'
|
__version__ = '4.0.2'
|
||||||
__title__ = 'Alliance Auth'
|
__title__ = 'Alliance Auth'
|
||||||
__url__ = 'https://gitlab.com/allianceauth/allianceauth'
|
__url__ = 'https://gitlab.com/allianceauth/allianceauth'
|
||||||
NAME = f'{__title__} v{__version__}'
|
NAME = f'{__title__} v{__version__}'
|
||||||
|
|||||||
@@ -9,6 +9,8 @@ from .utils import (
|
|||||||
install_stat_tokens,
|
install_stat_tokens,
|
||||||
install_stat_users)
|
install_stat_users)
|
||||||
|
|
||||||
|
from allianceauth import __version__
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
BASE_URL = "https://www.google-analytics.com"
|
BASE_URL = "https://www.google-analytics.com"
|
||||||
@@ -139,7 +141,7 @@ def send_ga_tracking_celery_event(
|
|||||||
'client_id': AnalyticsIdentifier.objects.get(id=1).identifier.hex,
|
'client_id': AnalyticsIdentifier.objects.get(id=1).identifier.hex,
|
||||||
"user_properties": {
|
"user_properties": {
|
||||||
"allianceauth_version": {
|
"allianceauth_version": {
|
||||||
"value": "allianceauth_version"
|
"value": __version__
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
'non_personalized_ads': True,
|
'non_personalized_ads': True,
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
# Generated by Django 4.2.13 on 2024-05-12 09:44
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('authentication', '0022_userprofile_theme'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='userprofile',
|
||||||
|
name='language',
|
||||||
|
field=models.CharField(blank=True, choices=[('en', 'English'), ('de', 'German'), ('es', 'Spanish'), ('zh-hans', 'Chinese Simplified'), ('ru', 'Russian'), ('ko', 'Korean'), ('fr', 'French'), ('ja', 'Japanese'), ('it', 'Italian'), ('uk', 'Ukrainian'), ('pl', 'Polish')], default='', max_length=10, verbose_name='Language'),
|
||||||
|
),
|
||||||
|
]
|
||||||
@@ -78,6 +78,7 @@ class UserProfile(models.Model):
|
|||||||
JAPANESE = 'ja', _('Japanese')
|
JAPANESE = 'ja', _('Japanese')
|
||||||
ITALIAN = 'it', _('Italian')
|
ITALIAN = 'it', _('Italian')
|
||||||
UKRAINIAN = 'uk', _('Ukrainian')
|
UKRAINIAN = 'uk', _('Ukrainian')
|
||||||
|
POLISH = 'pl', _("Polish")
|
||||||
|
|
||||||
user = models.OneToOneField(
|
user = models.OneToOneField(
|
||||||
User,
|
User,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
{% if subtitle %}
|
{% if subtitle %}
|
||||||
<br>
|
<br>
|
||||||
<small>{{ subtitle }}</small>
|
<small class="text-muted">{{ subtitle }}</small>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</h1>
|
</h1>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
BIN
allianceauth/locale/cs/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/cs/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2776
allianceauth/locale/cs/LC_MESSAGES/django.po
Normal file
2776
allianceauth/locale/cs/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@ msgid ""
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: PACKAGE VERSION\n"
|
"Project-Id-Version: PACKAGE VERSION\n"
|
||||||
"Report-Msgid-Bugs-To: \n"
|
"Report-Msgid-Bugs-To: \n"
|
||||||
"POT-Creation-Date: 2024-03-13 19:10+1000\n"
|
"POT-Creation-Date: 2024-05-12 19:15+1000\n"
|
||||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||||
@@ -1385,6 +1385,8 @@ msgid "Sign Out"
|
|||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: allianceauth/menu/templates/menu/menu-user.html:84
|
#: allianceauth/menu/templates/menu/menu-user.html:84
|
||||||
|
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:17
|
||||||
|
#: allianceauth/templates/allianceauth/top-menu-rh-default.html:18
|
||||||
msgid "Sign In"
|
msgid "Sign In"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
BIN
allianceauth/locale/nl/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/nl/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2789
allianceauth/locale/nl/LC_MESSAGES/django.po
Normal file
2789
allianceauth/locale/nl/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
BIN
allianceauth/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
BIN
allianceauth/locale/pl_PL/LC_MESSAGES/django.mo
Normal file
Binary file not shown.
2848
allianceauth/locale/pl_PL/LC_MESSAGES/django.po
Normal file
2848
allianceauth/locale/pl_PL/LC_MESSAGES/django.po
Normal file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
{% endif %}>
|
{% endif %}>
|
||||||
</i>
|
</i>
|
||||||
<a
|
<a
|
||||||
class="nav-link flex-fill align-self-center me-auto"
|
class="nav-link flex-fill align-self-center me-auto {% if item.navactive %}{% navactive request item.navactive|join:' ' %}{% endif %}"
|
||||||
{% if item.is_folder %}
|
{% if item.is_folder %}
|
||||||
type="button"
|
type="button"
|
||||||
data-bs-toggle="collapse"
|
data-bs-toggle="collapse"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<ul id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
<ul id="sidebar-menu" class="navbar-nav flex-column mb-auto overflow-auto pt-2">
|
||||||
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
<li class="d-flex flex-wrap m-2 p-2 pt-0 pb-0 mt-0 mb-0 me-0 pe-0">
|
||||||
<i class="nav-link fas fa-tachometer-alt fa-fw align-self-center me-3 {% navactive request 'authentication:dashboard' %}"></i>
|
<i class="nav-link fas fa-tachometer-alt fa-fw align-self-center me-3 {% navactive request 'authentication:dashboard' %}"></i>
|
||||||
<a class="nav-link flex-fill align-self-center" href="{% url 'authentication:dashboard' %}">
|
<a class="nav-link flex-fill align-self-center {% navactive request 'authentication:dashboard' %}" href="{% url 'authentication:dashboard' %}">
|
||||||
{% translate "Dashboard" %}
|
{% translate "Dashboard" %}
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ def render_menu(request: HttpRequest) -> List[RenderedMenuItem]:
|
|||||||
|
|
||||||
if item.is_app_item:
|
if item.is_app_item:
|
||||||
rendered_item = _render_app_item(request, hook_items, item, bs5_template)
|
rendered_item = _render_app_item(request, hook_items, item, bs5_template)
|
||||||
|
if rendered_item.html == "":
|
||||||
|
# If there is no content dont render it.
|
||||||
|
# This item has probably been hidden by permissions
|
||||||
|
continue
|
||||||
elif item.is_link_item:
|
elif item.is_link_item:
|
||||||
rendered_item = _render_link_item(request, item, bs5_template)
|
rendered_item = _render_link_item(request, item, bs5_template)
|
||||||
elif item.is_folder:
|
elif item.is_folder:
|
||||||
|
|||||||
@@ -19,6 +19,11 @@ def create_user(permissions=None, **kwargs) -> User:
|
|||||||
return user
|
return user
|
||||||
|
|
||||||
|
|
||||||
|
def create_menu_item_hook_class(**kwargs) -> MenuItemHook:
|
||||||
|
num = next(counter_menu_item_hook)
|
||||||
|
return type(f"GeneratedMenuItem{num}", (MenuItemHook,), {})
|
||||||
|
|
||||||
|
|
||||||
def create_menu_item_hook(**kwargs) -> MenuItemHook:
|
def create_menu_item_hook(**kwargs) -> MenuItemHook:
|
||||||
num = next(counter_menu_item_hook)
|
num = next(counter_menu_item_hook)
|
||||||
new_class = type(f"GeneratedMenuItem{num}", (MenuItemHook,), {})
|
new_class = type(f"GeneratedMenuItem{num}", (MenuItemHook,), {})
|
||||||
|
|||||||
@@ -14,6 +14,7 @@ from allianceauth.menu.tests.factories import (
|
|||||||
create_folder_menu_item,
|
create_folder_menu_item,
|
||||||
create_link_menu_item,
|
create_link_menu_item,
|
||||||
create_menu_item_from_hook,
|
create_menu_item_from_hook,
|
||||||
|
create_menu_item_hook_class,
|
||||||
create_menu_item_hook_function,
|
create_menu_item_hook_function,
|
||||||
create_rendered_menu_item,
|
create_rendered_menu_item,
|
||||||
)
|
)
|
||||||
@@ -177,6 +178,44 @@ class TestRenderDefaultMenu(TestCase):
|
|||||||
self.assertEqual(menu[0].menu_item.text, "Alpha")
|
self.assertEqual(menu[0].menu_item.text, "Alpha")
|
||||||
self.assertEqual(menu[1].menu_item.text, "Bravo")
|
self.assertEqual(menu[1].menu_item.text, "Bravo")
|
||||||
|
|
||||||
|
def test_should_remove_empty_folders_with_items_hidden(self, mock_get_hooks):
|
||||||
|
# given
|
||||||
|
|
||||||
|
class TestHook(create_menu_item_hook_class()):
|
||||||
|
text = "Dummy App No Data"
|
||||||
|
classes = "fa-solid fa-users-gear"
|
||||||
|
url_name = "groupmanagement:management"
|
||||||
|
|
||||||
|
def render(Self, request):
|
||||||
|
# simulate no perms
|
||||||
|
return ""
|
||||||
|
|
||||||
|
params = {
|
||||||
|
"text": "Alpha",
|
||||||
|
"classes": "fa-solid fa-users-gear",
|
||||||
|
"url_name": "groupmanagement:management",
|
||||||
|
}
|
||||||
|
|
||||||
|
alpha = TestHook(**params)
|
||||||
|
|
||||||
|
hooks = [lambda: alpha]
|
||||||
|
|
||||||
|
mock_get_hooks.return_value = hooks
|
||||||
|
|
||||||
|
folder = create_folder_menu_item(text="Folder", order=2)
|
||||||
|
create_menu_item_from_hook(hooks[0], parent=folder)
|
||||||
|
create_link_menu_item(text="Bravo", order=3) # this is all that should show
|
||||||
|
|
||||||
|
request = self.factory.get("/")
|
||||||
|
|
||||||
|
# when
|
||||||
|
result = render_menu(request)
|
||||||
|
|
||||||
|
# then
|
||||||
|
menu = list(result)
|
||||||
|
self.assertEqual(len(menu), 1)
|
||||||
|
self.assertEqual(menu[0].menu_item.text, "Bravo")
|
||||||
|
|
||||||
def test_should_not_include_hidden_items(self, mock_get_hooks):
|
def test_should_not_include_hidden_items(self, mock_get_hooks):
|
||||||
# given
|
# given
|
||||||
mock_get_hooks.return_value = []
|
mock_get_hooks.return_value = []
|
||||||
@@ -196,7 +235,6 @@ class TestRenderDefaultMenu(TestCase):
|
|||||||
self.assertEqual(menu[1].menu_item.text, "Charlie")
|
self.assertEqual(menu[1].menu_item.text, "Charlie")
|
||||||
|
|
||||||
def test_should_not_render_hidden_folders(self, mock_get_hooks):
|
def test_should_not_render_hidden_folders(self, mock_get_hooks):
|
||||||
# given
|
|
||||||
# given
|
# given
|
||||||
menu = [
|
menu = [
|
||||||
create_menu_item_hook_function(text="Charlie", count=42),
|
create_menu_item_hook_function(text="Charlie", count=42),
|
||||||
|
|||||||
@@ -102,6 +102,7 @@ LANGUAGES = (
|
|||||||
("ja", "Japanese"),
|
("ja", "Japanese"),
|
||||||
("it", "Italian"),
|
("it", "Italian"),
|
||||||
("uk", "Ukrainian"),
|
("uk", "Ukrainian"),
|
||||||
|
("pl", "Polish"),
|
||||||
)
|
)
|
||||||
|
|
||||||
TEMPLATES = [
|
TEMPLATES = [
|
||||||
|
|||||||
@@ -29,56 +29,53 @@
|
|||||||
transform: rotate(180deg);
|
transform: rotate(180deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if user.is_authenticated %}
|
.nav-padding {
|
||||||
.nav-padding {
|
padding-top: {% header_padding_size %} !important;
|
||||||
padding-top: {% header_padding_size %} !important;
|
}
|
||||||
}
|
|
||||||
{% endif %}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
{% block extra_css %}{% endblock extra_css %}
|
{% block extra_css %}{% endblock extra_css %}
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
{% if user.is_authenticated %}
|
<!-- Top Menu, Blocks don't work in "include" tagged views -->
|
||||||
<!-- Top Menu, Blocks don't work in "include" tagged views -->
|
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
|
||||||
<nav class="navbar navbar-expand-lg navbar-dark fixed-top bg-primary">
|
<div class="container-fluid justify-content-start">
|
||||||
<div class="container-fluid justify-content-start">
|
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
|
||||||
{% if user.is_authenticated %}
|
<i class="fa-solid fa-bars ms-2 me-2"></i>
|
||||||
<a class="navbar-brand" data-bs-toggle="collapse" data-bs-target="#sidebar" role="button">
|
</a>
|
||||||
<i class="fa-solid fa-bars ms-2 me-2"></i>
|
|
||||||
</a>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<div class="navbar-brand">
|
<div class="navbar-brand">
|
||||||
{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}
|
{% block header_nav_brand %}{{ SITE_NAME }}{% endblock %}
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="collapse navbar-collapse ms-2 px-2" id="navbarexpand">
|
|
||||||
<ul id="nav-left" class="nav navbar-nav me-auto">
|
|
||||||
{% block header_nav_collapse_left %}
|
|
||||||
{% endblock %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul id="nav-right" class="nav navbar-nav">
|
|
||||||
{% block header_nav_collapse_right %}
|
|
||||||
{% endblock %}
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<ul id="nav-right-character-control" class="nav navbar-nav">
|
|
||||||
{% block header_nav_user_character_control %} <!-- Default to add char and swap main -->
|
|
||||||
{% include 'allianceauth/top-menu-rh-default.html' %}
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% include 'menu/menu-notification-block.html' %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<a class="navbar-toggler navbar-brand border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#navbarexpand" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="margin-left: auto;">
|
|
||||||
<i class="fa-solid fa-chevron-up"></i>
|
|
||||||
</a>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
|
||||||
{% endif %}
|
<div class="collapse navbar-collapse ms-2 px-2" id="navbarexpand">
|
||||||
|
<ul id="nav-left" class="nav navbar-nav me-auto">
|
||||||
|
{% block header_nav_collapse_left %}
|
||||||
|
{% endblock %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="nav-right" class="nav navbar-nav">
|
||||||
|
{% block header_nav_collapse_right %}
|
||||||
|
{% endblock %}
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
<ul id="nav-right-character-control" class="nav navbar-nav">
|
||||||
|
{% block header_nav_user_character_control %} <!-- Default to add char and swap main -->
|
||||||
|
{% include 'allianceauth/top-menu-rh-default.html' %}
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% if user.is_authenticated %}
|
||||||
|
{% include 'menu/menu-notification-block.html' %}
|
||||||
|
{% endif %}
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<a class="navbar-toggler navbar-brand border-0 collapsed" data-bs-toggle="collapse" data-bs-target="#navbarexpand" aria-controls="navbarColor01" aria-expanded="false" aria-label="Toggle navigation" style="margin-left: auto;">
|
||||||
|
<i class="fa-solid fa-chevron-up"></i>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
<!-- End Top Menu -->
|
<!-- End Top Menu -->
|
||||||
|
|
||||||
<!-- Body -->
|
<!-- Body -->
|
||||||
@@ -98,23 +95,27 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
(() => {
|
(() => {
|
||||||
// TODO Extend this to the groups in the sidebar too.
|
|
||||||
// TODO Move to own JS file
|
// TODO Move to own JS file
|
||||||
const sidebar = document.getElementById('sidebar');
|
const sidebar = document.getElementById('sidebar');
|
||||||
|
|
||||||
sidebar.addEventListener("shown.bs.collapse", () => {
|
sidebar.addEventListener('shown.bs.collapse', () => {
|
||||||
localStorage.removeItem("sidebar_" + sidebar.id);
|
localStorage.removeItem('sidebar_' + sidebar.id);
|
||||||
});
|
});
|
||||||
|
|
||||||
sidebar.addEventListener("hidden.bs.collapse", () => {
|
sidebar.addEventListener('hidden.bs.collapse', () => {
|
||||||
localStorage.setItem("sidebar_" + sidebar.id, true);
|
localStorage.setItem('sidebar_' + sidebar.id, 'closed');
|
||||||
});
|
});
|
||||||
|
|
||||||
if (localStorage.getItem("sidebar_" + sidebar.id) === "true") {
|
if (localStorage.getItem('sidebar_' + sidebar.id) === 'closed') {
|
||||||
sidebar.classList.remove("show")
|
sidebar.classList.remove('show')
|
||||||
} else {
|
} else {
|
||||||
sidebar.classList.add("show")
|
sidebar.classList.add("show")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const activeChildMenuItem = document.querySelector('#sidebar-menu li ul li a.active');
|
||||||
|
if (activeChildMenuItem) {
|
||||||
|
activeChildMenuItem.parentElement.parentElement.classList.add('show');
|
||||||
|
}
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
{% if user.is_authenticated %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
|
<a href="{% url 'authentication:add_character' %}" class="nav-link" title="{% translate 'Add Character' %}">
|
||||||
<i class="fa-solid fa-plus"></i>
|
<i class="fa-solid fa-plus"></i>
|
||||||
@@ -12,3 +12,10 @@
|
|||||||
<span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span>
|
<span class="d-lg-none d-md-inline m-2">{% translate "Change Main" %}</span>
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
|
{% else %}
|
||||||
|
<li class="nav-item">
|
||||||
|
<a href="{% url 'authentication:login' %}" class="nav-link" title="{% translate 'Sign In' %}">
|
||||||
|
<i class="fa-solid fa-right-to-bracket fa-fw "></i> {% translate "Sign In" %}
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
{% endif %}
|
||||||
|
|||||||
@@ -19,9 +19,9 @@
|
|||||||
|
|
||||||
{% for timer in timers %}
|
{% for timer in timers %}
|
||||||
{% if timer.important == True %}
|
{% if timer.important == True %}
|
||||||
<tr class="danger">
|
<tr class="bg-danger bg-opacity-25">
|
||||||
{% else %}
|
{% else %}
|
||||||
<tr class="info">
|
<tr class="bg-info bg-opacity-25">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<td style="width: 150px;" class="text-center">
|
<td style="width: 150px;" class="text-center">
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
PROTOCOL=https://
|
PROTOCOL=https://
|
||||||
AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN%
|
AUTH_SUBDOMAIN=%AUTH_SUBDOMAIN%
|
||||||
DOMAIN=%DOMAIN%
|
DOMAIN=%DOMAIN%
|
||||||
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.0.0rc1
|
AA_DOCKER_TAG=registry.gitlab.com/allianceauth/allianceauth/auth:v4.0.2
|
||||||
|
|
||||||
# Nginx Proxy Manager
|
# Nginx Proxy Manager
|
||||||
PROXY_HTTP_PORT=80
|
PROXY_HTTP_PORT=80
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
FROM python:3.11-slim
|
FROM python:3.11-slim
|
||||||
ARG AUTH_VERSION=v4.0.0rc1
|
ARG AUTH_VERSION=v4.0.2
|
||||||
ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION}
|
ARG AUTH_PACKAGE=allianceauth==${AUTH_VERSION}
|
||||||
ENV AUTH_USER=allianceauth
|
ENV AUTH_USER=allianceauth
|
||||||
ENV AUTH_GROUP=allianceauth
|
ENV AUTH_GROUP=allianceauth
|
||||||
|
|||||||
@@ -38,7 +38,8 @@ To use it, you can use the following code in your template:
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
<div>
|
<div>
|
||||||
{% translate "My Page Header" as page_header %}
|
{% translate "My Page Header" as page_header %}
|
||||||
{% include "framework/header/page-header.html" with title=page_header %}
|
{% translate "My Page Header Subtitle" as optional_subtitle %}
|
||||||
|
{% include "framework/header/page-header.html" with title=page_header subtitle=optional_subtitle %}
|
||||||
|
|
||||||
<p>My page content</p>
|
<p>My page content</p>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ Add the following to your `docker-compose.yml` under the `services:` section
|
|||||||
max-file: "5"
|
max-file: "5"
|
||||||
|
|
||||||
mumble-authenticator:
|
mumble-authenticator:
|
||||||
build
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: ./mumble-authenticator/Dockerfile
|
dockerfile: ./mumble-authenticator/Dockerfile
|
||||||
restart: always
|
restart: always
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ PHPBB3_URL = ''
|
|||||||
DATABASES['phpbb3'] = {
|
DATABASES['phpbb3'] = {
|
||||||
'ENGINE': 'django.db.backends.mysql',
|
'ENGINE': 'django.db.backends.mysql',
|
||||||
'NAME': 'alliance_forum',
|
'NAME': 'alliance_forum',
|
||||||
'USER': 'allianceserver-phpbb3',
|
'USER': 'allianceserver',
|
||||||
'PASSWORD': 'password',
|
'PASSWORD': 'password',
|
||||||
'HOST': '127.0.0.1',
|
'HOST': '127.0.0.1',
|
||||||
'PORT': '3306',
|
'PORT': '3306',
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ There are a handful of ways to add packages:
|
|||||||
|
|
||||||
Using a custom docker image is the preferred approach, as it gives you the stability of packages only changing when you tell them to, along with packages not having to be downloaded every time your container restarts
|
Using a custom docker image is the preferred approach, as it gives you the stability of packages only changing when you tell them to, along with packages not having to be downloaded every time your container restarts
|
||||||
|
|
||||||
1. Add each additional package that you want to install to a single line in `conf/requirements.txt`. It is recommended, but not required, that you include a version number as well. This will keep your packages from magically updating. You can lookup packages on <https://package.wiki>, and copy everything after `pip install` from the top of the page to use the most recent version. It should look something like `allianceauth-signal-pings==0.0.7`. Every entry in this file should be on a separate line
|
1. Add each additional package that you want to install to a single line in `conf/requirements.txt`. It is recommended, but not required, that you include a version number as well. This will keep your packages from magically updating. You can lookup packages on <https://pypi.org>, and copy from the title at the top of the page to use the most recent version. It should look something like `allianceauth-signal-pings==0.0.7`. Every entry in this file should be on a separate line
|
||||||
1. Modify `docker-compose.yml`, as follows.
|
1. Modify `docker-compose.yml`, as follows.
|
||||||
* Comment out the `image` line under `allianceauth`
|
* Comment out the `image` line under `allianceauth`
|
||||||
* Uncomment the `build` section
|
* Uncomment the `build` section
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Take a complete backup of your local.py, docker-compose and SQL database.
|
|||||||
|
|
||||||
`docker compose down`
|
`docker compose down`
|
||||||
|
|
||||||
Replace your conf/nginx.conf with the contents of <https://gitlab.com/allianceauth/allianceauth/-/blob/v4.x/docker/conf/nginx.conf>
|
Replace your conf/nginx.conf with the contents of <https://gitlab.com/allianceauth/allianceauth/-/raw/v4.x/docker/conf/nginx.conf>
|
||||||
|
|
||||||
Replace your docker-compose.yml with the contents of <https://gitlab.com/allianceauth/allianceauth/-/raw/v4.x/docker/docker-compose.yml>
|
Replace your docker-compose.yml with the contents of <https://gitlab.com/allianceauth/allianceauth/-/raw/v4.x/docker/docker-compose.yml>
|
||||||
|
|
||||||
|
|||||||
@@ -1,20 +1,21 @@
|
|||||||
[build-system]
|
[build-system]
|
||||||
requires = ["flit_core >=3.2,<4"]
|
|
||||||
build-backend = "flit_core.buildapi"
|
build-backend = "flit_core.buildapi"
|
||||||
|
requires = [
|
||||||
|
"flit-core<4,>=3.2",
|
||||||
|
]
|
||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "allianceauth"
|
name = "allianceauth"
|
||||||
dynamic = ["version", "description"]
|
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = {file = "LICENSE"}
|
|
||||||
requires-python = ">=3.8"
|
|
||||||
authors = [
|
|
||||||
{ name = "Alliance Auth", email = "adarnof@gmail.com" },
|
|
||||||
]
|
|
||||||
keywords = [
|
keywords = [
|
||||||
"allianceauth",
|
"allianceauth",
|
||||||
"eveonline",
|
"eveonline",
|
||||||
]
|
]
|
||||||
|
license = { file = "LICENSE" }
|
||||||
|
authors = [
|
||||||
|
{ name = "Alliance Auth", email = "adarnof@gmail.com" },
|
||||||
|
]
|
||||||
|
requires-python = ">=3.8"
|
||||||
classifiers = [
|
classifiers = [
|
||||||
"Environment :: Web Environment",
|
"Environment :: Web Environment",
|
||||||
"Framework :: Django",
|
"Framework :: Django",
|
||||||
@@ -23,6 +24,7 @@ classifiers = [
|
|||||||
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
"License :: OSI Approved :: GNU General Public License v2 (GPLv2)",
|
||||||
"Operating System :: POSIX :: Linux",
|
"Operating System :: POSIX :: Linux",
|
||||||
"Programming Language :: Python",
|
"Programming Language :: Python",
|
||||||
|
"Programming Language :: Python :: 3 :: Only",
|
||||||
"Programming Language :: Python :: 3.8",
|
"Programming Language :: Python :: 3.8",
|
||||||
"Programming Language :: Python :: 3.9",
|
"Programming Language :: Python :: 3.9",
|
||||||
"Programming Language :: Python :: 3.10",
|
"Programming Language :: Python :: 3.10",
|
||||||
@@ -31,56 +33,54 @@ classifiers = [
|
|||||||
"Topic :: Internet :: WWW/HTTP",
|
"Topic :: Internet :: WWW/HTTP",
|
||||||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",
|
||||||
]
|
]
|
||||||
|
dynamic = [
|
||||||
|
"description",
|
||||||
|
"version",
|
||||||
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bcrypt",
|
"bcrypt",
|
||||||
"beautifulsoup4",
|
"beautifulsoup4",
|
||||||
|
"celery<6,>=5.2",
|
||||||
"celery-once>=3.0.1",
|
"celery-once>=3.0.1",
|
||||||
"celery>=5.2.0,<6",
|
"django<5,>=4.2",
|
||||||
'django-bootstrap5>=23.3',
|
|
||||||
"django-bootstrap-form",
|
"django-bootstrap-form",
|
||||||
"django-celery-beat>=2.3.0",
|
"django-bootstrap5>=23.3",
|
||||||
"django-esi>=5.0.0",
|
"django-celery-beat>=2.3",
|
||||||
"django-redis>=5.2.0",
|
"django-esi>=5",
|
||||||
"django-registration>=3.3,<3.4",
|
"django-redis>=5.2",
|
||||||
|
"django-registration<3.4,>=3.3",
|
||||||
"django-sortedm2m",
|
"django-sortedm2m",
|
||||||
"django>=4.2,<5",
|
|
||||||
"dnspython",
|
"dnspython",
|
||||||
"mysqlclient>=2.1.0",
|
"mysqlclient>=2.1",
|
||||||
"openfire-restapi",
|
"openfire-restapi",
|
||||||
"packaging>=21.0",
|
"packaging>=21",
|
||||||
"passlib",
|
"passlib",
|
||||||
"pydiscourse",
|
"pydiscourse",
|
||||||
"python-slugify>=1.2",
|
"python-slugify>=1.2",
|
||||||
"redis>=4.0.0",
|
"redis>=4",
|
||||||
"requests-oauthlib",
|
|
||||||
"requests>=2.9.1",
|
"requests>=2.9.1",
|
||||||
|
"requests-oauthlib",
|
||||||
"semantic-version",
|
"semantic-version",
|
||||||
"slixmpp",
|
"slixmpp",
|
||||||
]
|
]
|
||||||
|
optional-dependencies.docs = [
|
||||||
[project.optional-dependencies]
|
"myst-parser",
|
||||||
test = [
|
"sphinx",
|
||||||
|
"sphinx-copybutton",
|
||||||
|
"sphinx-rtd-theme<3,>=2",
|
||||||
|
"sphinx-tabs",
|
||||||
|
"sphinxcontrib-django",
|
||||||
|
]
|
||||||
|
optional-dependencies.test = [
|
||||||
"coverage>=4.3.1",
|
"coverage>=4.3.1",
|
||||||
"django-webtest",
|
"django-webtest",
|
||||||
"requests-mock>=1.2.0"
|
"requests-mock>=1.2",
|
||||||
]
|
]
|
||||||
docs = [
|
urls.Documentation = "https://allianceauth.readthedocs.io/"
|
||||||
"sphinx",
|
urls.Homepage = "https://gitlab.com/allianceauth/allianceauth"
|
||||||
"sphinx_rtd_theme>=2.0.0,<3.0.0",
|
urls.Source = "https://gitlab.com/allianceauth/allianceauth"
|
||||||
"myst-parser",
|
urls.Tracker = "https://gitlab.com/allianceauth/allianceauth/-/issues"
|
||||||
"sphinxcontrib-django",
|
scripts.allianceauth = "allianceauth.bin.allianceauth:main"
|
||||||
"sphinx-copybutton",
|
|
||||||
"sphinx-tabs",
|
|
||||||
]
|
|
||||||
|
|
||||||
[project.scripts]
|
|
||||||
allianceauth = "allianceauth.bin.allianceauth:main"
|
|
||||||
|
|
||||||
[project.urls]
|
|
||||||
Homepage = "https://gitlab.com/allianceauth/allianceauth"
|
|
||||||
Documentation = "https://allianceauth.readthedocs.io/"
|
|
||||||
Source = "https://gitlab.com/allianceauth/allianceauth"
|
|
||||||
Tracker = "https://gitlab.com/allianceauth/allianceauth/-/issues"
|
|
||||||
|
|
||||||
[tool.flit.module]
|
[tool.flit.module]
|
||||||
name = "allianceauth"
|
name = "allianceauth"
|
||||||
@@ -94,8 +94,12 @@ sections = [
|
|||||||
"DJANGO",
|
"DJANGO",
|
||||||
"ESI",
|
"ESI",
|
||||||
"FIRSTPARTY",
|
"FIRSTPARTY",
|
||||||
"LOCALFOLDER"
|
"LOCALFOLDER",
|
||||||
|
]
|
||||||
|
known_esi = [
|
||||||
|
"esi",
|
||||||
|
]
|
||||||
|
known_django = [
|
||||||
|
"django",
|
||||||
]
|
]
|
||||||
known_esi = ["esi"]
|
|
||||||
known_django = ["django"]
|
|
||||||
skip_gitignore = true
|
skip_gitignore = true
|
||||||
|
|||||||
3
tox.ini
3
tox.ini
@@ -2,7 +2,7 @@
|
|||||||
isolated_build = True
|
isolated_build = True
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
usedevelop = true
|
usedevelop = true
|
||||||
envlist = py{38,39,310,311,312,py}-{all,core}, docs
|
envlist = py{38,39,310,311,312}-{all,core}, docs
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
setenv =
|
setenv =
|
||||||
@@ -14,7 +14,6 @@ basepython =
|
|||||||
py310: python3.10
|
py310: python3.10
|
||||||
py311: python3.11
|
py311: python3.11
|
||||||
py312: python3.12
|
py312: python3.12
|
||||||
pypy: pypy3
|
|
||||||
deps=
|
deps=
|
||||||
coverage
|
coverage
|
||||||
install_command = pip install -e ".[test]" -U {opts} {packages}
|
install_command = pip install -e ".[test]" -U {opts} {packages}
|
||||||
|
|||||||
Reference in New Issue
Block a user