minor refactoring

This commit is contained in:
haeon
2025-11-26 11:11:57 +09:00
parent 7941a24074
commit 9ba44107ee
3 changed files with 29 additions and 75 deletions

View File

@@ -16,24 +16,16 @@ struct ContentView: View {
.font(.title2.weight(.semibold))
.foregroundColor(.primary)
ZStack(alignment: .topLeading) {
if vm.text.isEmpty {
Text("Type text to synthesize")
.foregroundColor(.secondary)
.padding(.horizontal, 14)
.padding(.vertical, 12)
}
TextEditor(text: $vm.text)
.frame(minHeight: 120, maxHeight: 180)
.padding(8)
.background(Color(.secondarySystemBackground))
.cornerRadius(12)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(Color.secondary.opacity(0.3), lineWidth: 1)
)
}
.padding(.horizontal)
TextEditor(text: $vm.text)
.frame(minHeight: 120, maxHeight: 180)
.padding(8)
.background(Color(.secondarySystemBackground))
.cornerRadius(12)
.overlay(
RoundedRectangle(cornerRadius: 12)
.stroke(Color.secondary.opacity(0.3), lineWidth: 1)
)
.padding(.horizontal)
HStack(spacing: 12) {
Text("NFE")
@@ -92,7 +84,3 @@ struct ContentView: View {
.onAppear { vm.startup() }
}
}
#Preview {
ContentView()
}