feat: add floating quick task flow
This commit is contained in:
@@ -97,6 +97,10 @@
|
||||
{% endfor %}
|
||||
</nav>
|
||||
|
||||
<button type="button" class="fab-quick-task" id="quickTaskOpen" aria-label="Schnellaufgabe anlegen">
|
||||
{{ nav_icon('plus') }}
|
||||
</button>
|
||||
|
||||
<dialog class="complete-dialog" id="completeDialog">
|
||||
<form method="dialog" class="complete-dialog__surface">
|
||||
<p class="eyebrow">Punkte fair verbuchen</p>
|
||||
@@ -110,6 +114,27 @@
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<dialog class="complete-dialog" id="quickTaskDialog">
|
||||
<form method="post" action="{{ url_for('tasks.quick_create') }}" class="complete-dialog__surface complete-dialog__surface--task">
|
||||
{{ quick_task_form.hidden_tag() }}
|
||||
<p class="eyebrow">Schnellaufgabe</p>
|
||||
<h2>Direkt etwas für dich anlegen</h2>
|
||||
<p class="muted">Titel und Aufwand reichen. Die Aufgabe wird automatisch dir zugewiesen und auf heute gesetzt.</p>
|
||||
<div class="field">
|
||||
{{ quick_task_form.title.label }}
|
||||
{{ quick_task_form.title(placeholder="Zum Beispiel: Küche kurz aufräumen") }}
|
||||
</div>
|
||||
<div class="field">
|
||||
{{ quick_task_form.effort.label }}
|
||||
{{ quick_task_form.effort() }}
|
||||
</div>
|
||||
<div class="dialog-actions">
|
||||
{{ quick_task_form.submit(class_='button') }}
|
||||
<button type="button" class="button button--ghost" id="quickTaskClose">Abbrechen</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<form method="post" class="sr-only" id="completeDialogForm">
|
||||
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}">
|
||||
<input type="hidden" name="completed_for" value="me" id="completeDialogChoice">
|
||||
|
||||
@@ -163,5 +163,57 @@
|
||||
{% endfor %}
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<section class="panel">
|
||||
<p class="eyebrow">Admin</p>
|
||||
<h2>Schnellaufgabe-Punkte</h2>
|
||||
<p class="muted">Diese Werte erscheinen direkt im Schnellaufgaben-Dialog hinter den Aufwand-Stufen.</p>
|
||||
<form method="post" action="{{ url_for('settings.update_quick_task_config') }}" class="badge-settings">
|
||||
{{ quick_task_config_form.hidden_tag() }}
|
||||
<div class="badge-setting-card">
|
||||
<div>
|
||||
<strong>Schnell</strong>
|
||||
<p class="muted">Kleine Sache für zwischendurch.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{ quick_task_config_form.fast_points.label }}
|
||||
{{ quick_task_config_form.fast_points(value=quick_task_config['fast']['points']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="badge-setting-card">
|
||||
<div>
|
||||
<strong>Normal</strong>
|
||||
<p class="muted">Typische Alltagssache.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{ quick_task_config_form.normal_points.label }}
|
||||
{{ quick_task_config_form.normal_points(value=quick_task_config['normal']['points']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="badge-setting-card">
|
||||
<div>
|
||||
<strong>Dauert etwas</strong>
|
||||
<p class="muted">Braucht etwas mehr Zeit oder Konzentration.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{ quick_task_config_form.medium_points.label }}
|
||||
{{ quick_task_config_form.medium_points(value=quick_task_config['medium']['points']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="badge-setting-card">
|
||||
<div>
|
||||
<strong>Aufwendig</strong>
|
||||
<p class="muted">Spürbarer Aufwand mit mehr Punkten.</p>
|
||||
</div>
|
||||
<div class="field">
|
||||
{{ quick_task_config_form.heavy_points.label }}
|
||||
{{ quick_task_config_form.heavy_points(value=quick_task_config['heavy']['points']) }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="field field--full">
|
||||
{{ quick_task_config_form.submit(class_='button button--secondary') }}
|
||||
</div>
|
||||
</form>
|
||||
</section>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user