Files
iOS/Sources/Improv/Views/ImprovSuccessView.swift
Bruno Pantaleão Gonçalves c32292a4db Fix Improv pairing flow UI (#3736)
<!-- Thank you for submitting a Pull Request and helping to improve Home
Assistant. Please complete the following sections to help the processing
and review of your changes. Please do not delete anything from this
template. -->

## Summary
<!-- Provide a brief summary of the changes you have made and most
importantly what they aim to achieve -->

- Recent changes on the Apple-like bottom sheet component impacted
Improv pairing flow, this PR fixes it.

## Screenshots
<!-- If this is a user-facing change not in the frontend, please include
screenshots in light and dark mode. -->
<img width="2282" height="1906" alt="CleanShot 2025-07-17 at 10 00
12@2x"
src="https://github.com/user-attachments/assets/50670060-779b-4fef-bb5d-a223f06d511b"
/>

## Link to pull request in Documentation repository
<!-- Pull requests that add, change or remove functionality must have a
corresponding pull request in the Companion App Documentation repository
(https://github.com/home-assistant/companion.home-assistant). Please add
the number of this pull request after the "#" -->
Documentation: home-assistant/companion.home-assistant#

## Any other notes
<!-- If there is any other information of note, like if this Pull
Request is part of a bigger change, please include it here. -->
2025-07-17 12:01:29 +02:00

44 lines
1.2 KiB
Swift

import Shared
import SwiftUI
struct ImprovSuccessView: View {
let action: () -> Void
var body: some View {
Spacer()
VStack(spacing: DesignSystem.Spaces.two) {
ZStack(alignment: .bottomTrailing) {
Image(systemName: "wifi.circle.fill")
.font(.system(size: 100))
.foregroundStyle(.white, Color.haPrimary)
Image(systemName: "checkmark.circle.fill")
.font(.system(size: 35))
.foregroundStyle(.white, .green)
.overlay(
Circle()
.stroke(.regularMaterial, lineWidth: 5)
)
}
Text(verbatim: L10n.Improv.State.success)
.font(.title3.bold())
.foregroundStyle(Color(uiColor: .secondaryLabel))
}
Spacer()
nextButton
}
@ViewBuilder
private var nextButton: some View {
Button {
action()
} label: {
Text(verbatim: L10n.Improv.Button.continue)
}
.buttonStyle(.primaryButton)
.padding()
}
}
#Preview {
ImprovSuccessView {}
}