feat(channel): 선물 보내기 버튼을 추가한다
This commit is contained in:
@@ -3508,6 +3508,7 @@ If you block this user, the following features will be restricted.
|
|||||||
static var talk: String { pick(ko: "대화하기", en: "Start chat", ja: "トークする") }
|
static var talk: String { pick(ko: "대화하기", en: "Start chat", ja: "トークする") }
|
||||||
static var dm: String { pick(ko: "DM 보내기", en: "Send DM", ja: "DMを送る") }
|
static var dm: String { pick(ko: "DM 보내기", en: "Send DM", ja: "DMを送る") }
|
||||||
static var checkDm: String { pick(ko: "DM 확인하기", en: "Check DM", ja: "DMを確認") }
|
static var checkDm: String { pick(ko: "DM 확인하기", en: "Check DM", ja: "DMを確認") }
|
||||||
|
static var sendGift: String { pick(ko: "선물 보내기", en: "Send gift", ja: "ギフトを送る") }
|
||||||
static var uploadCommunityPost: String { pick(ko: "커뮤니티 글 올리기", en: "Upload community post", ja: "コミュニティ投稿") }
|
static var uploadCommunityPost: String { pick(ko: "커뮤니티 글 올리기", en: "Upload community post", ja: "コミュニティ投稿") }
|
||||||
static var uploadAudioContent: String { pick(ko: "오디오 콘텐츠 올리기", en: "Upload audio content", ja: "オーディオコンテンツを投稿") }
|
static var uploadAudioContent: String { pick(ko: "오디오 콘텐츠 올리기", en: "Upload audio content", ja: "オーディオコンテンツを投稿") }
|
||||||
static var createLive: String { pick(ko: "라이브 만들기", en: "Create live", ja: "ライブを作成") }
|
static var createLive: String { pick(ko: "라이브 만들기", en: "Create live", ja: "ライブを作成") }
|
||||||
@@ -4872,6 +4873,10 @@ If you block this user, the following features will be restricted.
|
|||||||
pick(ko: "보관함", en: "Library", ja: "ライブラリ")
|
pick(ko: "보관함", en: "Library", ja: "ライブラリ")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static var giftBox: String {
|
||||||
|
pick(ko: "선물함", en: "Gift box", ja: "ギフトボックス")
|
||||||
|
}
|
||||||
|
|
||||||
static var blockList: String {
|
static var blockList: String {
|
||||||
pick(ko: "차단목록", en: "Blocked list", ja: "ブロックリスト")
|
pick(ko: "차단목록", en: "Blocked list", ja: "ブロックリスト")
|
||||||
}
|
}
|
||||||
|
|||||||
+23
@@ -7,6 +7,15 @@ struct CreatorChannelTalkActionSection: View {
|
|||||||
let onTapTalk: () -> Void
|
let onTapTalk: () -> Void
|
||||||
let onTapDm: () -> Void
|
let onTapDm: () -> Void
|
||||||
|
|
||||||
|
private var shouldShowGiftButton: Bool {
|
||||||
|
let normalizedCountryCode = UserDefaults
|
||||||
|
.string(forKey: .countryCode)
|
||||||
|
.trimmingCharacters(in: .whitespacesAndNewlines)
|
||||||
|
.uppercased()
|
||||||
|
let isKoreanCountry = normalizedCountryCode.isEmpty || normalizedCountryCode == "KR"
|
||||||
|
return isOwnCreatorChannel == false && isDmAvailable && isKoreanCountry && LanguageHeaderProvider.current == "ko"
|
||||||
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: SodaSpacing.s8) {
|
HStack(spacing: SodaSpacing.s8) {
|
||||||
Spacer()
|
Spacer()
|
||||||
@@ -51,6 +60,20 @@ struct CreatorChannelTalkActionSection: View {
|
|||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if shouldShowGiftButton {
|
||||||
|
Button(action: {}) {
|
||||||
|
Text(I18n.CreatorChannelHome.sendGift)
|
||||||
|
.appFont(size: 16, weight: .medium)
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.padding(SodaSpacing.s12)
|
||||||
|
.overlay(
|
||||||
|
Capsule()
|
||||||
|
.stroke(Color.white.opacity(0.3), lineWidth: 1)
|
||||||
|
)
|
||||||
|
}
|
||||||
|
.buttonStyle(.plain)
|
||||||
|
}
|
||||||
|
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.frame(height: 44)
|
.frame(height: 44)
|
||||||
|
|||||||
Reference in New Issue
Block a user