Add domain management, reports, settings, and upload templates
- Implemented domain management page with a list of monitored domains and their DMARC, SPF, and DKIM statuses. - Created reports page with filtering options for domain, report type, and date range, displaying DMARC reports. - Developed settings page for IMAP configuration and DMARC policy management, including form validation and feedback. - Added upload page for DMARC report files with drag-and-drop functionality and file type validation. - Integrated Alpine.js for interactivity and dynamic data handling across all templates.
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
{% macro alert(variant='info', dismissible=False, id='') %}
|
||||
<div
|
||||
class="alert alert-{{ variant }} shadow-lg mb-4"
|
||||
{% if id %}id="{{ id }}"{% endif %}
|
||||
{% if dismissible %}x-data="{ open: true }" x-show="open"{% endif %}
|
||||
>
|
||||
{% if variant == 'info' %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-info flex-shrink-0 w-6 h-6"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path></svg>
|
||||
{% elif variant == 'success' %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-success flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
{% elif variant == 'warning' %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-warning flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" /></svg>
|
||||
{% elif variant == 'error' %}
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="stroke-error flex-shrink-0 h-6 w-6" fill="none" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 14l2-2m0 0l2-2m-2 2l-2-2m2 2l2 2m7-2a9 9 0 11-18 0 9 9 0 0118 0z" /></svg>
|
||||
{% endif %}
|
||||
|
||||
<div>
|
||||
{{ caller() }}
|
||||
</div>
|
||||
|
||||
{% if dismissible %}
|
||||
<button
|
||||
type="button"
|
||||
class="btn btn-ghost btn-sm btn-square"
|
||||
x-on:click="open = false"
|
||||
aria-label="Close"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M18 6 6 18"></path><path d="m6 6 12 12"></path></svg>
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro alert_title() %}
|
||||
<h5 class="font-medium text-base">
|
||||
{{ caller() }}
|
||||
</h5>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro alert_description() %}
|
||||
<div class="text-sm">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,15 @@
|
||||
{% macro button(variant='default', size='md', class='', type='button', disabled=False) %}
|
||||
<button
|
||||
type="{{ type }}"
|
||||
class="btn btn-{{ variant }} btn-{{ size }} {{ class }}"
|
||||
{% if disabled %}disabled{% endif %}
|
||||
>
|
||||
{{ caller() }}
|
||||
</button>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro button_link(href='#', variant='default', size='md', class='') %}
|
||||
<a href="{{ href }}" class="btn btn-{{ variant }} btn-{{ size }} {{ class }}">
|
||||
{{ caller() }}
|
||||
</a>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,35 @@
|
||||
{% macro card() %}
|
||||
<div class="card bg-base-100 shadow">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_header() %}
|
||||
<div class="card-body pt-6 pb-2">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_title(text='') %}
|
||||
<h3 class="card-title text-lg font-bold">
|
||||
{% if text %}{{ text }}{% else %}{{ caller() }}{% endif %}
|
||||
</h3>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_description(text='') %}
|
||||
<p class="text-sm opacity-70 mt-1">
|
||||
{% if text %}{{ text }}{% else %}{{ caller() }}{% endif %}
|
||||
</p>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_content() %}
|
||||
<div class="card-body py-4">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro card_footer() %}
|
||||
<div class="card-actions justify-end p-4 pt-0">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,44 @@
|
||||
{% macro input(
|
||||
type='text',
|
||||
name='',
|
||||
id='',
|
||||
value='',
|
||||
placeholder='',
|
||||
required=False,
|
||||
disabled=False,
|
||||
readonly=False,
|
||||
class='',
|
||||
min='',
|
||||
max='',
|
||||
step=''
|
||||
) %}
|
||||
<input
|
||||
type="{{ type }}"
|
||||
name="{{ name }}"
|
||||
id="{{ id or name }}"
|
||||
value="{{ value }}"
|
||||
placeholder="{{ placeholder }}"
|
||||
class="input input-bordered w-full {{ class }}"
|
||||
{% if required %}required{% endif %}
|
||||
{% if disabled %}disabled{% endif %}
|
||||
{% if readonly %}readonly{% endif %}
|
||||
{% if min %}min="{{ min }}"{% endif %}
|
||||
{% if max %}max="{{ max }}"{% endif %}
|
||||
{% if step %}step="{{ step }}"{% endif %}
|
||||
>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro label(for='', required=False, class='') %}
|
||||
<label
|
||||
for="{{ for }}"
|
||||
class="label"
|
||||
>
|
||||
<span class="label-text {{ class }}">{{ caller() }}{% if required %} <span class="text-error">*</span>{% endif %}</span>
|
||||
</label>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro form_group() %}
|
||||
<div class="form-control w-full mb-4">
|
||||
{{ caller() }}
|
||||
</div>
|
||||
{% endmacro %}
|
||||
@@ -0,0 +1,37 @@
|
||||
{% macro table(class='', zebra=True) %}
|
||||
<div class="overflow-x-auto">
|
||||
<table class="table {% if zebra %}table-zebra{% endif %} {{ class }}">
|
||||
{{ caller() }}
|
||||
</table>
|
||||
</div>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro thead() %}
|
||||
<thead>
|
||||
{{ caller() }}
|
||||
</thead>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro tbody() %}
|
||||
<tbody>
|
||||
{{ caller() }}
|
||||
</tbody>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro tr(class='') %}
|
||||
<tr class="{{ class }}">
|
||||
{{ caller() }}
|
||||
</tr>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro th(class='') %}
|
||||
<th class="{{ class }}">
|
||||
{{ caller() }}
|
||||
</th>
|
||||
{% endmacro %}
|
||||
|
||||
{% macro td(class='', colspan='', rowspan='') %}
|
||||
<td class="{{ class }}" {% if colspan %}colspan="{{ colspan }}"{% endif %} {% if rowspan %}rowspan="{{ rowspan }}"{% endif %}>
|
||||
{{ caller() }}
|
||||
</td>
|
||||
{% endmacro %}
|
||||
Reference in New Issue
Block a user