Tusker/Tusker/Screens/Compose/ComposeCurrentAccount.swift

41 lines
1.0 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)
VStack(alignment: .leading) {
Text(verbatim: account.displayName)
.font(.system(size: 20, weight: .semibold))
.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: )
// }
//}