aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorBobby <[email protected]>2026-03-08 03:06:23 +0530
committerBobby <[email protected]>2026-03-08 03:06:23 +0530
commitcaf265e7050edefa64ecf7e13828ec9636bce867 (patch)
tree6bb8554dbb34695a74c2dca556bf512998cf62ab /templates
parentcca905d35412f1549400fc3d1aca6dc704d8cae6 (diff)
downloaddove-caf265e7050edefa64ecf7e13828ec9636bce867.tar.xz
dove-caf265e7050edefa64ecf7e13828ec9636bce867.zip
Refactor configuration handling and add mail management features
- Removed dependency on messages package in TOML loading and parsing. - Introduced new config constants and messages for better clarity and maintainability. - Implemented mail user and mailbox management with corresponding controllers and views. - Added new templates for mailboxes, mailbox creation, and user management. - Enhanced logging and error handling throughout the application. - Established a structured approach for applying default values in TOML configuration. - Created new utility functions for SMTP and email handling.
Diffstat (limited to 'templates')
-rw-r--r--templates/dashboard/mailboxes.django5
-rw-r--r--templates/domains/htmx/domains.htmx.django2
-rw-r--r--templates/mail/htmx/mailbox.htmx.django (renamed from templates/dashboard/htmx/mailbox.htmx.django)0
-rw-r--r--templates/mail/htmx/mailboxes.htmx.django (renamed from templates/dashboard/htmx/mailboxes.htmx.django)4
-rw-r--r--templates/mail/htmx/newmailbox.htmx.django (renamed from templates/dashboard/htmx/newmailbox.htmx.django)4
-rw-r--r--templates/mail/htmx/newuser.htmx.django (renamed from templates/dashboard/htmx/newuser.htmx.django)4
-rw-r--r--templates/mail/htmx/users.htmx.django (renamed from templates/dashboard/htmx/users.htmx.django)2
-rw-r--r--templates/mail/mailbox.django (renamed from templates/dashboard/mailbox.django)2
-rw-r--r--templates/mail/mailboxes.django5
-rw-r--r--templates/mail/newmailbox.django (renamed from templates/dashboard/newmailbox.django)2
-rw-r--r--templates/mail/newuser.django (renamed from templates/dashboard/newuser.django)2
-rw-r--r--templates/mail/users.django (renamed from templates/dashboard/users.django)2
-rw-r--r--templates/partials/sidebar.django4
13 files changed, 19 insertions, 19 deletions
diff --git a/templates/dashboard/mailboxes.django b/templates/dashboard/mailboxes.django
deleted file mode 100644
index 5c7e255..0000000
--- a/templates/dashboard/mailboxes.django
+++ /dev/null
@@ -1,5 +0,0 @@
-{% extends "layouts/dashboard.django" %}
-
-{% block dashboard %}
-{% include "dashboard/htmx/mailboxes.htmx.django" %}
-{% endblock %} \ No newline at end of file
diff --git a/templates/domains/htmx/domains.htmx.django b/templates/domains/htmx/domains.htmx.django
index 972bbf5..42fd320 100644
--- a/templates/domains/htmx/domains.htmx.django
+++ b/templates/domains/htmx/domains.htmx.django
@@ -27,7 +27,7 @@
</div>
</div>
{% if not tld.IsDefault %}
- {% url "domains.tlds.delete" tld.Name as delete_tld_path %}
+ {% url "domains.tlds.delete" name=tld.Name as delete_tld_path %}
<button hx-delete="{{ delete_tld_path }}" hx-confirm="Delete .{{ tld.Name }}?" hx-target="#content" hx-swap="innerHTML" class="text-xs text-zinc-600 hover:text-red-400 transition-colors duration-150">Delete</button>
{% endif %}
</div>
diff --git a/templates/dashboard/htmx/mailbox.htmx.django b/templates/mail/htmx/mailbox.htmx.django
index 831a07d..831a07d 100644
--- a/templates/dashboard/htmx/mailbox.htmx.django
+++ b/templates/mail/htmx/mailbox.htmx.django
diff --git a/templates/dashboard/htmx/mailboxes.htmx.django b/templates/mail/htmx/mailboxes.htmx.django
index 1816951..96094f3 100644
--- a/templates/dashboard/htmx/mailboxes.htmx.django
+++ b/templates/mail/htmx/mailboxes.htmx.django
@@ -5,14 +5,14 @@
<h2 class="text-sm font-medium text-zinc-200">All Mailboxes</h2>
<div class="flex items-center gap-3">
<span class="text-xs text-zinc-600">{{ total }} total</span>
- {% url "dashboard.mailboxes.new" as new_mailbox_path %}
+ {% url "mail.mailboxes.new" as new_mailbox_path %}
<a href="{{ new_mailbox_path }}" hx-get="{{ new_mailbox_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="btn-small">New Mailbox</a>
</div>
</div>
{% if items %}
<div class="divide-y divide-white/[0.04]">
{% for mailbox in items %}
- {% url "dashboard.mailbox" address=mailbox.Address as mailbox_path %}
+ {% url "mail.mailbox" address=mailbox.Address as mailbox_path %}
<a href="{{ mailbox_path }}" hx-get="{{ mailbox_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="flex items-center justify-between px-5 py-3 hover:bg-white/[0.02] transition-colors duration-150">
<div class="flex items-center gap-3">
<div class="flex items-center justify-center w-8 h-8 rounded-lg bg-accent-500/10">
diff --git a/templates/dashboard/htmx/newmailbox.htmx.django b/templates/mail/htmx/newmailbox.htmx.django
index 4f201cd..0962bea 100644
--- a/templates/dashboard/htmx/newmailbox.htmx.django
+++ b/templates/mail/htmx/newmailbox.htmx.django
@@ -5,7 +5,7 @@
<h2 class="text-sm font-medium text-zinc-200">Create Mailbox</h2>
</div>
<div class="p-5">
- {% url "dashboard.mailboxes.create" as create_path %}
+ {% url "mail.mailboxes.create" as create_path %}
<form method="POST" action="{{ create_path }}" class="space-y-4">
<div>
<label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">Address</label>
@@ -43,7 +43,7 @@
</div>
<div class="flex items-center gap-3 pt-2">
<button type="submit" class="btn-primary">Create Mailbox</button>
- {% url "dashboard.mailboxes" as mailboxes_path %}
+ {% url "mail.mailboxes" as mailboxes_path %}
<a href="{{ mailboxes_path }}" hx-get="{{ mailboxes_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="text-xs text-zinc-500 hover:text-zinc-300 transition-colors duration-150">Cancel</a>
</div>
</form>
diff --git a/templates/dashboard/htmx/newuser.htmx.django b/templates/mail/htmx/newuser.htmx.django
index 826dc72..c6d4d10 100644
--- a/templates/dashboard/htmx/newuser.htmx.django
+++ b/templates/mail/htmx/newuser.htmx.django
@@ -5,7 +5,7 @@
<h2 class="text-sm font-medium text-zinc-200">Create User</h2>
</div>
<div class="p-5">
- {% url "dashboard.users.create" as create_path %}
+ {% url "mail.users.create" as create_path %}
<form method="POST" action="{{ create_path }}" class="space-y-4">
<div>
<label class="block text-xs font-medium text-zinc-400 mb-1.5 ml-1">Username</label>
@@ -17,7 +17,7 @@
</div>
<div class="flex items-center gap-3 pt-2">
<button type="submit" class="btn-primary">Create User</button>
- {% url "dashboard.users" as users_path %}
+ {% url "mail.users" as users_path %}
<a href="{{ users_path }}" hx-get="{{ users_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="text-xs text-zinc-500 hover:text-zinc-300 transition-colors duration-150">Cancel</a>
</div>
</form>
diff --git a/templates/dashboard/htmx/users.htmx.django b/templates/mail/htmx/users.htmx.django
index edcf72a..7ec040c 100644
--- a/templates/dashboard/htmx/users.htmx.django
+++ b/templates/mail/htmx/users.htmx.django
@@ -5,7 +5,7 @@
<h2 class="text-sm font-medium text-zinc-200">All Users</h2>
<div class="flex items-center gap-3">
<span class="text-xs text-zinc-600">{{ total }} total</span>
- {% url "dashboard.users.new" as new_user_path %}
+ {% url "mail.users.new" as new_user_path %}
<a href="{{ new_user_path }}" hx-get="{{ new_user_path }}" hx-target="#content" hx-swap="innerHTML" hx-push-url="true" class="btn-small">New User</a>
</div>
</div>
diff --git a/templates/dashboard/mailbox.django b/templates/mail/mailbox.django
index 7f0e312..ed03a72 100644
--- a/templates/dashboard/mailbox.django
+++ b/templates/mail/mailbox.django
@@ -12,5 +12,5 @@
{% endblock %}
{% block dashboard %}
-{% include "dashboard/htmx/mailbox.htmx.django" %}
+{% include "mail/htmx/mailbox.htmx.django" %}
{% endblock %} \ No newline at end of file
diff --git a/templates/mail/mailboxes.django b/templates/mail/mailboxes.django
new file mode 100644
index 0000000..545d0c4
--- /dev/null
+++ b/templates/mail/mailboxes.django
@@ -0,0 +1,5 @@
+{% extends "layouts/dashboard.django" %}
+
+{% block dashboard %}
+{% include "mail/htmx/mailboxes.htmx.django" %}
+{% endblock %} \ No newline at end of file
diff --git a/templates/dashboard/newmailbox.django b/templates/mail/newmailbox.django
index 179ca88..f74b112 100644
--- a/templates/dashboard/newmailbox.django
+++ b/templates/mail/newmailbox.django
@@ -1,5 +1,5 @@
{% extends "layouts/dashboard.django" %}
{% block dashboard %}
-{% include "dashboard/htmx/newmailbox.htmx.django" %}
+{% include "mail/htmx/newmailbox.htmx.django" %}
{% endblock %}
diff --git a/templates/dashboard/newuser.django b/templates/mail/newuser.django
index efb3176..7be9a6e 100644
--- a/templates/dashboard/newuser.django
+++ b/templates/mail/newuser.django
@@ -1,5 +1,5 @@
{% extends "layouts/dashboard.django" %}
{% block dashboard %}
-{% include "dashboard/htmx/newuser.htmx.django" %}
+{% include "mail/htmx/newuser.htmx.django" %}
{% endblock %}
diff --git a/templates/dashboard/users.django b/templates/mail/users.django
index e00656f..94919d0 100644
--- a/templates/dashboard/users.django
+++ b/templates/mail/users.django
@@ -1,5 +1,5 @@
{% extends "layouts/dashboard.django" %}
{% block dashboard %}
-{% include "dashboard/htmx/users.htmx.django" %}
+{% include "mail/htmx/users.htmx.django" %}
{% endblock %} \ No newline at end of file
diff --git a/templates/partials/sidebar.django b/templates/partials/sidebar.django
index b3d017e..0530bb7 100644
--- a/templates/partials/sidebar.django
+++ b/templates/partials/sidebar.django
@@ -11,8 +11,8 @@
<nav class="flex flex-col gap-1 p-3" id="sidebar-nav" hx-target="#content" hx-swap="innerHTML" hx-push-url="true">
{% url "dashboard.index" as overview_path %}
{% url "domains.index" as domains_path %}
- {% url "dashboard.mailboxes" as mailboxes_path %}
- {% url "dashboard.users" as users_path %}
+ {% url "mail.mailboxes" as mailboxes_path %}
+ {% url "mail.users" as users_path %}
<a href="{{ overview_path }}" hx-get="{{ overview_path }}" class="nav-link flex items-center gap-3 px-3 py-2 rounded-lg text-sm transition-colors duration-150 {% if Request.Path == overview_path %}active{% endif %}">
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24" stroke-width="1.5">
<path stroke-linecap="round" stroke-linejoin="round" d="M3.75 6A2.25 2.25 0 0 1 6 3.75h2.25A2.25 2.25 0 0 1 10.5 6v2.25a2.25 2.25 0 0 1-2.25 2.25H6a2.25 2.25 0 0 1-2.25-2.25V6ZM3.75 15.75A2.25 2.25 0 0 1 6 13.5h2.25a2.25 2.25 0 0 1 2.25 2.25V18a2.25 2.25 0 0 1-2.25 2.25H6A2.25 2.25 0 0 1 3.75 18v-2.25ZM13.5 6a2.25 2.25 0 0 1 2.25-2.25H18A2.25 2.25 0 0 1 20.25 6v2.25A2.25 2.25 0 0 1 18 10.5h-2.25a2.25 2.25 0 0 1-2.25-2.25V6ZM13.5 15.75a2.25 2.25 0 0 1 2.25-2.25H18a2.25 2.25 0 0 1 2.25 2.25V18A2.25 2.25 0 0 1 18 20.25h-2.25a2.25 2.25 0 0 1-2.25-2.25v-2.25Z" />