@@ -69,7 +69,7 @@ struct MeterConnectionTabView: View {
|
||
| 69 | 69 |
} |
| 70 | 70 |
|
| 71 | 71 |
private func connectionCard(compact: Bool = false, showsActions: Bool = false) -> some View {
|
| 72 |
- VStack(alignment: .leading, spacing: compact ? 12 : 18) {
|
|
| 72 |
+ let cardContent = VStack(alignment: .leading, spacing: compact ? 12 : 18) {
|
|
| 73 | 73 |
HStack(alignment: .top) {
|
| 74 | 74 |
meterIdentity(compact: compact) |
| 75 | 75 |
Spacer() |
@@ -93,8 +93,17 @@ struct MeterConnectionTabView: View {
|
||
| 93 | 93 |
} |
| 94 | 94 |
} |
| 95 | 95 |
.padding(compact ? 16 : 20) |
| 96 |
- .frame(maxWidth: .infinity, maxHeight: compact ? .infinity : nil, alignment: .topLeading) |
|
| 97 | 96 |
.meterCard(tint: meter.color, fillOpacity: 0.22, strokeOpacity: 0.24) |
| 97 |
+ |
|
| 98 |
+ return Group {
|
|
| 99 |
+ if compact {
|
|
| 100 |
+ cardContent |
|
| 101 |
+ .frame(maxWidth: .infinity, maxHeight: .infinity, alignment: .topLeading) |
|
| 102 |
+ } else {
|
|
| 103 |
+ cardContent |
|
| 104 |
+ .frame(maxWidth: .infinity, alignment: .topLeading) |
|
| 105 |
+ } |
|
| 106 |
+ } |
|
| 98 | 107 |
} |
| 99 | 108 |
|
| 100 | 109 |
private func meterIdentity(compact: Bool) -> some View {
|