Vasilis

changes to couponsView

......@@ -104,12 +104,10 @@ extension CouponsView {
HStack {
Image("ic_back", bundle: Bundle(for: MyEmptyClass.self))
.resizable()
.frame(width: self.uiscreen.width * 0.025, height: self.uiscreen.height * 0.02)
.frame(width: self.uiscreen.height * 0.03, height: self.uiscreen.height * 0.02)
.offset(y: self.uiscreen.height * 0.02)
}
}
// .frame(width: self.uiscreen.width * 0.025, height: self.uiscreen.height * 0.02)
// .offset(x: -self.uiscreen.width / 2 + self.uiscreen.width * 0.05, y: self.uiscreen.height * 0.04)
Text("Όλα τα κουπόνια μου")
.frame(width: self.uiscreen.width * 0.8, height: self.uiscreen.height * 0.025, alignment: .center)
.offset( y: self.uiscreen.height * 0.02)
......@@ -140,37 +138,32 @@ extension CouponsView {
Spacer()
VStack {
Text(CouponsView.couponView.localizedWithParameter(parameter: result["admin_name"] as? String ?? ""))
.frame(maxWidth: self.uiscreen.width * 0.3, maxHeight: .infinity, alignment: .leading)
.font(.system(size: 18))
.frame(maxWidth: self.uiscreen.width * 0.35, maxHeight: .infinity, alignment: .leading)
.font(.system(size: 15))
Text(CouponsView.couponView.localizedWithParameter(parameter: result["discount"] as? String ?? ""))
.frame(maxWidth: self.uiscreen.width * 0.3, maxHeight: self.uiscreen.height * 0.05, alignment: .leading)
.font(.system(size: 53))
.frame(maxWidth: self.uiscreen.width * 0.35, maxHeight: self.uiscreen.height * 0.05, alignment: .leading)
.font(.system(size: 47))
Text(CouponsView.couponView.localizedWithParameter(parameter: "Ισχύει εώς " + (result["expiration"] as? String ?? "").components(separatedBy: [" "]).filter({!$0.isEmpty})[0]))
.frame(maxWidth: self.uiscreen.width * 0.3, maxHeight: .infinity, alignment: .leading)
.font(.system(size: 13))
.frame(maxWidth: self.uiscreen.width * 0.35, maxHeight: .infinity, alignment: .leading)
.font(.system(size: 10))
}
.frame(maxHeight: .infinity)
.padding(.top, self.uiscreen.height * 0.03)
.padding(.bottom, self.uiscreen.height * 0.03)
Spacer()
VStack {
Text(CouponsView.couponView.localizedWithParameter(parameter: result["short_description"] as! String))
.frame(maxWidth: self.uiscreen.width * 0.15, maxHeight: self.uiscreen.height * 0.10)
.font(.system(size: 13))
.frame(maxWidth: self.uiscreen.width * 0.22, maxHeight: self.uiscreen.height * 0.10)
.font(.system(size: 10))
}
.frame(maxWidth: self.uiscreen.width * 0.25, maxHeight: .infinity)
Spacer()
}
.background(
Image("coupons_container", bundle: Bundle(for: MyEmptyClass.self))
)
.frame(width: self.uiscreen.width * 0.95, height: self.uiscreen.height * 0.13)
.background(Color.purple)
}
.padding(.top, self.uiscreen.height * 0.05)
.frame(width: self.uiscreen.width * 0.95, height: self.uiscreen.height * 0.13)
.background(
Image("coupons_container", bundle: Bundle(for: MyEmptyClass.self))
)
}
}
......