mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-24 14:02:53 +01:00
Add a Mastometrics link in account menu
This commit is contained in:
parent
71f2617a30
commit
c3d1c6d363
@ -8,6 +8,7 @@ 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
|
||||||
@ -329,6 +330,20 @@ public struct AccountDetailView: View {
|
|||||||
Label("settings.push.navigation-title", systemImage: "bell")
|
Label("settings.push.navigation-title", systemImage: "bell")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if let account = viewModel.account {
|
||||||
|
Divider()
|
||||||
|
|
||||||
|
Button {
|
||||||
|
if let url = URL(string: "https://mastometrics.com/auth/login?username=\(account.acct)@\(client.server)&instance=\(client.server)&auto=true") {
|
||||||
|
openURL(url)
|
||||||
|
}
|
||||||
|
} label: {
|
||||||
|
Label("Mastometrics", systemImage: "chart.xyaxis.line")
|
||||||
|
}
|
||||||
|
|
||||||
|
Divider()
|
||||||
|
}
|
||||||
|
|
||||||
Button {
|
Button {
|
||||||
routerPath.presentedSheet = .settings
|
routerPath.presentedSheet = .settings
|
||||||
} label: {
|
} label: {
|
||||||
|
Loading…
Reference in New Issue
Block a user