MCPcopy Create free account
hub / github.com/altic-dev/FluidVoice / instructionsBox

Method instructionsBox

Sources/Fluid/UI/SettingsView.swift:1963–1998  ·  view source on GitHub ↗
(title: String, steps: [String], warningStyle: Bool)

Source from the content-addressed store, hash-verified

1961 }
1962
1963 private func instructionsBox(
1964 title: String,
1965 steps: [String],
1966 warningStyle: Bool = false
1967 ) -> some View {
1968 VStack(alignment: .leading, spacing: 8) {
1969 HStack(spacing: 6) {
1970 Image(systemName: "info.circle.fill")
1971 .foregroundStyle(warningStyle ? self.theme.palette.warning : self.theme.palette.accent)
1972 .font(.caption)
1973 Text(title)
1974 .font(self.theme.typography.bodySmallStrong)
1975 .foregroundStyle(self.settingsTitleText)
1976 }
1977
1978 VStack(alignment: .leading, spacing: 4) {
1979 ForEach(Array(steps.enumerated()), id: \.offset) { index, step in
1980 HStack(alignment: .top, spacing: 8) {
1981 Text("\(index + 1).")
1982 .font(.caption)
1983 .foregroundStyle(warningStyle ? self.theme.palette.warning : self.theme.palette.accent)
1984 .fontWeight(.semibold)
1985 .frame(width: 16, alignment: .trailing)
1986 Text(.init(step))
1987 .font(.caption)
1988 .foregroundStyle(.primary)
1989 }
1990 }
1991 }
1992 }
1993 .padding(12)
1994 .background(
1995 RoundedRectangle(cornerRadius: 8, style: .continuous)
1996 .fill((warningStyle ? self.theme.palette.warning : self.theme.palette.accent).opacity(0.12))
1997 )
1998 }
1999
2000 @ViewBuilder
2001 private func primaryDictationShortcutsList() -> some View {

Callers 1

SettingsViewStruct · 0.95

Calls 1

fillMethod · 0.80

Tested by

no test coverage detected