mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-15 09:43:34 +01:00
[ADD] Hint for new users who don't have any sources
This commit is contained in:
committed by
Joe Mattiello
parent
6aaadc79e5
commit
fc974a8079
@@ -42,15 +42,34 @@ struct BrowseView: View {
|
||||
.bold()
|
||||
}
|
||||
}
|
||||
|
||||
LazyVStack(spacing: 32) {
|
||||
ForEach(filteredApps, id: \.bundleIdentifier) { app in
|
||||
NavigationLink {
|
||||
AppDetailView(storeApp: app)
|
||||
|
||||
if searchText.isEmpty, filteredApps.count == 0 {
|
||||
HintView {
|
||||
Text("You don't have any apps yet.")
|
||||
.bold()
|
||||
|
||||
Text("Apps are provided by \"sources\". The specification for them is an open standard, so everyone can create their own source. To get you started, we have compiled a list of \"Trusted Sources\" which you can check out by tapping the button below.")
|
||||
.font(.callout)
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
SwiftUI.Button {
|
||||
self.isShowingSourcesView = true
|
||||
} label: {
|
||||
BrowseAppPreviewView(storeApp: app)
|
||||
Label("Add Source", systemSymbol: .plus)
|
||||
}
|
||||
.buttonStyle(FilledButtonStyle())
|
||||
.padding(.top, 8)
|
||||
}
|
||||
} else {
|
||||
LazyVStack(spacing: 32) {
|
||||
ForEach(filteredApps, id: \.bundleIdentifier) { app in
|
||||
NavigationLink {
|
||||
AppDetailView(storeApp: app)
|
||||
} label: {
|
||||
BrowseAppPreviewView(storeApp: app)
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
.buttonStyle(PlainButtonStyle())
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -111,7 +130,9 @@ struct BrowseView: View {
|
||||
|
||||
struct BrowseView_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
BrowseView()
|
||||
NavigationView {
|
||||
BrowseView()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user