-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Lots of housekeeping (but now location is broken lol)
- Loading branch information
Showing
18 changed files
with
142 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
Solstice/Helper Views/LocationPermissionScreenerView.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// | ||
// LocationPermissionScreenerView.swift | ||
// Solstice | ||
// | ||
// Created by Daniel Eden on 28/02/2023. | ||
// | ||
|
||
import SwiftUI | ||
|
||
struct LocationPermissionScreenerView: View { | ||
@Environment(\.openURL) var openURL | ||
@EnvironmentObject var currentLocation: CurrentLocation | ||
|
||
var body: some View { | ||
AdaptiveLabeledContent { | ||
Button { | ||
currentLocation.requestAccess() | ||
} label: { | ||
Text("Set up") | ||
} | ||
.buttonStyle(.bordered) | ||
|
||
} label: { | ||
HStack { | ||
Image(systemName: "location") | ||
.imageScale(.small) | ||
.foregroundStyle(.secondary) | ||
.symbolVariant(.fill) | ||
|
||
Text("Current location") | ||
} | ||
} | ||
.padding(.vertical, 6) | ||
} | ||
} | ||
|
||
struct LocationPermissionScreenerView_Previews: PreviewProvider { | ||
static var previews: some View { | ||
Form { | ||
LocationPermissionScreenerView() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.