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