Skip to content

Commit ca15bc1

Browse files
changed function add manual rule and remove manual rule to support adding policy while adding a new manual rule. changed HTML, rebuild css.
1 parent 4301c87 commit ca15bc1

File tree

3 files changed

+171
-39
lines changed

3 files changed

+171
-39
lines changed

dockflare/app/static/css/output.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dockflare/app/templates/status_page.html

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,7 @@ <h2 class="card-title text-2xl sm:text-3xl border-b border-base-300 pb-3 mb-6">
323323
</td>
324324
<td class="p-3 whitespace-nowrap text-sm" style="min-width: 80px;">
325325
{% if details.source == 'manual' %}
326-
<form action="{{ url_for('web.ui_delete_manual_rule_route', hostname=hostname) }}" method="post" onsubmit="return confirm('Are you sure you want to delete the manual rule for {{ hostname }}?');" class="protocol-aware-form">
326+
<form action="{{ url_for('web.ui_delete_manual_rule_route', rule_key_from_url=rule_key) }}" method="post" onsubmit="return confirm('Are you sure you want to delete the manual rule for {{ hostname }}?');" class="protocol-aware-form">
327327
<button type="submit" class="btn btn-xs btn-error btn-outline">Delete</button>
328328
</form>
329329
{% else %}
@@ -490,7 +490,26 @@ <h4 class="text-md font-semibold mb-2">Service</h4>
490490
</div>
491491
</div>
492492
</div>
493-
<div class="space-y-4 pt-4 border-t border-base-300">
493+
<div>
494+
<h4 class="text-md font-semibold mb-2">Access Policy (Optional)</h4>
495+
<div class="grid grid-cols-1 md:grid-cols-2 gap-4 items-start">
496+
<div>
497+
<label class="label" for="manual_access_policy_type"><span class="label-text">Policy Type</span></label>
498+
<select name="manual_access_policy_type" id="manual_access_policy_type" class="select select-bordered w-full policy-type-select">
499+
<option value="none" selected>None (Public - No App)</option>
500+
<option value="bypass">Bypass (Public App)</option>
501+
<option value="authenticate_email">Authenticate by Email</option>
502+
<option value="default_tld">Use Default *.tld Policy</option>
503+
</select>
504+
</div>
505+
<div class="auth-email-field hidden md:col-span-1">
506+
<label class="label" for="manual_auth_email"><span class="label-text">Allowed Email(s) or Domain(s)</span></label>
507+
<input type="text" id="manual_auth_email" name="manual_auth_email" placeholder="[email protected], @domain.com" class="input input-bordered w-full" />
508+
<div class="text-xs opacity-60 mt-1">Comma-separated. e.g., [email protected], @another.org</div>
509+
</div>
510+
</div>
511+
</div>
512+
<div class="space-y-4 pt-4 border-t border-base-300 mt-6">
494513
<div>
495514
<label class="label" for="manual_zone_name_override"><span class="label-text">Cloudflare Zone Name (Override/Specific)</span></label>
496515
<input type="text" id="manual_zone_name_override" name="manual_zone_name_override" placeholder="yourdomain.com (if different from Domain Name or CF_ZONE_ID)" class="input input-bordered w-full" />

0 commit comments

Comments
 (0)