This change adds an subscriber number to the supporter badge. Testing -------- PASS Device: iPhone 15 simulator iOS: 17.2 Damus: This commit damus-api: `53fd7fef1c8c0bbf82bb28d1d776e45379433d23` Setup: - `damus-api` running on `npm run dev` mode - Damus configured to enable experimental Purple support + localhost mode Test steps: 1. Wipe local database and rerun server 2. Purchase purple using In-app purchase (Xcode environment) flow 3. Make sure that badge to the side of the user's name on the event shows a golden star without any ordinal numbers 4. Make sure that the badge to the side of the user's name on the profile page shows a golden star with the text "1st" 5. Repeat steps 2–4 and make sure the text says "2nd" 6. Look at the SupporterBadge view previews. Ordinals should show up correctly for all previews (They should always show up, no matter the number) Closes: https://github.com/damus-io/damus/issues/1873 Signed-off-by: Daniel D’Aquino <daniel@daquino.me> Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
30 lines
671 B
Swift
30 lines
671 B
Swift
//
|
|
// GoldSupportGradient.swift
|
|
// damus
|
|
//
|
|
// Created by William Casarin on 2023-05-15.
|
|
//
|
|
|
|
import SwiftUI
|
|
|
|
fileprivate let gold_grad_c1 = DamusColors.gold
|
|
fileprivate let gold_grad_c2 = hex_col(r: 249, g: 243, b: 100)
|
|
|
|
fileprivate let gold_grad = [gold_grad_c2, gold_grad_c1]
|
|
|
|
let GoldGradient: LinearGradient =
|
|
LinearGradient(colors: gold_grad, startPoint: .bottomLeading, endPoint: .topTrailing)
|
|
|
|
struct GoldGradientView: View {
|
|
var body: some View {
|
|
GoldGradient
|
|
.edgesIgnoringSafeArea([.top,.bottom])
|
|
}
|
|
}
|
|
|
|
struct GoldGradientView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
GoldGradientView()
|
|
}
|
|
}
|