Skip to content

Commit 95486e4

Browse files
committed
display usage bar in connect actions for both pro and basic plans
1 parent 0adb83a commit 95486e4

1 file changed

Lines changed: 28 additions & 30 deletions

File tree

app/network/Main/Connect/ConnectActions/ConnectActions.swift

Lines changed: 28 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -102,51 +102,49 @@ struct ConnectActions: View {
102102
/**
103103
* Upgrade and participate flows
104104
*/
105-
if (!isPro) {
106105

107-
VStack(alignment: .leading, spacing: 0) {
108-
109-
Text("Plan")
110-
.font(themeManager.currentTheme.secondaryBodyFont)
111-
.foregroundColor(themeManager.currentTheme.textMutedColor)
112-
113-
HStack(alignment: .firstTextBaseline) {
114-
115-
Text("Free")
116-
.font(themeManager.currentTheme.titleCondensedFont)
117-
.foregroundColor(themeManager.currentTheme.textColor)
118-
119-
Spacer()
120-
106+
VStack(alignment: .leading, spacing: 0) {
107+
108+
Text("Plan")
109+
.font(themeManager.currentTheme.secondaryBodyFont)
110+
.foregroundColor(themeManager.currentTheme.textMutedColor)
111+
112+
HStack(alignment: .firstTextBaseline) {
113+
114+
Text(isPro ? "Supporter" : "Free")
115+
.font(themeManager.currentTheme.titleCondensedFont)
116+
.foregroundColor(themeManager.currentTheme.textColor)
117+
118+
Spacer()
119+
120+
if (!isPro) {
121121
Button(action: {
122122
promptMoreDataFlow()
123123
}) {
124124
Text("Get Pro")
125125
.font(themeManager.currentTheme.secondaryBodyFont)
126126
}
127-
128127
}
129-
130-
UsageBar(
131-
availableByteCount: availableByteCount,
132-
pendingByteCount: pendingByteCount,
133-
usedByteCount: usedByteCount,
134-
meanReliabilityWeight: meanReliabilityWeight,
135-
totalReferrals: totalReferrals,
136-
dailyBalanceByteCount: dailyBalanceByteCount
137-
)
138128

139129
}
140-
.padding()
141-
.background(
142-
themeManager.currentTheme.tintedBackgroundBase,
130+
131+
UsageBar(
132+
availableByteCount: availableByteCount,
133+
pendingByteCount: pendingByteCount,
134+
usedByteCount: usedByteCount,
135+
meanReliabilityWeight: meanReliabilityWeight,
136+
totalReferrals: totalReferrals,
137+
dailyBalanceByteCount: dailyBalanceByteCount
143138
)
144-
.cornerRadius(12)
145139

146140
}
141+
.padding()
142+
.background(
143+
themeManager.currentTheme.tintedBackgroundBase,
144+
)
145+
.cornerRadius(12)
147146

148147
}
149-
150148
}
151149

152150
.padding(.horizontal)

0 commit comments

Comments
 (0)