update
This commit is contained in:
@@ -548,6 +548,10 @@ class _OfficeShellV12:
|
||||
pass
|
||||
|
||||
self._update_license_label()
|
||||
try:
|
||||
self.bind_ai_budget_display()
|
||||
except Exception:
|
||||
pass
|
||||
try:
|
||||
app.after(2500, self._periodic_license_refresh)
|
||||
except Exception:
|
||||
@@ -732,6 +736,12 @@ class _OfficeShellV12:
|
||||
app.lbl_status.configure(bg=p["BG"], fg=p["SUBTLE"])
|
||||
except Exception:
|
||||
pass
|
||||
if getattr(self, "_ai_budget_lbl", None) is not None:
|
||||
try:
|
||||
fg = getattr(app, "_ai_budget_fg", None) or p["SUBTLE"]
|
||||
self._ai_budget_lbl.configure(bg=p["BG"], fg=fg)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if self._license_lbl is not None:
|
||||
try:
|
||||
@@ -1135,10 +1145,41 @@ class _OfficeShellV12:
|
||||
var = tk.StringVar(master=app, value="Bereit.")
|
||||
app.status_var = var
|
||||
|
||||
lbl = tk.Label(self._status_row_fr, textvariable=var, bg=p["BG"],
|
||||
fg=p["SUBTLE"], font=FONT_DEFAULT, anchor="w")
|
||||
lbl.pack(side="left")
|
||||
budget_var = getattr(app, "_ai_budget_var", None)
|
||||
if budget_var is None:
|
||||
budget_var = tk.StringVar(master=app, value="KI-Guthaben: prüft…")
|
||||
app._ai_budget_var = budget_var
|
||||
self._ai_budget_lbl = tk.Label(
|
||||
self._status_row_fr,
|
||||
textvariable=budget_var,
|
||||
bg=p["BG"],
|
||||
fg=p["SUBTLE"],
|
||||
font=("Segoe UI", 8),
|
||||
anchor="e",
|
||||
cursor="hand2",
|
||||
)
|
||||
self._ai_budget_lbl.pack(side="right", padx=(8, 0))
|
||||
|
||||
lbl = tk.Label(
|
||||
self._status_row_fr,
|
||||
textvariable=var,
|
||||
bg=p["BG"],
|
||||
fg=p["SUBTLE"],
|
||||
font=("Segoe UI", 8),
|
||||
anchor="w",
|
||||
)
|
||||
lbl.pack(side="left", fill="x", expand=True)
|
||||
app.lbl_status = lbl
|
||||
self._ai_budget_lbl.bind(
|
||||
"<Button-1>",
|
||||
lambda e: _safe_call(app, "_refresh_remote_ai_budget_async"),
|
||||
)
|
||||
app._ai_budget_status_lbl = self._ai_budget_lbl
|
||||
app._ai_budget_header_lbl = None
|
||||
try:
|
||||
app._log_ai_budget_ui("UI_PACKED", where="office_status_row")
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _build_main_fill(self):
|
||||
app = self.app
|
||||
@@ -1980,6 +2021,44 @@ class _OfficeShellV12:
|
||||
)
|
||||
self._footer_brand_sub.pack(anchor="w")
|
||||
|
||||
try:
|
||||
from aza_client_watermark import get_client_watermark_text
|
||||
|
||||
wm = get_client_watermark_text()
|
||||
except Exception:
|
||||
wm = "v?"
|
||||
self._build_watermark_lbl = tk.Label(
|
||||
self._footer_bar,
|
||||
text=wm,
|
||||
bg=p["BG"],
|
||||
fg=p["SUBTLE"],
|
||||
font=("Segoe UI", 8),
|
||||
anchor="e",
|
||||
)
|
||||
self._build_watermark_lbl.pack(side="right", anchor="se", padx=(8, 0))
|
||||
|
||||
def bind_ai_budget_display(self) -> None:
|
||||
"""Bindet KI-Guthaben-Label in der Statuszeile (idempotent)."""
|
||||
app = self.app
|
||||
if getattr(app, "_ai_budget_var", None) is None:
|
||||
app._ai_budget_var = tk.StringVar(master=app, value="KI-Guthaben: prüft…")
|
||||
lbl = getattr(self, "_ai_budget_lbl", None)
|
||||
if lbl is not None:
|
||||
app._ai_budget_status_lbl = lbl
|
||||
try:
|
||||
if not lbl.winfo_ismapped():
|
||||
lbl.pack(side="right", padx=(8, 0))
|
||||
except Exception:
|
||||
try:
|
||||
lbl.pack(side="right", padx=(8, 0))
|
||||
except Exception:
|
||||
pass
|
||||
app._ai_budget_header_lbl = None
|
||||
try:
|
||||
app.update_token_display()
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
def _periodic_license_refresh(self):
|
||||
try:
|
||||
self._update_license_label()
|
||||
|
||||
Reference in New Issue
Block a user