mirror of
https://github.com/db9979/uconsole_asw_game.git
synced 2026-12-05 20:34:16 +01:00
Merge pull request #8 from db9979/claude/project-thread-00u23h
Web: Mast direkt in der Sehrohrkarte ausfahren
This commit is contained in:
4 files changed
+15
-3
No files matched your search
@@ -194,7 +194,7 @@
|
||||
<section id="station-engine" class="station-section" data-station-role="engine" aria-labelledby="station-engine-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-engine-title" data-i18n="station_engine"></h2></div><div class="station-grid"><article class="station-card-view card-readout"><h3 data-i18n="station_propulsion"></h3><dl id="engine-propulsion" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="station_machinery"></h3><dl id="engine-machinery" class="detail-metrics"></dl></article><article class="station-card-view card-readout"><h3 data-i18n="station_environment_effects"></h3><dl id="engine-environment" class="detail-metrics"></dl></article><article class="station-card-view station-controls station-wide card-controls"><h3 data-i18n="engine_controls"></h3><label for="engine-telegraph" data-i18n="telegraph"></label><select id="engine-telegraph"></select><button id="engine-telegraph-submit" type="button" data-i18n="engine_order_telegraph"></button><form id="engine-course-form" class="control-form"><label for="engine-course" data-i18n="engine_course"></label><input id="engine-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="engine-course-submit" type="submit" data-i18n="engine_order_course"></button></form><form id="engine-speed-form" class="control-form"><label for="engine-speed" data-i18n="engine_speed"></label><input id="engine-speed" type="number" min="0" max="25" step="any" inputmode="decimal" autocomplete="off" required><button id="engine-speed-submit" type="submit" data-i18n="engine_order_speed"></button></form><button id="engine-quiet" type="button"></button><div class="fire-grid"><label for="engine-plant" data-i18n="engine_plant"></label><select id="engine-plant"><option value="AUTO" data-i18n="plant_auto"></option><option value="DIESEL" data-i18n="plant_diesel"></option><option value="TURBINE" data-i18n="plant_turbine"></option></select><button id="engine-plant-apply" type="button" data-i18n="engine_apply_plant"></button></div></article></div></section>
|
||||
<section id="station-helicopter" class="station-section" data-station-role="helicopter" aria-labelledby="station-helicopter-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-helicopter-title" data-i18n="station_helicopter"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="station_asset"></h3><dl id="helicopter-asset" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_readiness"></h3><dl id="helicopter-readiness" class="detail-metrics"></dl></article><article class="station-card-view"><h3 data-i18n="station_waypoint"></h3><dl id="helicopter-waypoint" class="detail-metrics"></dl><form id="helicopter-waypoint-form" class="control-form"><label for="helicopter-x" data-i18n="helicopter_x"></label><input id="helicopter-x" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><label for="helicopter-y" data-i18n="helicopter_y"></label><input id="helicopter-y" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="helicopter-waypoint-submit" type="submit" data-i18n="helicopter_set_waypoint"></button></form></article><article class="station-card-view station-controls"><h3 data-i18n="helicopter_controls"></h3><button id="helicopter-launch" type="button" data-i18n="helicopter_launch"></button><button id="helicopter-return" type="button" data-i18n="helicopter_return"></button><button id="helicopter-buoy" type="button" data-i18n="helicopter_buoy"></button><div class="fire-grid"><label for="helicopter-pattern" data-i18n="helicopter_pattern"></label><select id="helicopter-pattern"><option value="single" data-i18n="buoy_pattern_single"></option><option value="field" data-i18n="buoy_pattern_field"></option><option value="barrier" data-i18n="buoy_pattern_barrier"></option><option value="circle" data-i18n="buoy_pattern_circle"></option></select><button id="helicopter-pattern-apply" type="button" data-i18n="helicopter_apply_pattern"></button><button id="helicopter-mad" type="button"></button></div></article><article class="station-card-view station-wide direct-fire-controls" aria-labelledby="helicopter-fire-title"><h3 id="helicopter-fire-title" data-i18n="helicopter_release_control"></h3><div class="fire-grid"><label for="helicopter-fire-target" data-i18n="fire_target"></label><select id="helicopter-fire-target"></select><label for="helicopter-fire-depth" data-i18n="fire_depth"></label><input id="helicopter-fire-depth" type="number" min="10" max="300" step="any" inputmode="decimal" autocomplete="off"><button id="helicopter-fire-torpedo" type="button" data-fire-action="helicopter_launch_torpedo" data-i18n="helicopter_launch_torpedo"></button></div><p id="helicopter-fire-status" class="fire-status" role="status" aria-live="polite"></p></article><article class="station-card-view station-wide"><h3 data-i18n="buoys"></h3><div id="helicopter-buoys" class="station-list"></div></article></div></section>
|
||||
<section id="station-eloka" class="station-section" data-station-role="eloka" aria-labelledby="station-eloka-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="station_dashboard"></p><h2 id="station-eloka-title" data-i18n="station_eloka"></h2></div><div class="station-grid"><article class="station-card-view"><h3 data-i18n="eloka_hardware"></h3><dl id="eloka-hardware" class="metrics"></dl></article><article class="station-card-view station-controls station-wide"><h3 data-i18n="eloka_filters"></h3><label for="eloka-status-filter" data-i18n="eloka_filter_status"></label><select id="eloka-status-filter"><option value="OPERATIONAL" data-i18n="eloka_filter_operational"></option><option value="LIVE" data-i18n="eloka_filter_live"></option><option value="MEMORY" data-i18n="eloka_filter_memory"></option><option value="ALL" data-i18n="eloka_filter_all"></option></select><label for="eloka-threat-filter" data-i18n="eloka_filter_threat"></label><select id="eloka-threat-filter"><option value="ALL" data-i18n="eloka_filter_all"></option><option value="LOW" data-i18n="eloka_threat_low"></option><option value="MEDIUM" data-i18n="eloka_threat_medium"></option><option value="HIGH" data-i18n="eloka_threat_high"></option><option value="CRITICAL" data-i18n="eloka_threat_critical"></option></select><label for="eloka-band-filter" data-i18n="eloka_filter_band"></label><select id="eloka-band-filter"><option value="ALL" data-i18n="eloka_filter_all"></option><option value="a_c">A/C</option><option value="d">D</option><option value="e_f">E/F</option><option value="g_h">G/H</option><option value="i_j">I/J</option><option value="k">K</option></select><output id="eloka-filter-count" aria-live="polite"></output></article><article class="station-card-view station-wide"><h3 data-i18n="station_intercepts"></h3><div id="eloka-intercepts" class="station-list"></div></article></div></section>
|
||||
<section id="station-uboot" class="station-section" data-station-role="uboot" aria-labelledby="station-uboot-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="uboot_side"></p><h2 id="station-uboot-title" data-i18n="station_uboot"></h2></div><div class="station-grid uboot-grid"><article class="station-card-view station-wide uboot-strip" data-uboot-stations="uboot uboot_weapons uboot_engine uboot_esm uboot_nav"><div id="uboot-readouts" class="uboot-readouts"></div><div id="uboot-chips" class="uboot-chips" aria-live="polite"></div><p id="uboot-battery-warning" class="station-alert" role="status" hidden></p><p id="uboot-nav-warning" class="station-alert" role="status" hidden></p></article><article class="station-card-view uboot-depth-card" data-uboot-stations="uboot uboot_nav uboot_engine"><h3 data-i18n="uboot_depth_title"></h3><canvas id="uboot-depth-canvas" class="uboot-canvas" data-i18n-aria="uboot_depth_title"></canvas><div class="uboot-presets" role="group" data-i18n-aria="uboot_depth_presets" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-depth-preset="periscope" data-i18n="uboot_preset_periscope"></button><button type="button" data-uboot-depth-preset="snorkel" data-i18n="uboot_preset_snorkel"></button><button type="button" data-uboot-depth-preset="above_layer" data-i18n="uboot_preset_above_layer"></button><button type="button" data-uboot-depth-preset="below_layer" data-i18n="uboot_preset_below_layer"></button><button type="button" data-uboot-depth-preset="deep" data-i18n="uboot_preset_deep"></button></div><form id="uboot-depth-form" class="control-form" data-uboot-stations="uboot uboot_nav"><label for="uboot-depth" data-i18n="uboot_depth"></label><input id="uboot-depth" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-depth-submit" type="submit" data-i18n="uboot_order_depth"></button></form><div class="uboot-pair" role="group" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-mode="uboot_bottom" data-enabled="true" data-i18n="uboot_bottom_on"></button><button type="button" data-uboot-mode="uboot_bottom" data-enabled="false" data-i18n="uboot_bottom_off"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_nav"><h3 data-i18n="uboot_nav_title"></h3><form id="uboot-course-form" class="control-form"><label for="uboot-course" data-i18n="uboot_course"></label><input id="uboot-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-course-submit" type="submit" data-i18n="uboot_order_course"></button></form><dl id="uboot-navigation" class="detail-metrics compact-metrics"></dl><div class="uboot-pair" role="group" data-uboot-stations="uboot"><button id="uboot-ping" type="button" data-i18n="uboot_ping"></button><button id="uboot-bt" type="button" data-i18n="uboot_bt"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_engine"><h3 data-i18n="uboot_plant"></h3><div class="uboot-telegraph" role="group" data-i18n-aria="uboot_telegraph"><button type="button" data-uboot-speed-step="0"></button><button type="button" data-uboot-speed-step="1"></button><button type="button" data-uboot-speed-step="2"></button><button type="button" data-uboot-speed-step="3"></button><button type="button" data-uboot-speed-step="4"></button><button type="button" data-uboot-speed-step="5"></button></div><form id="uboot-speed-form" class="control-form"><label for="uboot-speed" data-i18n="uboot_speed"></label><input id="uboot-speed" type="number" min="0" max="40" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-speed-submit" type="submit" data-i18n="uboot_order_speed"></button></form><div class="uboot-pair" role="group"><button type="button" data-uboot-mode="uboot_silent" data-enabled="true" data-i18n="uboot_silent_on"></button><button type="button" data-uboot-mode="uboot_silent" data-enabled="false" data-i18n="uboot_silent_off"></button></div><div class="uboot-pair" role="group" data-uboot-stations="uboot_engine"><button type="button" data-uboot-mode="uboot_snorkel" data-enabled="true" data-i18n="uboot_snorkel_on"></button><button type="button" data-uboot-mode="uboot_snorkel" data-enabled="false" data-i18n="uboot_snorkel_off"></button></div><button id="uboot-blow" type="button" class="danger" data-i18n="uboot_blow"></button><dl id="uboot-status" class="detail-metrics compact-metrics"></dl></article><article class="station-card-view station-controls card-controls uboot-esm-card" data-uboot-stations="uboot uboot_esm"><h3 data-i18n="uboot_esm"></h3><div class="uboot-pair" role="group" data-uboot-stations="uboot_esm"><button type="button" data-uboot-mode="uboot_mast" data-enabled="true" data-i18n="uboot_mast_on"></button><button type="button" data-uboot-mode="uboot_mast" daLine truncated
|
||||
<section id="station-uboot" class="station-section" data-station-role="uboot" aria-labelledby="station-uboot-title" hidden><div class="station-heading"><p class="eyebrow" data-i18n="uboot_side"></p><h2 id="station-uboot-title" data-i18n="station_uboot"></h2></div><div class="station-grid uboot-grid"><article class="station-card-view station-wide uboot-strip" data-uboot-stations="uboot uboot_weapons uboot_engine uboot_esm uboot_nav"><div id="uboot-readouts" class="uboot-readouts"></div><div id="uboot-chips" class="uboot-chips" aria-live="polite"></div><p id="uboot-battery-warning" class="station-alert" role="status" hidden></p><p id="uboot-nav-warning" class="station-alert" role="status" hidden></p></article><article class="station-card-view uboot-depth-card" data-uboot-stations="uboot uboot_nav uboot_engine"><h3 data-i18n="uboot_depth_title"></h3><canvas id="uboot-depth-canvas" class="uboot-canvas" data-i18n-aria="uboot_depth_title"></canvas><div class="uboot-presets" role="group" data-i18n-aria="uboot_depth_presets" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-depth-preset="periscope" data-i18n="uboot_preset_periscope"></button><button type="button" data-uboot-depth-preset="snorkel" data-i18n="uboot_preset_snorkel"></button><button type="button" data-uboot-depth-preset="above_layer" data-i18n="uboot_preset_above_layer"></button><button type="button" data-uboot-depth-preset="below_layer" data-i18n="uboot_preset_below_layer"></button><button type="button" data-uboot-depth-preset="deep" data-i18n="uboot_preset_deep"></button></div><form id="uboot-depth-form" class="control-form" data-uboot-stations="uboot uboot_nav"><label for="uboot-depth" data-i18n="uboot_depth"></label><input id="uboot-depth" type="number" min="0" max="1000" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-depth-submit" type="submit" data-i18n="uboot_order_depth"></button></form><div class="uboot-pair" role="group" data-uboot-stations="uboot uboot_nav"><button type="button" data-uboot-mode="uboot_bottom" data-enabled="true" data-i18n="uboot_bottom_on"></button><button type="button" data-uboot-mode="uboot_bottom" data-enabled="false" data-i18n="uboot_bottom_off"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_nav"><h3 data-i18n="uboot_nav_title"></h3><form id="uboot-course-form" class="control-form"><label for="uboot-course" data-i18n="uboot_course"></label><input id="uboot-course" type="number" min="0" max="359.99999999999994" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-course-submit" type="submit" data-i18n="uboot_order_course"></button></form><dl id="uboot-navigation" class="detail-metrics compact-metrics"></dl><div class="uboot-pair" role="group" data-uboot-stations="uboot"><button id="uboot-ping" type="button" data-i18n="uboot_ping"></button><button id="uboot-bt" type="button" data-i18n="uboot_bt"></button></div></article><article class="station-card-view station-controls card-controls" data-uboot-stations="uboot uboot_engine"><h3 data-i18n="uboot_plant"></h3><div class="uboot-telegraph" role="group" data-i18n-aria="uboot_telegraph"><button type="button" data-uboot-speed-step="0"></button><button type="button" data-uboot-speed-step="1"></button><button type="button" data-uboot-speed-step="2"></button><button type="button" data-uboot-speed-step="3"></button><button type="button" data-uboot-speed-step="4"></button><button type="button" data-uboot-speed-step="5"></button></div><form id="uboot-speed-form" class="control-form"><label for="uboot-speed" data-i18n="uboot_speed"></label><input id="uboot-speed" type="number" min="0" max="40" step="any" inputmode="decimal" autocomplete="off" required><button id="uboot-speed-submit" type="submit" data-i18n="uboot_order_speed"></button></form><div class="uboot-pair" role="group"><button type="button" data-uboot-mode="uboot_silent" data-enabled="true" data-i18n="uboot_silent_on"></button><button type="button" data-uboot-mode="uboot_silent" data-enabled="false" data-i18n="uboot_silent_off"></button></div><div class="uboot-pair" role="group" data-uboot-stations="uboot_engine"><button type="button" data-uboot-mode="uboot_snorkel" data-enabled="true" data-i18n="uboot_snorkel_on"></button><button type="button" data-uboot-mode="uboot_snorkel" data-enabled="false" data-i18n="uboot_snorkel_off"></button></div><button id="uboot-blow" type="button" class="danger" data-i18n="uboot_blow"></button><dl id="uboot-status" class="detail-metrics compact-metrics"></dl></article><article class="station-card-view station-controls card-controls uboot-esm-card" data-uboot-stations="uboot uboot_esm"><h3 data-i18n="uboot_esm"></h3><div class="uboot-pair" role="group" data-uboot-stations="uboot_esm"><button type="button" data-uboot-mode="uboot_mast" data-enabled="true" data-i18n="uboot_mast_on"></button><button type="button" data-uboot-mode="uboot_mast" daLine truncated
|
||||
</section>
|
||||
</div>
|
||||
</aside>
|
||||
|
||||
+1
-1
@@ -902,7 +902,7 @@
|
||||
"commander.web.uboot_esm_none": "Kein Radar erfasst.",
|
||||
"commander.web.uboot_esm_mast_down": "Mast eingefahren: kein ESM.",
|
||||
"commander.web.uboot_scope_title": "Sehrohr",
|
||||
"commander.web.uboot_scope_mast_down": "Mast eingefahren: kein Sehrohrbild.",
|
||||
"commander.web.uboot_scope_mast_down": "Mast eingefahren: kein Sehrohrbild. Die Station Mast & ESM fährt den Mast aus.",
|
||||
"commander.web.uboot_scope_bearing": "Sichtlinie {bearing}° (relativ {relative}°)",
|
||||
"commander.web.uboot_scope_conditions": "{light} · Sicht {visibility} NM · Seegang {sea}",
|
||||
"commander.web.uboot_scope_day": "Tag",
|
||||
|
||||
+1
-1
@@ -902,7 +902,7 @@
|
||||
"commander.web.uboot_esm_none": "No radar intercepted.",
|
||||
"commander.web.uboot_esm_mast_down": "Mast down: no ESM.",
|
||||
"commander.web.uboot_scope_title": "Periscope",
|
||||
"commander.web.uboot_scope_mast_down": "Mast down: no periscope view.",
|
||||
"commander.web.uboot_scope_mast_down": "Mast down: no periscope view. The Mast & ESM station raises the mast.",
|
||||
"commander.web.uboot_scope_bearing": "Line of sight {bearing}° (relative {relative}°)",
|
||||
"commander.web.uboot_scope_conditions": "{light} · visibility {visibility} NM · sea state {sea}",
|
||||
"commander.web.uboot_scope_day": "Day",
|
||||
|
||||
@@ -202,3 +202,15 @@ def test_periscope_view_trains_and_reads_the_stadimeter_in_the_browser(tmp_path,
|
||||
assert {row[0] for row in applied} == {"uboot_mast", "uboot_scope_bearing", "uboot_scope_mark"}
|
||||
assert all(row[2] == "uboot_esm" and row[3] is True for row in applied)
|
||||
assert "\u00b0\u00b0" not in root.get("data-status", "")
|
||||
|
||||
|
||||
def test_periscope_card_offers_the_mast_to_its_owner_and_names_it_for_command():
|
||||
html = index_html()
|
||||
card = html[html.index('class="station-card-view station-wide uboot-scope-card"'):]
|
||||
card = card[:card.index("</article>")]
|
||||
# The Mast & ESM station raises the mast from the periscope card itself.
|
||||
assert 'data-uboot-stations="uboot_esm"><button type="button" data-uboot-mode="uboot_mast" data-enabled="true"' in card
|
||||
assert 'data-uboot-mode="uboot_mast" data-enabled="false"' in card
|
||||
# Command sees the periscope but does not own the mast: the hint names the station.
|
||||
for catalog in catalogs():
|
||||
assert "ESM" in catalog["commander.web.uboot_scope_mast_down"]
|
||||
Reference in new issue
Block a user