From 95600cf6da1c6fbd5ee9f1a5de57b17503d4fe9c Mon Sep 17 00:00:00 2001 From: Tom van der Lee Date: Tue, 30 Jun 2026 22:23:27 +0200 Subject: Filter based on subdomains --- src/components/App/App.tsx | 15 +- src/components/RequestList/RequestList.tsx | 50 +- src/contexts/Connection.tsx | 2 +- ttun/__main__.py | 7 +- ttun/client.py | 8 +- ttun/types.py | 2 +- uv.lock | 734 ++++++++++++------------- yarn.lock | 840 ++++++++++++++++------------- 8 files changed, 887 insertions(+), 771 deletions(-) diff --git a/src/components/App/App.tsx b/src/components/App/App.tsx index 85119e6..2c8025d 100644 --- a/src/components/App/App.tsx +++ b/src/components/App/App.tsx @@ -1,5 +1,5 @@ import * as React from "react"; -import { ReactElement, useContext, useEffect } from "react"; +import { ReactElement, useContext, useEffect, useState } from "react"; import styles from "~/components/App/App.module.scss"; import RequestDetails from "~/components/RequestDetails/RequestDetails"; @@ -28,9 +28,9 @@ type ReadyStateMap = { }; const statusIconMap: ReadyStateMap = { - [ReadyState.CONNECTING]: "🔴", + [ReadyState.CONNECTING]: "🟠", [ReadyState.OPEN]: "🟢", - [ReadyState.CLOSING]: "🔴", + [ReadyState.CLOSING]: "🟠", [ReadyState.CLOSED]: "🔴", }; @@ -47,9 +47,9 @@ export default function App() { useContext(ConnectionContext); useEffect(() => { - const url = new URL(config?.url ?? "https://loading..."); + const url = new URL(config?.urls[0] ?? "https://loading..."); document.title = `${statusIconMap[readyState]} ${url.host} | TTUN`; - }, [readyState, config?.url]); + }, [readyState, config?.urls]); const settingsMenu: (SettingsMenu | null)[] = [ { @@ -80,11 +80,6 @@ export default function App() {
- - - {config.url} - -