Skip to content

Commit

Permalink
Merge branch 'main' into acbdev-patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
acbdev authored Oct 8, 2024
2 parents 84c88fe + 19e6e7c commit 79b7aac
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 7 deletions.
2 changes: 2 additions & 0 deletions Code Relay/Code Relay.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Code Relay/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down Expand Up @@ -282,6 +283,7 @@
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_ASSET_PATHS = "\"Code Relay/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_PREVIEWS = YES;
GENERATE_INFOPLIST_FILE = YES;
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
Expand Down
2 changes: 1 addition & 1 deletion Code Relay/Code Relay/ContentView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ struct ContentView: View {
Tab("Settings", systemImage: "gear") {
SettingsView()
}
}
}.tint(.red)
}
}

Expand Down
8 changes: 8 additions & 0 deletions Code Relay/Code Relay/DetailsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,19 @@ struct DetailsView: View {
if showCheekyPrawn {
Text("🦐").font(.largeTitle)
}

Spacer()

if let phoneNumber = location.phoneNumber {
Link("Call", destination: URL(string: "tel:\(phoneNumber)")!)
.padding()
}
}
.frame(maxHeight: .infinity, alignment: .top)
}

private func toggleCheekyPrawn() {
showCheekyPrawn.toggle()
// TODO: Prawn confetti please
}
}
3 changes: 3 additions & 0 deletions Code Relay/Code Relay/Localizable.xcstrings
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
"sourceLanguage" : "en",
"strings" : {
"Call" : {

},
"Developed at " : {
"localizations" : {
"en" : {
Expand Down
1 change: 1 addition & 0 deletions Code Relay/Code Relay/Location.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ struct Location: Identifiable {
let title: String
let details: String
let coordinate: CLLocationCoordinate2D?
let phoneNumber: String?
var id: String { title }
}

Expand Down
14 changes: 8 additions & 6 deletions Code Relay/Code Relay/ViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@
// Created by Sebastian Bolling on 2024-10-08.
//

import CoreLocation

struct ViewModel {

init() {
locationsData = [
Location(title: "Leeds Playhouse", details: "Good Conference", coordinate: nil),
Location(title: "Leeds Art Gallery", details: "Good Art", coordinate: nil),
Location(title: "Victoria Leeds", details: "Something good", coordinate: nil),
Location(title: "Royal Armouries", details: "Good Armor", coordinate: nil),
Location(title: "Brew Society", details: "Good Beer", coordinate: nil),
Location(title: "Brew Dog", details: "Good Dog Beer", coordinate: nil),
Location(title: "Leeds Playhouse", details: "Good Conference", coordinate: nil, phoneNumber: "0044 113 213 7700"),
Location(title: "Leeds Art Gallery", details: "Good Art", coordinate: nil, phoneNumber: "0044 113 378 5350"),
Location(title: "Victoria Leeds", details: "Something good", coordinate: nil, phoneNumber: "0044 113 245 5333"),
Location(title: "Royal Armouries", details: "Good Armor", coordinate: nil, phoneNumber: "0044 113 220 1916"),
Location(title: "Brew Society", details: "Good Beer", coordinate: nil, phoneNumber: nil),
Location(title: "Brew Dog", details: "Good Dog Beer", coordinate: nil, phoneNumber: "0044 113 391 2950"),
]
}

Expand Down

0 comments on commit 79b7aac

Please sign in to comment.