Add option to open user profile in browser fix #163

This commit is contained in:
Thomas Ricouard 2023-01-20 18:36:24 +01:00
parent 307ea75f43
commit 85e09faab1
2 changed files with 6 additions and 1 deletions

View file

@ -8,7 +8,9 @@ import Status
import SwiftUI
public struct AccountDetailView: View {
@Environment(\.openURL) private var openURL
@Environment(\.redactionReasons) private var reasons
@EnvironmentObject private var watcher: StreamWatcher
@EnvironmentObject private var currentAccount: CurrentAccount
@EnvironmentObject private var preferences: UserPreferences
@ -500,6 +502,9 @@ public struct AccountDetailView: View {
if let url = account.url {
ShareLink(item: url)
Button { openURL(url) } label: {
Label("status.action.view-in-browser", systemImage: "safari")
}
}
Divider()

View file

@ -64,7 +64,7 @@ public struct StatusCardView: View {
Label("Share this link", systemImage: "square.and.arrow.up")
}
Button { openURL(card.url) } label: {
Label("View in Browser", systemImage: "safari")
Label("status.action.view-in-browser", systemImage: "safari")
}
Divider()
Button {