MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / __init__

Method __init__

gui/utils.py:347–387  ·  view source on GitHub ↗
(self, parent)

Source from the content-addressed store, hash-verified

345 """
346
347 def __init__(self, parent):
348 super().__init__(
349 parent,
350 height=32,
351 fg_color=COLORS["bg_medium"],
352 corner_radius=0,
353 )
354
355 # Prevent frame from shrinking
356 self.pack_propagate(False)
357
358 # Left - status text
359 self.status_label = ctk.CTkLabel(
360 self,
361 text=get_text("statusbar_ready"),
362 font=ctk.CTkFont(family=FONTS["family"], size=FONTS["size_small"]),
363 text_color=COLORS["text_secondary"],
364 )
365 self.status_label.pack(side="left", padx=15)
366
367 # Right - port info
368 self.port_label = ctk.CTkLabel(
369 self,
370 text="",
371 font=ctk.CTkFont(family=FONTS["family"], size=FONTS["size_small"]),
372 text_color=COLORS["text_secondary"],
373 )
374 self.port_label.pack(side="right", padx=15)
375
376 # Uptime (next to port)
377 self.uptime_label = ctk.CTkLabel(
378 self,
379 text="",
380 font=ctk.CTkFont(family=FONTS["family_mono"], size=FONTS["size_small"]),
381 text_color=COLORS["success"],
382 )
383 self.uptime_label.pack(side="right", padx=(0, 20))
384
385 # Uptime tracking
386 self._start_time: Optional[float] = None
387 self._uptime_job = None
388
389 def set_status(self, status: str) -> None:
390 """Set the status text."""

Callers

nothing calls this directly

Calls 2

get_textFunction · 0.85
__init__Method · 0.45

Tested by

no test coverage detected