Files
Paperwall/web/templates/settings_journey.html
T
Honey 06b90ffe6c Journey: add regional-only filter and service notices
- connection_type setting (all/regional/long_distance) restricts EFA
  trip requests via inclMOT_N params, so ICE/IC/EC can be filtered out
  for commutes that only care about regional/local transit.
- Surface leg.infos[].infoLinks titles (real disruption/outage notices
  from EFA) on each journey row, marked with a red warning icon.
2026-07-23 09:51:52 +02:00

69 lines
2.9 KiB
HTML

{% extends "base.html" %}
{% block content %}
<h1>Journey</h1>
{% if error %}
<div class="toast error">{{ error }}</div>
{% endif %}
{% if request.args.get('found') %}
<div class="toast">Found: {{ request.args.get('found') }}</div>
{% endif %}
<p class="hint" style="margin: -0.5rem 0 1.25rem;">
Next connections for a fixed route -- your daily commute, say. Uses
regional EFA transit-planner backends (not Deutsche Bahn's own
infrastructure, which has been actively blocking third-party access
lately) -- several are tried in order, so this can work even when the
Departures screen's DB-based source can't.
</p>
<form method="post">
<div class="card">
<div class="section-label">Route</div>
<div class="field">
<label for="origin">From</label>
<input type="text" id="origin" name="origin" placeholder="e.g. Münster Hauptbahnhof">
{% if settings.origin_label %}
<p class="hint">Currently: {{ settings.origin_label }}</p>
{% endif %}
</div>
<div class="field">
<label for="destination">To</label>
<input type="text" id="destination" name="destination" placeholder="e.g. Dortmund Hauptbahnhof">
{% if settings.destination_label %}
<p class="hint">Currently: {{ settings.destination_label }}</p>
{% endif %}
</div>
<p class="hint">Leave either field empty to keep what's already saved and just change the options below.</p>
</div>
<div class="card">
<div class="section-label">Display</div>
<div class="field">
<label for="results">Connections to show</label>
<select id="results" name="results">
<option value="1" {{ "selected" if settings.results == 1 }}>1</option>
<option value="2" {{ "selected" if settings.results == 2 }}>2</option>
<option value="3" {{ "selected" if settings.results == 3 or not settings.results }}>3</option>
<option value="5" {{ "selected" if settings.results == 5 }}>5</option>
</select>
</div>
<div class="field">
<label for="update_minutes">Update every (minutes)</label>
<input type="number" id="update_minutes" name="update_minutes" min="1" value="{{ settings.update_minutes or 2 }}">
</div>
<div class="field">
<label for="connection_type">Connections</label>
<select id="connection_type" name="connection_type">
<option value="all" {{ "selected" if settings.connection_type == "all" or not settings.connection_type }}>All</option>
<option value="regional" {{ "selected" if settings.connection_type == "regional" }}>Regional only (no ICE/IC/EC)</option>
<option value="long_distance" {{ "selected" if settings.connection_type == "long_distance" }}>Long-distance only (ICE/IC/EC)</option>
</select>
<p class="hint">"Regional only" hides ICE/IC/EC long-distance trains -- just S-Bahn, regional trains, buses, trams etc.</p>
</div>
</div>
<button type="submit">Save</button>
</form>
{% endblock %}