콘텐츠 리스트
- 소장중 / 대여중 / Sold Out 표시
This commit is contained in:
		| @@ -91,7 +91,34 @@ struct ContentListItemView: View { | ||||
|                  | ||||
|                 Spacer() | ||||
|                  | ||||
|                 if item.price > 0 { | ||||
|                 if item.isOwned { | ||||
|                     Text("소장중") | ||||
|                         .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                         .foregroundColor(Color.gray11) | ||||
|                         .padding(.horizontal, 5.3) | ||||
|                         .padding(.vertical, 2.7) | ||||
|                         .background(Color(hex: "b1ef2c")) | ||||
|                         .cornerRadius(2.6) | ||||
|                 } else if item.isRented { | ||||
|                     Text("대여중") | ||||
|                         .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                         .foregroundColor(Color.white) | ||||
|                         .padding(.horizontal, 5.3) | ||||
|                         .padding(.vertical, 2.7) | ||||
|                         .background(Color(hex: "660fd4")) | ||||
|                         .cornerRadius(2.6) | ||||
|                 } else if item.isSoldOut { | ||||
|                     Text("Sold Out") | ||||
|                         .font(.custom(Font.medium.rawValue, size: 13.3)) | ||||
|                         .foregroundColor(Color.grayd2) | ||||
|                         .padding(.horizontal, 5.3) | ||||
|                         .padding(.vertical, 2.7) | ||||
|                         .overlay( | ||||
|                             RoundedRectangle(cornerRadius: 2.6) | ||||
|                                 .stroke(Color.grayd2, lineWidth: 1) | ||||
|                         ) | ||||
|                         .cornerRadius(2.6) | ||||
|                 } else if item.price > 0 { | ||||
|                     HStack(spacing: 8) { | ||||
|                         Image("ic_can") | ||||
|                             .resizable() | ||||
| @@ -130,7 +157,10 @@ struct ContentListItemView_Previews: PreviewProvider { | ||||
|                 commentCount: 0, | ||||
|                 isPin: true, | ||||
|                 isAdult: false, | ||||
|                 isScheduledToOpen: true | ||||
|                 isScheduledToOpen: true, | ||||
|                 isRented: false, | ||||
|                 isOwned: false, | ||||
|                 isSoldOut: true | ||||
|             ) | ||||
|         ) | ||||
|     } | ||||
|   | ||||
| @@ -81,6 +81,9 @@ struct GetAudioContentListItem: Decodable { | ||||
|     let isPin: Bool | ||||
|     let isAdult: Bool | ||||
|     let isScheduledToOpen: Bool | ||||
|     let isRented: Bool | ||||
|     let isOwned: Bool | ||||
|     let isSoldOut: Bool | ||||
| } | ||||
|  | ||||
| struct GetCreatorActivitySummary: Decodable { | ||||
|   | ||||
| @@ -76,7 +76,10 @@ struct UserProfileContentView_Previews: PreviewProvider { | ||||
|                     commentCount: 0, | ||||
|                     isPin: true, | ||||
|                     isAdult: false, | ||||
|                     isScheduledToOpen: false | ||||
|                     isScheduledToOpen: false, | ||||
|                     isRented: false, | ||||
|                     isOwned: false, | ||||
|                     isSoldOut: false | ||||
|                 ) | ||||
|             ] | ||||
|         ) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Yu Sung
					Yu Sung