CryptoPassphrase  Check-in [8af2dff002]

Overview
Comment:Add support for removing a site
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 8af2dff0024267be14fa594ff45e1d405ccb736f1b7f4e8fb1b3336e0b66234c
User & Date: js on 2016-10-09 16:37:48
Other Links: manifest | tags
Context
2016-10-09
16:39
[iOS] Fix legacy toggle check-in: 830f7b5893 user: js tags: trunk
16:37
Add support for removing a site check-in: 8af2dff002 user: js tags: trunk
15:53
Add initial iOS application check-in: 461f9773b4 user: js tags: trunk
Changes

Modified iOS/Base.lproj/Main.storyboard from [476fab2345] to [20e260d9fa].

398
399
400
401
402
403
404
405







406
407
408
409
410
411
412
413
414
415
416
417
418
                            </tableViewSection>
                        </sections>
                        <connections>
                            <outlet property="dataSource" destination="ayJ-fs-aIU" id="kaj-Eg-sHs"/>
                            <outlet property="delegate" destination="ayJ-fs-aIU" id="af9-4J-p1D"/>
                        </connections>
                    </tableView>
                    <navigationItem key="navigationItem" id="xhc-og-4ho"/>







                    <connections>
                        <outlet property="legacySwitch" destination="qW3-51-hZP" id="NsI-F3-hVQ"/>
                        <outlet property="lengthField" destination="Lp1-jC-8cn" id="05B-m5-JnB"/>
                        <outlet property="nameField" destination="4Le-mO-AdY" id="kSd-Rz-Zai"/>
                        <outlet property="passphraseField" destination="DJv-Ey-Hka" id="zkA-6v-zc1"/>
                    </connections>
                </tableViewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="o5r-z3-hVF" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="1992.8" y="-265.81709145427288"/>
        </scene>
    </scenes>
</document>







|
>
>
>
>
>
>
>













398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
                            </tableViewSection>
                        </sections>
                        <connections>
                            <outlet property="dataSource" destination="ayJ-fs-aIU" id="kaj-Eg-sHs"/>
                            <outlet property="delegate" destination="ayJ-fs-aIU" id="af9-4J-p1D"/>
                        </connections>
                    </tableView>
                    <navigationItem key="navigationItem" id="xhc-og-4ho">
                        <barButtonItem key="rightBarButtonItem" title="Remove" id="vzP-cA-Wig">
                            <color key="tintColor" red="1" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
                            <connections>
                                <action selector="remove:" destination="ayJ-fs-aIU" id="0mA-Jx-Oqa"/>
                            </connections>
                        </barButtonItem>
                    </navigationItem>
                    <connections>
                        <outlet property="legacySwitch" destination="qW3-51-hZP" id="NsI-F3-hVQ"/>
                        <outlet property="lengthField" destination="Lp1-jC-8cn" id="05B-m5-JnB"/>
                        <outlet property="nameField" destination="4Le-mO-AdY" id="kSd-Rz-Zai"/>
                        <outlet property="passphraseField" destination="DJv-Ey-Hka" id="zkA-6v-zc1"/>
                    </connections>
                </tableViewController>
                <placeholder placeholderIdentifier="IBFirstResponder" id="o5r-z3-hVF" userLabel="First Responder" sceneMemberID="firstResponder"/>
            </objects>
            <point key="canvasLocation" x="1992.8" y="-265.81709145427288"/>
        </scene>
    </scenes>
</document>

Modified iOS/ShowDetailsController.h from [7e5dadfc7f] to [9cb5aa0ebe].

33
34
35
36
37
38
39


40
}

@property (retain, nonatomic) IBOutlet UITextField *nameField;
@property (retain, nonatomic) IBOutlet UITextField *lengthField;
@property (retain, nonatomic) IBOutlet UISwitch *legacySwitch;
@property (retain, nonatomic) IBOutlet UITextField *passphraseField;
@property (retain) MainViewController *mainViewController;


@end







>
>

33
34
35
36
37
38
39
40
41
42
}

@property (retain, nonatomic) IBOutlet UITextField *nameField;
@property (retain, nonatomic) IBOutlet UITextField *lengthField;
@property (retain, nonatomic) IBOutlet UISwitch *legacySwitch;
@property (retain, nonatomic) IBOutlet UITextField *passphraseField;
@property (retain) MainViewController *mainViewController;

- (IBAction)remove: (id)sender;
@end

Modified iOS/ShowDetailsController.m from [76ff0845ba] to [a896899871].

179
180
181
182
183
184
185

























186
	NSMutableString *password = [NSMutableString
	    stringWithUTF8String: (char*)generator.output];
	of_explicit_memset(generator.output, 0,
	    strlen((char*)generator.output));

	return password;
}

























@end







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>

179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
	NSMutableString *password = [NSMutableString
	    stringWithUTF8String: (char*)generator.output];
	of_explicit_memset(generator.output, 0,
	    strlen((char*)generator.output));

	return password;
}

- (IBAction)remove: (id)sender
{
	UIAlertController *alert = [UIAlertController
	    alertControllerWithTitle: @"Remove Site?"
			     message: @"Do you want to remove this site?"
		      preferredStyle: UIAlertControllerStyleAlert];
	[alert addAction:
	    [UIAlertAction actionWithTitle: @"No"
				     style: UIAlertActionStyleCancel
				   handler: nil]];
	[alert addAction:
	    [UIAlertAction actionWithTitle: @"Yes"
				     style: UIAlertActionStyleDestructive
				   handler: ^ (UIAlertAction *action) {
		[self.mainViewController.siteStorage removeSite: _name];
		[self.mainViewController.tableView reloadData];

		[self.navigationController popViewControllerAnimated: YES];
	}]];

	[self presentViewController: alert
			   animated: YES
			 completion: nil];
}
@end