refactor(gui): Fix scoping issues and restore missing _render_discussion_tab
This commit is contained in:
+33
-32
@@ -1244,6 +1244,8 @@ class App:
|
||||
with imscope.style_color(imgui.Col_.text, vec4(80, 255, 80)) if is_nerv else nullcontext():
|
||||
markdown_helper.render(content, context_id=f'prior_disc_{idx}')
|
||||
imgui.separator()
|
||||
|
||||
def _render_discussion_selector(self) -> None:
|
||||
if not imgui.collapsing_header("Discussions", imgui.TreeNodeFlags_.default_open): return
|
||||
names = self._get_discussion_names(); grouped = {}
|
||||
for name in names:
|
||||
@@ -2742,39 +2744,38 @@ class App:
|
||||
# Render soft shadow behind the modal
|
||||
shaders.draw_soft_shadow(imgui.get_background_draw_list(), p_min, p_max, imgui.ImVec4(0, 0, 0, 0.6), 25.0, 6.0)
|
||||
|
||||
if not self._show_track_proposal_modal:
|
||||
imgui.close_current_popup()
|
||||
imgui.end_popup()
|
||||
return
|
||||
imgui.text_colored(C_IN, "Proposed Implementation Tracks")
|
||||
imgui.separator()
|
||||
if not self.proposed_tracks:
|
||||
imgui.text("No tracks generated.")
|
||||
if self._show_track_proposal_modal:
|
||||
imgui.text_colored(C_IN, "Proposed Implementation Tracks")
|
||||
imgui.separator()
|
||||
if not self.proposed_tracks:
|
||||
imgui.text("No tracks generated.")
|
||||
else:
|
||||
for idx, track in enumerate(self.proposed_tracks):
|
||||
# Title Edit
|
||||
changed_t, new_t = imgui.input_text(f"Title##{idx}", track.get('title', ''))
|
||||
if changed_t:
|
||||
track['title'] = new_t
|
||||
# Goal Edit
|
||||
changed_g, new_g = imgui.input_text_multiline(f"Goal##{idx}", track.get('goal', ''), imgui.ImVec2(-1, 60))
|
||||
if changed_g:
|
||||
track['goal'] = new_g
|
||||
# Buttons
|
||||
if imgui.button(f"Remove##{idx}"):
|
||||
self.proposed_tracks.pop(idx)
|
||||
break
|
||||
imgui.same_line()
|
||||
if imgui.button(f"Start This Track##{idx}"):
|
||||
self._cb_start_track(idx)
|
||||
imgui.separator()
|
||||
if imgui.button("Accept", imgui.ImVec2(120, 0)):
|
||||
self._cb_accept_tracks()
|
||||
self._show_track_proposal_modal = False
|
||||
imgui.close_current_popup()
|
||||
imgui.same_line()
|
||||
if imgui.button("Cancel", imgui.ImVec2(120, 0)):
|
||||
self._show_track_proposal_modal = False
|
||||
imgui.close_current_popup()
|
||||
else:
|
||||
for idx, track in enumerate(self.proposed_tracks):
|
||||
# Title Edit
|
||||
changed_t, new_t = imgui.input_text(f"Title##{idx}", track.get('title', ''))
|
||||
if changed_t:
|
||||
track['title'] = new_t
|
||||
# Goal Edit
|
||||
changed_g, new_g = imgui.input_text_multiline(f"Goal##{idx}", track.get('goal', ''), imgui.ImVec2(-1, 60))
|
||||
if changed_g:
|
||||
track['goal'] = new_g
|
||||
# Buttons
|
||||
if imgui.button(f"Remove##{idx}"):
|
||||
self.proposed_tracks.pop(idx)
|
||||
break
|
||||
imgui.same_line()
|
||||
if imgui.button(f"Start This Track##{idx}"):
|
||||
self._cb_start_track(idx)
|
||||
imgui.separator()
|
||||
if imgui.button("Accept", imgui.ImVec2(120, 0)):
|
||||
self._cb_accept_tracks()
|
||||
self._show_track_proposal_modal = False
|
||||
imgui.close_current_popup()
|
||||
imgui.same_line()
|
||||
if imgui.button("Cancel", imgui.ImVec2(120, 0)):
|
||||
self._show_track_proposal_modal = False
|
||||
imgui.close_current_popup()
|
||||
imgui.end_popup()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user