콘텐츠 업로드

- 소장만 가능한 콘텐츠 업로드 기능 추가
This commit is contained in:
Yu Sung
2024-11-08 20:26:42 +09:00
parent 64e02108a9
commit 696aed5c00
4 changed files with 30 additions and 14 deletions

View File

@@ -56,15 +56,15 @@ final class ContentCreateViewModel: ObservableObject {
if isFree {
priceString = "0"
isLimited = false
isOnlyRental = false
isGeneratePreview = true
purchaseOption = PurchaseOption.BOTH
}
}
}
@Published var isOnlyRental = false {
@Published var purchaseOption = PurchaseOption.BOTH {
didSet {
if isOnlyRental {
if purchaseOption == .RENT_ONLY {
isLimited = false
}
}
@@ -125,12 +125,12 @@ final class ContentCreateViewModel: ObservableObject {
detail: detail,
tags: hashtags,
price: price,
purchaseOption: purchaseOption,
limited: limited,
releaseDate: isActiveReservation ? "\(releaseDate.convertDateFormat(dateFormat: "yyyy-MM-dd")) \(releaseTime.convertDateFormat(dateFormat: "HH:mm"))" : nil,
timezone: TimeZone.current.identifier,
themeId: theme!.id,
isAdult: isAdult,
isOnlyRental: isOnlyRental,
isGeneratePreview: isGeneratePreview,
isCommentAvailable: isAvailableComment,
previewStartTime: isGeneratePreview && previewStartTime.trimmingCharacters(in: .whitespacesAndNewlines).count > 0 ? previewStartTime : nil,