42 lines
1.1 KiB
Swift
42 lines
1.1 KiB
Swift
//
|
|
// ComposeCurrentAccount.swift
|
|
// Tusker
|
|
//
|
|
// Created by Shadowfacts on 8/18/20.
|
|
// Copyright © 2020 Shadowfacts. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import Pachyderm
|
|
|
|
struct ComposeCurrentAccount: View {
|
|
@EnvironmentObject var mastodonController: MastodonController
|
|
|
|
var account: Account {
|
|
mastodonController.account!
|
|
}
|
|
|
|
var body: some View {
|
|
HStack(alignment: .top) {
|
|
ComposeAvatarImageView(url: account.avatar)
|
|
.accessibility(label: Text("\(account.displayName) avatar"))
|
|
|
|
VStack(alignment: .leading) {
|
|
AccountDisplayNameLabel(account: mastodonController.persistentContainer.account(for: account.id)!, fontSize: 20)
|
|
.lineLimit(1)
|
|
|
|
Text(verbatim: "@\(account.acct)")
|
|
.font(.system(size: 17, weight: .light))
|
|
.foregroundColor(.secondary)
|
|
.lineLimit(1)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
//struct ComposeCurrentAccount_Previews: PreviewProvider {
|
|
// static var previews: some View {
|
|
// ComposeCurrentAccount(account: )
|
|
// }
|
|
//}
|