[feat] add configurable landscape entry for mobile sessions

This commit is contained in:
dijunkun
2026-10-24 03:28:23 +08:00
parent 182899d238
commit 4650e48ea3
12 changed files with 257 additions and 44 deletions
+6 -1
View File
@@ -75,7 +75,7 @@ struct ContentView: View {
}
.onAppear {
if !session.sessionVisible {
AppOrientation.update(to: .portrait)
AppOrientation.endSession()
}
if scenePhase == .active {
session.applicationDidBecomeActive()
@@ -840,6 +840,11 @@ private struct ServerSettingsView: View {
}
.pickerStyle(.segmented)
}
Section {
Toggle("连接后自动横屏", isOn: $session.autoLandscape)
} header: {
Text("屏幕方向")
}
Section {
DisclosureGroup(isExpanded: $serverConfigurationExpanded) {
Toggle("使用自定义服务器", isOn: $usesCustomServer)