Show macro key sequences in the browser view and MCP replies
Beide Ansichten reichen jetzt die Makrotabelle an action_label() durch, so dass eine Makro-Belegung ihre echte Tastenfolge zeigt statt nur der Slot-Nummer -- dieselbe Darstellung wie im Desktop-Fenster. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
parent
f6f4edbdde
commit
aba81463e5
2 changed files with 6 additions and 2 deletions
|
|
@ -109,7 +109,7 @@ def render_page(profile):
|
||||||
cfg = vp.annotate_profile({
|
cfg = vp.annotate_profile({
|
||||||
"buttons": [dict(b) for b in raw["buttons"]],
|
"buttons": [dict(b) for b in raw["buttons"]],
|
||||||
"encoders": [dict(e) for e in raw["encoders"]],
|
"encoders": [dict(e) for e in raw["encoders"]],
|
||||||
})
|
}, combined.get("macros"))
|
||||||
tabs = "".join(
|
tabs = "".join(
|
||||||
f'<a class="tab {"active" if p == profile else ""}" href="/?profile={p}">{html.escape(combined["profile_names"][p])}</a>'
|
f'<a class="tab {"active" if p == profile else ""}" href="/?profile={p}">{html.escape(combined["profile_names"][p])}</a>'
|
||||||
for p in range(vp.NUM_PROFILES)
|
for p in range(vp.NUM_PROFILES)
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,11 @@ def _profile_switch_data(target):
|
||||||
|
|
||||||
|
|
||||||
def _describe_action(action):
|
def _describe_action(action):
|
||||||
return {"type": action["type"], "data": action["data"], "label": vp.action_label(action),
|
"""label zeigt bei Makros die echte Tastenfolge statt nur der
|
||||||
|
Slot-Nummer (gleiche Darstellung wie im Hauptfenster) -- die Makrotabelle
|
||||||
|
liegt im selben State, also kein Grund, hier weniger zu verraten."""
|
||||||
|
return {"type": action["type"], "data": action["data"],
|
||||||
|
"label": vp.action_label(action, _cfg().get("macros")),
|
||||||
"note": action.get("note", "")}
|
"note": action.get("note", "")}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue