mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
More updates
This commit is contained in:
@@ -14,7 +14,13 @@
|
||||
@mouseleave="setHover(mailbox, false)"
|
||||
>
|
||||
<v-icon :icon="iconByMailboxType[mailbox.type]" class="mr-4" />
|
||||
<template v-if="props.unseenCounters && mailbox.unseen > 0">
|
||||
<template
|
||||
v-if="
|
||||
props.unseenCounters &&
|
||||
mailbox.unseen > 0 &&
|
||||
currentMailboxUnseen > 0
|
||||
"
|
||||
>
|
||||
<span
|
||||
v-if="mailbox.name === route.query.mailbox"
|
||||
class="font-weight-bold"
|
||||
|
||||
@@ -281,7 +281,7 @@ def load_admin_settings():
|
||||
from .api.v2 import serializers
|
||||
|
||||
structure = init_structure()
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"admin",
|
||||
gettext_lazy("Administration"),
|
||||
|
||||
@@ -9,7 +9,7 @@ def load_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"autoreply",
|
||||
gettext_lazy("Automatic replies"),
|
||||
|
||||
@@ -83,7 +83,7 @@ def load_settings():
|
||||
from modoboa.parameters import tools as param_tools
|
||||
from modoboa.calendars import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"calendars",
|
||||
gettext_lazy("Calendars"),
|
||||
|
||||
@@ -45,7 +45,7 @@ def load_settings():
|
||||
from modoboa.parameters import tools as param_tools
|
||||
from modoboa.contacts import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"user",
|
||||
"contacts",
|
||||
gettext_lazy("Contacts"),
|
||||
|
||||
@@ -15,7 +15,7 @@ def load_core_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"core",
|
||||
gettext_lazy("General"),
|
||||
|
||||
@@ -36,7 +36,7 @@ def load_settings():
|
||||
"""Load app settings."""
|
||||
from modoboa.parameters import tools as param_tools
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"dmarc",
|
||||
_("DMARC"),
|
||||
|
||||
@@ -14,7 +14,7 @@ def load_imapmigration_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"imap_migration",
|
||||
gettext_lazy("IMAP Migration"),
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
# Generated by Django 4.2.22 on 2025-07-01 09:21
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
APPS_MAP = {
|
||||
"modoboa_radicale": "calendars",
|
||||
"modoboa_webmail": "webmail",
|
||||
"modoboa_rspamd": "rspamd",
|
||||
"modoboa_sievefilters": "sievefilters",
|
||||
"modoboa_postfix_autoreply": "autoreply",
|
||||
}
|
||||
|
||||
|
||||
def rename_param_apps(apps, schema_editor):
|
||||
LocalConfig = apps.get_model("core", "LocalConfig")
|
||||
lc = LocalConfig.objects.first()
|
||||
if not lc:
|
||||
return
|
||||
for old_name, new_name in APPS_MAP.items():
|
||||
if old_name not in lc._parameters:
|
||||
continue
|
||||
lc._parameters[new_name] = lc._parameters[old_name]
|
||||
del lc._parameters[old_name]
|
||||
lc.save()
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("lib", "0006_auto_20161104_2206"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(rename_param_apps, migrations.RunPython.noop),
|
||||
]
|
||||
@@ -10,7 +10,7 @@ def load_limits_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"limits",
|
||||
_("Limits"),
|
||||
|
||||
@@ -54,7 +54,7 @@ def load_maillog_settings():
|
||||
from modoboa.maillog.api.v2 import serializers
|
||||
from modoboa.parameters import tools as param_tools
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"maillog",
|
||||
gettext("Statistics"),
|
||||
|
||||
@@ -30,7 +30,7 @@ class Registry:
|
||||
"""Constructor."""
|
||||
self._registry2 = {"global": {}, "user": {}}
|
||||
|
||||
def add2(
|
||||
def add(
|
||||
self,
|
||||
level: str,
|
||||
app: str,
|
||||
|
||||
@@ -15,7 +15,7 @@ def load_pdfcredential_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"pdfcredentials",
|
||||
gettext_lazy("PDF Credentials"),
|
||||
|
||||
@@ -12,7 +12,7 @@ def load_rspamd_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"rspamd",
|
||||
gettext_lazy("Rspamd"),
|
||||
|
||||
@@ -9,7 +9,7 @@ def load_settings():
|
||||
from . import app_settings
|
||||
from .api.v2 import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"sievefilters",
|
||||
gettext_lazy("Sieve filters"),
|
||||
|
||||
@@ -252,14 +252,14 @@ def load_settings():
|
||||
from modoboa.parameters import tools as param_tools
|
||||
from modoboa.webmail import serializers
|
||||
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"global",
|
||||
"webmail",
|
||||
gettext_lazy("Webmail"),
|
||||
GLOBAL_PARAMETERS_STRUCT,
|
||||
serializers.GlobalParametersSerializer,
|
||||
)
|
||||
param_tools.registry.add2(
|
||||
param_tools.registry.add(
|
||||
"user",
|
||||
"webmail",
|
||||
gettext_lazy("Webmail"),
|
||||
|
||||
Reference in New Issue
Block a user