windows: the app's Telegram proxy page
tg-ws-proxy on or off and its state; its tg:// links, to copy or open in Telegram (none without the secrets scope, and the page says so); whether other devices may connect; its port and fake-TLS domain (which adds the ee link). Long links are cut short rather than widening the page. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
c9ce7a1982
commit
7dfb3129f4
4 files changed
+170
-3
No files matched your search
@@ -3,6 +3,7 @@
|
||||
|
||||
mod dpi;
|
||||
mod overview;
|
||||
mod telegram;
|
||||
mod widgets;
|
||||
|
||||
use gpui_kit::component::notification::Notification;
|
||||
@@ -56,6 +57,7 @@ pub struct AppView {
|
||||
model: Entity<Model>,
|
||||
page: Page,
|
||||
dpi: Entity<dpi::DpiPage>,
|
||||
telegram: Entity<telegram::TelegramPage>,
|
||||
_subscriptions: Vec<Subscription>,
|
||||
}
|
||||
|
||||
@@ -72,7 +74,8 @@ impl AppView {
|
||||
}),
|
||||
];
|
||||
let dpi = cx.new(|cx| dpi::DpiPage::new(model.clone(), window, cx));
|
||||
Self { model, page: Page::Overview, dpi, _subscriptions: subscriptions }
|
||||
let telegram = cx.new(|cx| telegram::TelegramPage::new(model.clone(), window, cx));
|
||||
Self { model, page: Page::Overview, dpi, telegram, _subscriptions: subscriptions }
|
||||
}
|
||||
|
||||
fn sidebar(&self, cx: &mut Context<Self>) -> impl IntoElement {
|
||||
@@ -91,6 +94,7 @@ impl Render for AppView {
|
||||
let page = match self.page {
|
||||
Page::Overview => overview::render(&self.model, window, cx).into_any_element(),
|
||||
Page::Dpi => self.dpi.clone().into_any_element(),
|
||||
Page::Telegram => self.telegram.clone().into_any_element(),
|
||||
other => widgets::page(other.title(), cx).child(div().text_color(cx.theme().muted_foreground).child("Not here yet.")).into_any_element(),
|
||||
};
|
||||
div()
|
||||
@@ -99,6 +103,6 @@ impl Render for AppView {
|
||||
.bg(cx.theme().background)
|
||||
.text_color(cx.theme().foreground)
|
||||
.child(self.sidebar(cx))
|
||||
.child(div().id("page").flex_1().h_full().overflow_y_scroll().child(page))
|
||||
.child(div().id("page").flex_1().min_w_0().h_full().overflow_y_scroll().child(page))
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user