mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-01-28 21:39:18 +01:00
Add option to open user profile in browser fix #163
This commit is contained in:
parent
307ea75f43
commit
85e09faab1
@ -8,7 +8,9 @@ import Status
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
public struct AccountDetailView: View {
|
public struct AccountDetailView: View {
|
||||||
|
@Environment(\.openURL) private var openURL
|
||||||
@Environment(\.redactionReasons) private var reasons
|
@Environment(\.redactionReasons) private var reasons
|
||||||
|
|
||||||
@EnvironmentObject private var watcher: StreamWatcher
|
@EnvironmentObject private var watcher: StreamWatcher
|
||||||
@EnvironmentObject private var currentAccount: CurrentAccount
|
@EnvironmentObject private var currentAccount: CurrentAccount
|
||||||
@EnvironmentObject private var preferences: UserPreferences
|
@EnvironmentObject private var preferences: UserPreferences
|
||||||
@ -500,6 +502,9 @@ public struct AccountDetailView: View {
|
|||||||
|
|
||||||
if let url = account.url {
|
if let url = account.url {
|
||||||
ShareLink(item: url)
|
ShareLink(item: url)
|
||||||
|
Button { openURL(url) } label: {
|
||||||
|
Label("status.action.view-in-browser", systemImage: "safari")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Divider()
|
Divider()
|
||||||
|
@ -64,7 +64,7 @@ public struct StatusCardView: View {
|
|||||||
Label("Share this link", systemImage: "square.and.arrow.up")
|
Label("Share this link", systemImage: "square.and.arrow.up")
|
||||||
}
|
}
|
||||||
Button { openURL(card.url) } label: {
|
Button { openURL(card.url) } label: {
|
||||||
Label("View in Browser", systemImage: "safari")
|
Label("status.action.view-in-browser", systemImage: "safari")
|
||||||
}
|
}
|
||||||
Divider()
|
Divider()
|
||||||
Button {
|
Button {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user