Skip to content

Commit

Permalink
🎨 μš”μ•½ μ‹€νŒ¨ μΉ΄λ“œ λ””μžμΈ μˆ˜μ •
Browse files Browse the repository at this point in the history
  • Loading branch information
klmyoungyun committed Sep 18, 2024
1 parent 88fe363 commit 0099122
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
17 changes: 15 additions & 2 deletions Projects/DesignSystem/DesignSystemKit/Sources/Card/LKCard.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,12 @@ private struct HeaderView<Thumbnail: View>: View {
case .inProgress:
SummarizingView()
case .failure:
EmptyView()
FailureContentView(description: description)
}
}

Spacer()

CardThumbnailView(thumbnail: thumbnail)
}
}
Expand Down Expand Up @@ -189,7 +191,7 @@ private struct FooterView: View {

Spacer()

if aiStatus == .success {
if aiStatus == .success || aiStatus == .failure {
ActionButtons(
isFavorite: isFavorite,
bookMarkAction: bookMarkAction,
Expand Down Expand Up @@ -274,6 +276,17 @@ private struct SummarizingView: View {
}
}

private struct FailureContentView: View {
var description: String?

var body: some View {
Text(description ?? LocalizationKitStrings.DesignsSystemKit.failedToSummarize)
.font(weight: .regular, semantic: .s)
.foregroundStyle(DesignSystemKitAsset.Colors.g6.swiftUIColor)
.lineLimit(3)
}
}

#Preview {
LKCard<ThumbnailView>(
aiStatus: .inProgress,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
"summarizing" = "Summarizing";

"save_copied_link" = "Save copied link";

"failed_to_summarize" = "Failed to summarize";
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
"summarizing" = "μš”μ•½μ€‘";

"save_copied_link" = "ν΄λ¦½λ³΄λ“œμ— λ³΅μ‚¬ν•œ 링크 μ €μž₯";

"failed_to_summarize" = "μš”μ•½μ— μ‹€νŒ¨ν–ˆμ–΄μš”.";

0 comments on commit 0099122

Please sign in to comment.