04/30 Web Checker web app ver. 1.0

This commit is contained in:
2026-04-30 17:15:56 -04:00
parent feb8e5051c
commit cd63d5a020
39 changed files with 8031 additions and 1 deletions
+85
View File
@@ -0,0 +1,85 @@
{% extends "base.html" %}
{% block title %}Settings — Website Checker{% endblock %}
{% block content %}
<div class="page-header"><h1 class="page-title">Application Settings</h1></div>
<div class="settings-grid">
<!-- Email Settings -->
<div class="card">
<div class="card-header"><h2 class="card-title">📧 Email Report Settings</h2></div>
<form method="post" action="{{ url_for('admin_settings.save_email') }}">
<div class="modal-body">
<div class="form-group">
<label class="form-label">Enable Email Reports</label>
<select class="form-control" name="email_enabled">
<option value="1" {{ 'selected' if email.get('email.enabled')=='1' }}>Enabled</option>
<option value="0" {{ 'selected' if email.get('email.enabled')!='1' }}>Disabled</option>
</select>
</div>
<div class="form-group">
<label class="form-label">SMTP Host</label>
<input class="form-control" name="email_smtp_host" value="{{ email.get('email.smtp_host','') }}">
</div>
<div class="form-row">
<div class="form-group flex-1">
<label class="form-label">Port</label>
<input class="form-control" name="email_smtp_port" value="{{ email.get('email.smtp_port','587') }}">
</div>
<div class="form-group flex-1">
<label class="form-label">Security</label>
<select class="form-control" name="email_security">
{% for mode in ['starttls','ssl','none'] %}
<option {{ 'selected' if email.get('email.security')==mode }}>{{ mode }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="form-group">
<label class="form-label">SMTP Username</label>
<input class="form-control" name="email_smtp_user" value="{{ email.get('email.smtp_user','') }}">
</div>
<div class="form-group">
<label class="form-label">SMTP Password</label>
<input class="form-control" type="password" name="email_smtp_password" placeholder="(unchanged)">
</div>
<div class="form-group">
<label class="form-label">Recipients (comma-separated)</label>
<input class="form-control" name="email_recipients" value="{{ email.get('email.recipients','') }}">
</div>
<div class="form-group">
<label class="form-label">Send Time (HH:MM)</label>
<input class="form-control" type="time" name="email_send_time" value="{{ email.get('email.send_time','08:00') }}">
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit">Save Email Settings</button>
</div>
</form>
</div>
<!-- Groq / AI Settings -->
<div class="card">
<div class="card-header"><h2 class="card-title">🤖 Groq AI Settings</h2></div>
<form method="post" action="{{ url_for('admin_settings.save_groq') }}">
<div class="modal-body">
<div class="form-group">
<label class="form-label">Groq API Key</label>
<input class="form-control" type="password" name="groq_api_key"
placeholder="{{ '(key set)' if groq.get('groq.api_key') else 'Enter API key' }}">
</div>
<div class="form-group">
<label class="form-label">Default Model</label>
<select class="form-control" name="groq_model">
{% for m in ['llama-3.3-70b-versatile','llama-3.1-8b-instant','gemma2-9b-it'] %}
<option {{ 'selected' if groq.get('groq.model')==m }}>{{ m }}</option>
{% endfor %}
</select>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary" type="submit">Save AI Settings</button>
</div>
</form>
</div>
</div>
{% endblock %}