mirror of
https://github.com/stoatchat/for-ios.git
synced 2026-07-18 16:04:32 -04:00
36 lines
913 B
Swift
36 lines
913 B
Swift
//
|
|
// ServerBadges.swift
|
|
// Revolt
|
|
//
|
|
// Created by Angelo on 12/09/2024.
|
|
//
|
|
|
|
import Foundation
|
|
import SwiftUI
|
|
import Types
|
|
|
|
struct ServerBadges: View {
|
|
var value: ServerFlags?
|
|
|
|
var body: some View {
|
|
if value?.contains(.offical) == true {
|
|
ZStack(alignment: .center) {
|
|
Image(systemName: "seal.fill")
|
|
.resizable()
|
|
.frame(width: 12, height: 12)
|
|
.foregroundStyle(.white)
|
|
|
|
Image("monochrome")
|
|
.resizable()
|
|
.frame(width: 10, height: 10)
|
|
.colorInvert()
|
|
}
|
|
} else if value?.contains(.verified) == true {
|
|
Image(systemName: "checkmark.seal.fill")
|
|
.resizable()
|
|
.foregroundStyle(.black, .white)
|
|
.frame(width: 12, height: 12)
|
|
}
|
|
}
|
|
}
|