Skip to content

Commit e00d157

Browse files
committed
enable drag sheet on pro
1 parent 1e86075 commit e00d157

2 files changed

Lines changed: 18 additions & 22 deletions

File tree

app/network/Main/Connect/ConnectView-iOS.swift

Lines changed: 13 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ struct ConnectView_iOS: View {
3737
@GestureState private var sheetDragTranslation: CGFloat = 0
3838

3939
private let sheetMinHeight: CGFloat // collapsed peek height (adjust)
40-
private let sheetMaxHeight: CGFloat = 500 // expanded height (adjust)
40+
private let sheetMaxHeight: CGFloat = 520 // expanded height (adjust)
4141

4242

4343
init(
@@ -159,27 +159,19 @@ struct ConnectView_iOS: View {
159159
.frame(maxWidth: .infinity)
160160

161161
VStack(spacing: 0) {
162-
163-
if (!isPro) {
164-
/**
165-
* Temporarily disable expanding the sheet if user is pro.
166-
* As we add more sheet functionality, we can remove this check
167-
*/
168-
169-
// Drag handle
170-
VStack(spacing: 8) {
171-
RoundedRectangle(cornerRadius: 2)
172-
.fill(Color.secondary.opacity(0.6))
173-
.frame(width: 36, height: 4)
174-
.padding(.vertical, 16)
175-
}
176-
.frame(maxWidth: .infinity)
177-
.contentShape(Rectangle())
178-
.gesture(sheetDragGesture())
179-
180-
Divider()
181-
162+
163+
// Drag handle
164+
VStack(spacing: 8) {
165+
RoundedRectangle(cornerRadius: 2)
166+
.fill(Color.secondary.opacity(0.6))
167+
.frame(width: 36, height: 4)
168+
.padding(.vertical, 16)
182169
}
170+
.frame(maxWidth: .infinity)
171+
.contentShape(Rectangle())
172+
.gesture(sheetDragGesture())
173+
174+
Divider()
183175

184176
// Sheet content can scroll only when expanded
185177
ScrollView {

app/network/Shared/Views/UsageBar.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ struct UsageBar: View {
127127
"Used": .urElectricBlue, "Pending": .urCoral, "Available": themeManager.currentTheme.textFaintColor
128128
])
129129

130-
Spacer().frame(height: 8)
130+
Spacer().frame(height: 16)
131131

132132
HStack {
133133

@@ -144,6 +144,8 @@ struct UsageBar: View {
144144
}
145145

146146
Divider()
147+
148+
Spacer().frame(height: 8)
147149

148150
HStack {
149151

@@ -159,6 +161,8 @@ struct UsageBar: View {
159161

160162
}
161163

164+
Spacer().frame(height: 8)
165+
162166

163167
HStack {
164168

0 commit comments

Comments
 (0)