-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
286 additions
and
128 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
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
21 changes: 21 additions & 0 deletions
21
apps/mobile/metro-now/metro-now/Assets.xcassets/AbouIcon.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"filename": "icon-1024x1024.png", | ||
"idiom": "universal", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"idiom": "universal", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"idiom": "universal", | ||
"scale": "3x" | ||
} | ||
], | ||
"info": { | ||
"author": "xcode", | ||
"version": 1 | ||
} | ||
} |
Binary file added
BIN
+744 KB
...mobile/metro-now/metro-now/Assets.xcassets/AbouIcon.imageset/icon-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions
21
apps/mobile/metro-now/metro-now/Assets.xcassets/Images/BlueImage.imageset/Contents.json
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,21 @@ | ||
{ | ||
"images": [ | ||
{ | ||
"idiom": "universal", | ||
"scale": "1x" | ||
}, | ||
{ | ||
"filename": "icon-1024x1024.png", | ||
"idiom": "universal", | ||
"scale": "2x" | ||
}, | ||
{ | ||
"idiom": "universal", | ||
"scale": "3x" | ||
} | ||
], | ||
"info": { | ||
"author": "xcode", | ||
"version": 1 | ||
} | ||
} |
Binary file added
BIN
+744 KB
...etro-now/metro-now/Assets.xcassets/Images/BlueImage.imageset/icon-1024x1024.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions
6
apps/mobile/metro-now/metro-now/Assets.xcassets/Images/Contents.json
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,6 @@ | ||
{ | ||
"info": { | ||
"author": "xcode", | ||
"version": 1 | ||
} | ||
} |
68 changes: 0 additions & 68 deletions
68
...bile/metro-now/metro-now/pages/settings/components/settings-page-about-section.view.swift
This file was deleted.
Oops, something went wrong.
24 changes: 0 additions & 24 deletions
24
apps/mobile/metro-now/metro-now/pages/settings/components/settings-page-footer.view.swift
This file was deleted.
Oops, something went wrong.
29 changes: 0 additions & 29 deletions
29
...le/metro-now/metro-now/pages/settings/components/settings-page-general-section.view.swift
This file was deleted.
Oops, something went wrong.
100 changes: 100 additions & 0 deletions
100
apps/mobile/metro-now/metro-now/pages/settings/settings-about-page.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,100 @@ | ||
// metro-now | ||
// https://github.com/krystxf/metro-now | ||
|
||
import SwiftUI | ||
import UIKit | ||
|
||
struct SettingsAboutPageView: View { | ||
private let formattedVersion = getFormattedVersionNumber() | ||
private let application = UIApplication.shared | ||
private let version = Bundle.main.versionNumber ?? "" | ||
private let build = Bundle.main.buildNumber ?? "" | ||
|
||
var body: some View { | ||
VStack { | ||
List { | ||
Section { | ||
HStack { | ||
Spacer() | ||
VStack { | ||
Image("BlueImage") | ||
.resizable() | ||
.frame(width: 64, height: 64) | ||
.cornerRadius(16) | ||
Text("About") | ||
.font(.title) | ||
.fontWeight(.bold) | ||
Text("The app is still in development. Stay tuned to see what's next!") | ||
} | ||
Spacer() | ||
} | ||
} | ||
|
||
if let appStoreUrl { | ||
ShareLink(item: appStoreUrl) { | ||
Label( | ||
"Share metro-now", | ||
systemImage: "square.and.arrow.up" | ||
) | ||
} | ||
} | ||
|
||
if let REVIEW_URL { | ||
Link(destination: REVIEW_URL) { | ||
Label( | ||
"Give us a rating", | ||
systemImage: "star" | ||
) | ||
} | ||
.accessibilityHint("Opens app rating in app store") | ||
} | ||
|
||
if let reportBugUrl = getGithubIssueUrl( | ||
template: .bug_report, | ||
title: "Bug in version \(formattedVersion)" | ||
) { | ||
Link(destination: reportBugUrl) { | ||
Label( | ||
"Report bug", | ||
systemImage: "bubble.left.and.exclamationmark.bubble.right" | ||
) | ||
} | ||
.accessibilityHint("Opens Github issue form") | ||
} | ||
|
||
if let featureRequestUrl = getGithubIssueUrl( | ||
template: .feature_request | ||
) { | ||
Link(destination: featureRequestUrl) { | ||
Label( | ||
"Feature request", | ||
systemImage: "star.bubble" | ||
) | ||
} | ||
.accessibilityHint("Opens Github feature request form") | ||
} | ||
|
||
Section { | ||
HStack { | ||
Text("Version") | ||
Spacer() | ||
Text(version).fontDesign(.monospaced) | ||
} | ||
HStack { | ||
Text("Build") | ||
Spacer() | ||
Text(String(build)).fontDesign(.monospaced) | ||
} | ||
|
||
if let sourceCodeUrl = URL(string: GITHUB_URL) { | ||
Link("Source code", destination: sourceCodeUrl) | ||
} | ||
} | ||
} | ||
}.background(Color(UIColor.systemGroupedBackground)) | ||
} | ||
} | ||
|
||
#Preview { | ||
SettingsAboutPageView() | ||
} |
58 changes: 58 additions & 0 deletions
58
apps/mobile/metro-now/metro-now/pages/settings/settings-app-changelog.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,58 @@ | ||
|
||
|
||
// metro-now | ||
// https://github.com/krystxf/metro-now | ||
|
||
import SwiftUI | ||
|
||
struct ChangelogItem: View { | ||
let version: String | ||
let changes: String | ||
|
||
init(version: String, changes: [String]) { | ||
self.version = version | ||
|
||
self.changes = changes.map { "• \($0)" }.joined(separator: "\n") | ||
} | ||
|
||
var body: some View { | ||
VStack { | ||
Text(version) | ||
.font(.headline) | ||
.fontWeight(.bold) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
Text(changes) | ||
.frame(maxWidth: .infinity, alignment: .leading) | ||
} | ||
} | ||
} | ||
|
||
struct SettingsChangelogPageView: View { | ||
var body: some View { | ||
VStack(spacing: 16) { | ||
Divider() | ||
ChangelogItem( | ||
version: "v0.3.0", | ||
changes: [ | ||
"bus departures", | ||
"settings", | ||
"search", | ||
] | ||
) | ||
Divider() | ||
ChangelogItem( | ||
version: "v0.1.0", | ||
changes: [ | ||
"metro now is here!🎉", | ||
] | ||
) | ||
} | ||
.padding() | ||
.frame(maxHeight: .infinity, alignment: .top) | ||
.navigationTitle("What's new") | ||
} | ||
} | ||
|
||
#Preview { | ||
SettingsChangelogPageView() | ||
} |
Oops, something went wrong.