Skip to content

Commit

Permalink
Added log collection and cleaning features together with the option t…
Browse files Browse the repository at this point in the history
…o hide or show the CIE ID tutorial at launch.
  • Loading branch information
AntonioCiccarelli committed Oct 10, 2024
1 parent 33b2258 commit d6fcdeb
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 85 deletions.
58 changes: 0 additions & 58 deletions CIE ID/AppDelegate.m
Original file line number Diff line number Diff line change
Expand Up @@ -338,62 +338,4 @@ - (void) cardNotRegistered: (NSString*) pan
vc.messageLabel.stringValue = @"La carta non è stata abbinata. Aprire CIE ID per abbinare la carta";
}

- (bool) cieidIsRunning
{
return [NSRunningApplication runningApplicationsWithBundleIdentifier: @"it.ipzs.SoftwareCIE"].count > 0;
}

- (void) pinLocked
{
MessageViewController* vc = MessageViewController.freshController;
vc.popover = _popover;
_popover.contentViewController = vc;
[self showPopover:self];

BOOL processIsRunning = self.cieidIsRunning;

if(processIsRunning)
{
vc.messageLabel.stringValue = @"La carta è bloccata. Sbloccarla usando il PUK";
vc.cieidButton.hidden = YES;
vc.closeButton.frame = CGRectMake((vc.view.frame.size.width - vc.closeButton.frame.size.width) / 2, vc.closeButton.frame.origin.y, vc.closeButton.frame.size.width, vc.closeButton.frame.size.height);
}
else
{
vc.messageLabel.stringValue = @"La carta è bloccata. Aprire CIE ID e sbloccarla usando il PUK";
}
}

- (void) pinWrong: (int) remainingTrials
{
MessageViewController* vc = MessageViewController.freshController;
vc.popover = _popover;
_popover.contentViewController = vc;
[self showPopover:self];

vc.messageLabel.stringValue = @"Il PIN digitato è errato";

vc.cieidButton.hidden = YES;
vc.closeButton.frame = CGRectMake((vc.view.frame.size.width - vc.closeButton.frame.size.width) / 2, vc.closeButton.frame.origin.y, vc.closeButton.frame.size.width, vc.closeButton.frame.size.height);
}

- (void) cardNotRegistered: (NSString*) pan
{
MessageViewController* vc = MessageViewController.freshController;
vc.popover = _popover;
_popover.contentViewController = vc;
[self showPopover:self];

BOOL processIsRunning = self.cieidIsRunning;

if(processIsRunning)
{
vc.messageLabel.stringValue = @"La carta non è stata abbinata. Abbinare la carta";
vc.cieidButton.hidden = YES;
vc.closeButton.frame = CGRectMake((vc.view.frame.size.width - vc.closeButton.frame.size.width) / 2, vc.closeButton.frame.origin.y, vc.closeButton.frame.size.width, vc.closeButton.frame.size.height);
}
else
vc.messageLabel.stringValue = @"La carta non è stata abbinata. Aprire CIE ID per abbinare la carta";
}

@end
1 change: 0 additions & 1 deletion CIE ID/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -4096,7 +4096,6 @@ DQ
<constraint firstItem="EYE-sm-uR4" firstAttribute="top" secondItem="yvX-nj-KxS" secondAttribute="top" constant="37" id="Bkv-Oy-0jN"/>
<constraint firstItem="c6f-vq-Vke" firstAttribute="top" secondItem="EYE-sm-uR4" secondAttribute="bottom" constant="8" id="Lns-n6-eBF"/>
<constraint firstItem="t90-0W-cRQ" firstAttribute="leading" secondItem="yvX-nj-KxS" secondAttribute="leading" constant="64" id="cTh-Wf-NNe"/>
<constraint firstItem="t90-0W-cRQ" firstAttribute="leading" secondItem="yvX-nj-KxS" secondAttribute="leading" constant="64" id="cTh-Wf-NNe"/>
<constraint firstItem="t90-0W-cRQ" firstAttribute="top" secondItem="c6f-vq-Vke" secondAttribute="bottom" constant="32" id="t0I-PP-ZiU"/>
</constraints>
</view>
Expand Down
25 changes: 0 additions & 25 deletions CIE ID/MainViewController.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,6 @@ NS_ASSUME_NONNULL_BEGIN
@property IBOutlet NSView* changePINOKPageView;
@property IBOutlet NSView* unlockPageView;
@property IBOutlet NSView* unlockOKPageView;
@property IBOutlet NSView* changePINPageView;
@property IBOutlet NSView* changePINOKPageView;
@property IBOutlet NSView* unlockPageView;
@property IBOutlet NSView* unlockOKPageView;
@property IBOutlet NSView* helpPageView;
@property IBOutlet NSView* infoPageView;
@property IBOutlet NSView* selectFilePageView;
Expand All @@ -38,37 +34,23 @@ NS_ASSUME_NONNULL_BEGIN
@property IBOutlet NSView* customizeGraphicSignatureView;
@property IBOutlet NSView* verifyView;
@property IBOutlet NSView* settingsView;
@property IBOutlet NSView* signOperationView;
@property IBOutlet NSView* signPreView;
@property IBOutlet NSView* signPINView;
@property IBOutlet NSView* customizeGraphicSignatureView;
@property IBOutlet NSView* verifyView;
@property IBOutlet NSView* settingsView;

@property IBOutlet NSTextField* labelHelp;
@property IBOutlet WKWebView* helpWebView;
@property IBOutlet WKWebView* infoWebView;

@property (weak) IBOutlet NSButton* btnPair;
@property (weak) IBOutlet NSButton* btnAbort;
@property (weak) IBOutlet NSButton* btnPair;
@property (weak) IBOutlet NSButton* btnAbort;

@property IBOutlet NSImageView* helpImageView;
@property IBOutlet NSImageView* unlockImageView;
@property IBOutlet NSImageView* helpImageView;
@property IBOutlet NSImageView* unlockImageView;

@property IBOutlet NSTextField* labelProgress;
@property IBOutlet NSProgressIndicator* progressIndicator;

@property IBOutlet NSTextField* labelProgressChangePIN;
@property IBOutlet NSProgressIndicator* progressIndicatorChangePIN;
@property IBOutlet NSTextField* labelProgressChangePIN;
@property IBOutlet NSProgressIndicator* progressIndicatorChangePIN;

@property IBOutlet NSTextField* labelProgressUnlockPIN;
@property IBOutlet NSProgressIndicator* progressIndicatorUnlockPIN;
@property IBOutlet NSTextField* labelProgressUnlockPIN;
@property IBOutlet NSProgressIndicator* progressIndicatorUnlockPIN;

Expand All @@ -79,23 +61,16 @@ NS_ASSUME_NONNULL_BEGIN
@property IBOutlet NSTextField* textFieldPUK;
@property IBOutlet NSTextField* textFieldNewUnlockPIN;
@property IBOutlet NSTextField* textFieldConfirmUnlockPIN;
@property IBOutlet NSTextField* textFieldNewUnlockPIN;
@property IBOutlet NSTextField* textFieldConfirmUnlockPIN;

@property IBOutlet NSView* homeButtonView;
@property IBOutlet NSView* changePINButtonView;
@property IBOutlet NSView* unlockPINButtonView;
@property IBOutlet NSView* changePINButtonView;
@property IBOutlet NSView* unlockPINButtonView;
@property IBOutlet NSView* tutorialButtonView;
@property IBOutlet NSView* helpButtonView;
@property IBOutlet NSView* infoButtonView;
@property IBOutlet NSView* digitalSignatureButtonView;
@property IBOutlet NSView* verifySignatureButtonView;
@property IBOutlet NSView* settingsButtonView;
@property IBOutlet NSView* digitalSignatureButtonView;
@property IBOutlet NSView* verifySignatureButtonView;
@property IBOutlet NSView* settingsButtonView;

@property (weak) IBOutlet CarouselView *carouselView;

Expand Down
2 changes: 1 addition & 1 deletion CIE ID/MainViewController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -1691,7 +1691,7 @@ - (IBAction)btnFirmaOp:(id)sender {
NSString *filePathNoSpaces = [filePath stringByReplacingOccurrencesOfString:@" " withString:@""];
NSString* fileType = [[NSURL URLWithString:filePathNoSpaces] pathExtension];

self.fullPINSignature = [self.carouselView shouldUseFullPINForSignature];
self.fullPINSignature = [[cieList getDictionary] count] == 0 || [self.carouselView shouldUseFullPINForSignature];

if ([fileType isEqualTo:@"pdf"] && !self.fullPINSignature) {
[_cbGraphicSignature setEnabled:YES];
Expand Down
Binary file removed cie_sign_sdk/Dependencies/podofo/libpodofo_old.a
Binary file not shown.

0 comments on commit d6fcdeb

Please sign in to comment.