-
-
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.
Merge pull request #86 from makinosp/develop
Develop
- Loading branch information
Showing
10 changed files
with
167 additions
and
147 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
// | ||
// SettingsView+AboutSection.swift | ||
// Harmonie | ||
// | ||
// Created by makinosp on 2024/08/24. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension SettingsView { | ||
var appName: String { | ||
Bundle.main.object(forInfoDictionaryKey: "CFBundleDisplayName") as? String ?? "" | ||
} | ||
|
||
var appVersion: String { | ||
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? "" | ||
} | ||
|
||
var aboutSection: some View { | ||
Section("About") { | ||
LabeledContent { | ||
Constants.Icon.forward | ||
} label: { | ||
Button { | ||
destination = .about | ||
} label: { | ||
Label { | ||
Text("About This App") | ||
} icon: { | ||
Image(systemName: "info.circle") | ||
} | ||
} | ||
} | ||
Link(destination: URL(string: "https://github.com/makinosp/harmonie")!) { | ||
Label { | ||
Text("Source Code") | ||
} icon: { | ||
Image(systemName: "curlybraces") | ||
} | ||
} | ||
LabeledContent { | ||
Constants.Icon.forward | ||
} label: { | ||
Button { | ||
destination = .license | ||
} label: { | ||
Label { | ||
Text("Third Party Licence") | ||
} icon: { | ||
Image(systemName: "lightbulb") | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
var aboutThisApp: some View { | ||
List { | ||
LabeledContent { | ||
Text(appName) | ||
} label: { | ||
Text("App Name") | ||
} | ||
LabeledContent { | ||
Text(appVersion) | ||
} label: { | ||
Text("App Version") | ||
} | ||
} | ||
.navigationTitle("About") | ||
.navigationBarTitleDisplayMode(.inline) | ||
} | ||
} |
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
Oops, something went wrong.