forked from flipperdevices/Flipper-iOS-App
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add connection error to reader attack
- Loading branch information
1 parent
5f429ed
commit 19115bc
Showing
24 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
54 changes: 54 additions & 0 deletions
54
Flipper/Packages/UI/Sources/Hub/NFCTools/ReaderAttack/Components/AttackConnectionError.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import SwiftUI | ||
import Peripheral | ||
|
||
struct AttackConnectionError: View { | ||
let fliperColor: FlipperColor | ||
|
||
var instructions: [AttributedString] = { | ||
[ | ||
"Check Bluetooth connection with Flipper", | ||
"Make sure Flipper is Turned On", | ||
"If Flipper doesn’t respond, reboot it and connect to " + | ||
"the app via Bluetooth", | ||
"Restart **Mfkey32 (Detect Reader)**" | ||
] | ||
.compactMap { | ||
try? .init( | ||
markdown: $0, | ||
options: .init( | ||
allowsExtendedAttributes: true, | ||
interpretedSyntax: .full)) | ||
} | ||
}() | ||
|
||
var body: some View { | ||
VStack(spacing: 18) { | ||
Text("Flipper is not Connected") | ||
.font(.system(size: 18, weight: .bold)) | ||
|
||
VStack(spacing: 26) { | ||
Image( | ||
fliperColor == .white | ||
? "FlipperDeadWhite" | ||
: "FlipperDeadBlack" | ||
) | ||
.resizable() | ||
.aspectRatio(contentMode: .fit) | ||
.padding(.leading, 10) | ||
.padding(.trailing, 24) | ||
|
||
VStack(alignment: .leading, spacing: 8) { | ||
ForEach(instructions.indices, id: \.self) { index in | ||
HStack(alignment: .top, spacing: 0) { | ||
Text("\(index + 1). ") | ||
Text(instructions[index]) | ||
.multilineTextAlignment(.leading) | ||
} | ||
} | ||
.font(.system(size: 16)) | ||
.opacity(0.5) | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
{ | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes