Skip to content

Commit

Permalink
Update AppList.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
nookery committed Dec 26, 2023
1 parent 8bcc73f commit 3bdf71e
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions TravelMode/View/AppList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,22 @@ struct AppList: View {
}

var body: some View {
ScrollView {
VStack(spacing: 0) {
ForEach(appsVisible) { app in
AppLine(app: app)
Divider()
ZStack {
if appsVisible.count == 0 {
VStack {
Spacer()
Text("开始监控后").font(.title)
Text("联网的 APP 将会出现在这里").font(.title)
Spacer()
}.frame(maxWidth: .infinity,maxHeight: .infinity)
} else {
ScrollView {
VStack(spacing: 0) {
ForEach(appsVisible) { app in
AppLine(app: app)
Divider()
}
}
}
}
}
Expand Down

0 comments on commit 3bdf71e

Please sign in to comment.