mirror of
https://github.com/metabolist/metatext.git
synced 2024-11-28 02:51:02 +00:00
Add link to source code / issue tracker
This commit is contained in:
parent
3e976be263
commit
3d9ad3a5f5
3 changed files with 14 additions and 7 deletions
|
@ -4,6 +4,7 @@
|
|||
"about.acknowledgments" = "Acknowledgments";
|
||||
"about.made-by-metabolist" = "Made by Metabolist";
|
||||
"about.official-account" = "Official Account";
|
||||
"about.source-code-and-issue-tracker" = "Source Code & Issue Tracker";
|
||||
"about.website" = "Website";
|
||||
"accessibility.activate-link-%@" = "Activate link: %@";
|
||||
"accessibility.copy-text" = "Copy text";
|
||||
|
|
|
@ -130,10 +130,10 @@ public extension NavigationViewModel {
|
|||
titleComponents: ["preferences.blocked-users"])))
|
||||
}
|
||||
|
||||
func navigateToOfficialAccount() {
|
||||
func navigateToURL(_ url: URL) {
|
||||
presentingSecondaryNavigation = false
|
||||
presentedNewStatusViewModel = nil
|
||||
identityContext.service.navigationService.item(url: Self.officialAccountURL)
|
||||
identityContext.service.navigationService.item(url: url)
|
||||
.sink { [weak self] in self?.navigationsSubject.send($0) }
|
||||
.store(in: &cancellables)
|
||||
}
|
||||
|
@ -192,7 +192,3 @@ public extension NavigationViewModel {
|
|||
return conversationsViewModel
|
||||
}
|
||||
}
|
||||
|
||||
private extension NavigationViewModel {
|
||||
static let officialAccountURL = URL(string: "https://mastodon.social/@metabolist")!
|
||||
}
|
||||
|
|
|
@ -19,7 +19,7 @@ struct AboutView: View {
|
|||
.frame(maxWidth: .infinity, alignment: .center)
|
||||
Section(header: Text("about.made-by-metabolist")) {
|
||||
Button {
|
||||
viewModel.navigateToOfficialAccount()
|
||||
viewModel.navigateToURL(Self.officialAccountURL)
|
||||
} label: {
|
||||
Label {
|
||||
Text("about.official-account").foregroundColor(.primary)
|
||||
|
@ -34,6 +34,13 @@ struct AboutView: View {
|
|||
Image(systemName: "link")
|
||||
}
|
||||
}
|
||||
Link(destination: Self.sourceCodeAndIssueTrackerURL) {
|
||||
Label {
|
||||
Text("about.source-code-and-issue-tracker").foregroundColor(.primary)
|
||||
} icon: {
|
||||
Image(systemName: "wrench.and.screwdriver")
|
||||
}
|
||||
}
|
||||
}
|
||||
Section {
|
||||
NavigationLink(
|
||||
|
@ -48,6 +55,9 @@ struct AboutView: View {
|
|||
|
||||
private extension AboutView {
|
||||
static let websiteURL = URL(string: "https://metabolist.org")!
|
||||
static let officialAccountURL = URL(string: "https://mastodon.social/@metabolist")!
|
||||
static let sourceCodeAndIssueTrackerURL = URL(string: "https://github.com/metabolist/metatext")!
|
||||
|
||||
static var version: String {
|
||||
Bundle.main.object(forInfoDictionaryKey: "CFBundleShortVersionString") as? String ?? ""
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue