|
|
@@ -171,7 +171,7 @@ struct CommentWriterView: View {
|
|
|
composeColumn(title: "Configuration", icon: "slider.horizontal.3") {
|
|
|
configurationPanel
|
|
|
}
|
|
|
- composeColumn(title: "Your Comment", icon: "bubble.left") {
|
|
|
+ composeColumn(title: "Generated result", icon: "bubble.left.and.bubble.right") {
|
|
|
editorPanel
|
|
|
}
|
|
|
}
|
|
|
@@ -190,7 +190,7 @@ struct CommentWriterView: View {
|
|
|
.frame(width: 1)
|
|
|
.padding(.vertical, 2)
|
|
|
|
|
|
- composeColumn(title: "Your Comment", icon: "bubble.left") {
|
|
|
+ composeColumn(title: "Generated result", icon: "bubble.left.and.bubble.right") {
|
|
|
editorPanel
|
|
|
}
|
|
|
.frame(maxWidth: .infinity)
|
|
|
@@ -336,16 +336,26 @@ struct CommentWriterView: View {
|
|
|
}
|
|
|
|
|
|
private var editorPanel: some View {
|
|
|
+ VStack(spacing: Layout.sectionSpacing) {
|
|
|
+ if viewModel.hasGeneratedContent {
|
|
|
+ generatedContentSection
|
|
|
+ } else {
|
|
|
+ CommentWriterEmptyResultPlaceholder()
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ private var generatedContentSection: some View {
|
|
|
VStack(spacing: Layout.sectionSpacing) {
|
|
|
PostFormCard(
|
|
|
- title: "Your Comment",
|
|
|
+ title: "Comment",
|
|
|
subtitle: viewModel.draft.useMarkdown
|
|
|
- ? "Markdown supported — edit after generating"
|
|
|
- : "Plain text — edit after generating"
|
|
|
+ ? "Generated by AI — markdown supported, edit if you like"
|
|
|
+ : "Generated by AI — plain text, edit if you like"
|
|
|
) {
|
|
|
PostFormTextEditor(
|
|
|
label: "Comment Body",
|
|
|
- placeholder: "Generate a comment or write your own…",
|
|
|
+ placeholder: "Edit the generated comment…",
|
|
|
text: $viewModel.draft.body,
|
|
|
minHeight: 190
|
|
|
)
|