Source code for the WriteFreely SwiftUI app for iOS, iPadOS, and macOS
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

30 lines
846 B

  1. import SwiftUI
  2. struct NoSelectedPostView: View {
  3. @Binding var isConnected: Bool
  4. var body: some View {
  5. VStack(spacing: 8) {
  6. Text("Select a post, or create a new local draft.")
  7. if !isConnected {
  8. Label("You are not connected to the internet", systemImage: "wifi.exclamationmark")
  9. .font(.caption)
  10. .foregroundColor(.secondary)
  11. }
  12. }
  13. .frame(width: 500, height: 500)
  14. }
  15. }
  16. struct NoSelectedPostViewIsDisconnected_Previews: PreviewProvider {
  17. static var previews: some View {
  18. NoSelectedPostView(isConnected: Binding.constant(true))
  19. }
  20. }
  21. struct NoSelectedPostViewIsConnected_Previews: PreviewProvider {
  22. static var previews: some View {
  23. NoSelectedPostView(isConnected: Binding.constant(false))
  24. }
  25. }