mirror of
https://github.com/TelegramMessenger/Telegram-iOS.git
synced 2026-07-06 03:33:41 +02:00
Vendor the standalone tgwatch watch-app sources into Telegram/WatchApp/ as a tracked snapshot and build it from there by default (tracked Bazel inputs). Make.py drives embedding via --embedWatchApp (--watchAppSourcePath removed); the filegroup excludes .swiftpm/.build. Documented in CLAUDE.md. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
34 lines
1 KiB
Swift
34 lines
1 KiB
Swift
import SwiftUI
|
|
|
|
struct ContentView: View {
|
|
@Environment(TDClient.self) private var client
|
|
|
|
var body: some View {
|
|
switch client.authState {
|
|
case .starting:
|
|
LoadingView(label: "Starting…")
|
|
case .waitTdlibParameters:
|
|
LoadingView(label: "Configuring…")
|
|
case .waitPhoneNumber:
|
|
LoadingView(label: "Preparing QR…")
|
|
case .waitCode:
|
|
ErrorView(message: "Unexpected SMS-code prompt during QR login.")
|
|
case .waitOtherDeviceConfirmation(let link):
|
|
QrLoginView(link: link)
|
|
case .waitPassword(let info):
|
|
PasswordEntryView(info: info)
|
|
case .ready:
|
|
if let store = client.chatList {
|
|
ChatListView(store: store)
|
|
} else {
|
|
LoadingView(label: "Loading…")
|
|
}
|
|
case .loggingOut:
|
|
LoadingView(label: "Logging out…")
|
|
case .closed:
|
|
ClosedView()
|
|
case .failed(let message):
|
|
ErrorView(message: message)
|
|
}
|
|
}
|
|
}
|