feat: initial ui implementation
This commit is contained in:
parent
1612ed099c
commit
13254d63c2
9 changed files with 709 additions and 31 deletions
41
dns/BlocklistRow.swift
Normal file
41
dns/BlocklistRow.swift
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
import SwiftUI
|
||||
|
||||
struct BlocklistRow: View {
|
||||
let option: BlocklistOption
|
||||
let isSelected: Bool
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: 16) {
|
||||
ZStack {
|
||||
RoundedRectangle(cornerRadius: 10)
|
||||
.fill(isSelected ? Color.green.opacity(0.15) : Color.gray.opacity(0.1))
|
||||
.frame(width: 44, height: 44)
|
||||
|
||||
Image(systemName: option.icon)
|
||||
.font(.title3)
|
||||
.foregroundStyle(isSelected ? .green : .secondary)
|
||||
}
|
||||
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(option.id + " " + (option.enabled ? "" : "(Coming Soon)"))
|
||||
.font(.body)
|
||||
.fontWeight(isSelected ? .semibold : .regular)
|
||||
|
||||
Text(option.description)
|
||||
.font(.caption)
|
||||
.foregroundStyle(.secondary)
|
||||
.lineLimit(2)
|
||||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
if isSelected {
|
||||
Image(systemName: "checkmark.circle.fill")
|
||||
.foregroundStyle(.green)
|
||||
.font(.title3)
|
||||
.transition(.scale.combined(with: .opacity))
|
||||
}
|
||||
}
|
||||
.padding(.vertical, 8)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue