-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* added debug menu * debug levels * DebugManager initial commit - DebugManager created - Added functions to generate Versions.txt and Readme.txt - Error propagation added with Result * Debug manager * L1/L2 files generation added to DebugModeManager * Zip archive method added - Temp directory created for files * Anonimization method added for payload - Zip module added * part of version 1.2.0 * part of version 1.2.0 * Refactored and DebugLevel check added * no message * Share button added * Presentation logic added * fixed UI * Fixed draw methods * Refactor of scannings * Updated connection * Minor fixes * Fixes in cert viewer * Separated certificate structure, added verifier * Certificate separated for 3 objects * Updated Settings UI * Fixed UI Storyboards * Worked with Errors. Start * Added Error detectin, added Scan to storyboard * Added Logger * Added logs, refactoring * Added loading to Home * Refactored core and controllers * Increased version num * Refactored storages - begin * minor * Fixed productivity of validation * Fixed Performance - continue * Removed debug xib * removed all xib files * Fixed Validatation, Fixed perfomance and fixed All UI issues * Added cancel state during validation * Refactoring Verifier data * Fixed bugs with limited validity * Fixed app id * fixed storyboard * Fixed expand buttons * refactored network calls * Fix loading data at the app start * Fixed Debug mode * Fixed Debug mode II * Added rerloading to the settings * added Expired data time * Fix freez * Fixed Freezing on scaning screen * Fixed shared button * Removed FloatingPanel * Fixed share button, improved loading * Fixed Debug rule error * Upgrade version num * minor changes * Added logger * Fixed orientations * Ordered app colors * remove unnecessary import * changes in res * Added localization for existed strings * Continue update localizations * Update Verifier after Core clean up * Added localization to Verifier * Format strings fixed Co-authored-by: Alexandr Chernyy <[email protected]> Co-authored-by: Illia Vlasov <[email protected]> Co-authored-by: Test <[email protected]> Co-authored-by: ikhomiak <[email protected]>
- Loading branch information
1 parent
e91130c
commit 3d8ccd8
Showing
79 changed files
with
5,007 additions
and
1,877 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -217,4 +217,5 @@ xcuserdata/ | |
# | ||
|
||
|
||
/Pods/ | ||
/Pods/ | ||
DGCAVerifier.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved |
Large diffs are not rendered by default.
Oops, something went wrong.
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,95 @@ | ||
// | ||
/*- | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-verifier-app-ios | ||
* --- | ||
* Copyright (C) 2021 T-Systems International GmbH and all other contributors | ||
* --- | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* ---license-end | ||
*/ | ||
// | ||
// DebugRawCell.swift | ||
// DGCAVerifier | ||
// | ||
// Created by Alexandr Chernyy on 07.09.2021. | ||
// | ||
|
||
|
||
import UIKit | ||
import SwiftDGC | ||
|
||
protocol DebugRawSharing: AnyObject { | ||
func userDidShare(text: String) | ||
} | ||
|
||
class DebugRawCell: UITableViewCell, UIContextMenuInteractionDelegate { | ||
@IBOutlet fileprivate weak var rawLabel: UILabel! | ||
weak var delegate: DebugRawSharing? | ||
|
||
override func awakeFromNib() { | ||
super.awakeFromNib() | ||
if #available(iOS 13.0, *) { | ||
let interaction = UIContextMenuInteraction(delegate: self) | ||
|
||
rawLabel.isUserInteractionEnabled = true | ||
rawLabel.addInteraction(interaction) | ||
} else { | ||
// Fallback on earlier versions | ||
} | ||
} | ||
|
||
func setupCell(for _: DebugSectionModel, cert: HCert?) { | ||
self.cert = cert | ||
} | ||
|
||
private var cert: HCert? { | ||
didSet { | ||
setupView() | ||
} | ||
} | ||
|
||
private func setupView() { | ||
guard let cert = cert else { | ||
rawLabel.text = "" | ||
return | ||
} | ||
rawLabel.text = cert.body.description | ||
rawLabel.sizeToFit() | ||
} | ||
|
||
@objc @available(iOS 13.0, *) | ||
func contextMenuInteraction(_ interaction: UIContextMenuInteraction, | ||
configurationForMenuAtLocation location: CGPoint) | ||
-> UIContextMenuConfiguration? { | ||
|
||
let copy = UIAction(title: "Copy Raw Data", | ||
image: UIImage(systemName: "doc.on.doc.fill")) { [unowned self] _ in | ||
|
||
UIPasteboard.general.string = self.rawLabel.text | ||
} | ||
|
||
let share = UIAction(title: "Share Raw Data", | ||
image: UIImage(systemName: "square.and.arrow.up.fill")) { [unowned self] _ in | ||
self.delegate?.userDidShare(text: self.rawLabel.text ?? "") | ||
} | ||
if let txt = self.rawLabel.text, !txt.isEmpty { | ||
return UIContextMenuConfiguration(identifier: nil, previewProvider: nil) { _ in | ||
UIMenu(title: "Actions", children: [ copy, share ]) | ||
} | ||
} else { | ||
return nil | ||
} | ||
} | ||
|
||
} |
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,82 @@ | ||
// | ||
/*- | ||
* ---license-start | ||
* eu-digital-green-certificates / dgca-verifier-app-ios | ||
* --- | ||
* Copyright (C) 2021 T-Systems International GmbH and all other contributors | ||
* --- | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* ---license-end | ||
*/ | ||
// | ||
// DebugSectionCell.swift | ||
// DGCAVerifier | ||
// | ||
// Created by Alexandr Chernyy on 07.09.2021. | ||
// | ||
|
||
|
||
import UIKit | ||
|
||
typealias ExpandBlock = (_ debugSection: DebugSectionModel?) -> Void | ||
|
||
class DebugSectionCell: UITableViewCell { | ||
@IBOutlet fileprivate weak var nameLabel: UILabel! | ||
@IBOutlet fileprivate weak var expandButton: UIButton! | ||
|
||
var expandCallback: ExpandBlock? | ||
private var debugSection: DebugSectionModel? { | ||
didSet { | ||
setupView() | ||
} | ||
} | ||
|
||
func setupCell(for debugSection: DebugSectionModel) { | ||
self.debugSection = debugSection | ||
} | ||
|
||
override func prepareForReuse() { | ||
super.prepareForReuse() | ||
debugSection = nil | ||
} | ||
|
||
@IBAction func expandAction(_ sender: Any) { | ||
guard let debugSection = debugSection else { return } | ||
debugSection.isExpanded = !debugSection.isExpanded | ||
expandCallback?(debugSection) | ||
if debugSection.isExpanded { | ||
expandButton.setTitle("▼", for: .normal) | ||
} else { | ||
expandButton.setTitle("▶︎", for: .normal) | ||
} | ||
} | ||
|
||
// MARK: Private methods | ||
private func setupView() { | ||
guard let debugSection = debugSection else { | ||
clearView() | ||
return | ||
} | ||
if debugSection.isExpanded { | ||
expandButton.setTitle("▼", for: .normal) | ||
} else { | ||
expandButton.setTitle("▶︎", for: .normal) | ||
} | ||
nameLabel.text = debugSection.sectionType.rawValue | ||
} | ||
|
||
private func clearView() { | ||
nameLabel.text = "" | ||
expandButton.setTitle("", for: .normal) | ||
} | ||
} |
Oops, something went wrong.