Files
Paperwall/web/templates/settings_journey.html
T
Honey 684d706afc Remove the Departures screen
Not needed any more -- the Journey screen already covers the same
regional-transit need via EFA backends, and Departures depended on
the free db-vendo-client API that DB has been actively blocking third
parties from anyway.

Removed screens/departures.py, its settings template, its route, its
registration in screens/__init__.py, and its nav link. Reworded the
docstring/hint references in journey.py and settings_journey.html
that pointed at the now-gone screen. Existing config.json entries
referencing "departures" (rotation list, pinned screen) are harmless
leftovers -- both scheduler lookups already filter to screens that
still exist, so nothing needs a migration step.

Verified: app boots clean, /settings/departures 404s, every other
settings page still loads fine, no leftover references outside of
journey.py's own unrelated "departure time" wording.
2026-07-25 23:33:48 +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 stays reliable even when
one regional backend is down.
</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 %}