Commit 8a369581 authored by Javier Ernesto Flores Robles's avatar Javier Ernesto Flores Robles Committed by Commit Bot

[iOS][Password-Breach] Add help icon

Adds a help icon to the top toolbar, which will open the help center.

Bug: 1028095
Change-Id: I10320d8f65c687d8959f67b3bdaa0f43d2663ca2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1932903Reviewed-by: default avatarOlivier Robin <olivierrobin@chromium.org>
Commit-Queue: Javier Ernesto Flores Robles <javierrobles@chromium.org>
Cr-Commit-Position: refs/heads/master@{#718631}
parent 38b24c32
......@@ -244,6 +244,11 @@ constexpr CGFloat kSafeAreaMultiplier = 0.8;
[self.actionHandler passwordBreachDone];
}
// Handle taps on the help button.
- (void)didTapHelpButton {
// TODO(crbug.com/1028095): Open help center article.
}
// Handle taps on the primary action button.
- (void)didTapPrimaryActionButton {
[self.actionHandler passwordBreachPrimaryAction];
......@@ -257,6 +262,11 @@ constexpr CGFloat kSafeAreaMultiplier = 0.8;
forToolbarPosition:UIBarPositionAny];
[topToolbar setBarTintColor:[UIColor colorNamed:kBackgroundColor]];
topToolbar.delegate = self;
UIBarButtonItem* helpButton = [[UIBarButtonItem alloc]
initWithImage:[UIImage imageNamed:@"password_breach_ic_help"]
style:UIBarButtonItemStylePlain
target:self
action:@selector(didTapHelpButton)];
UIBarButtonItem* doneButton = [[UIBarButtonItem alloc]
initWithBarButtonSystemItem:UIBarButtonSystemItemDone
target:self
......@@ -265,7 +275,7 @@ constexpr CGFloat kSafeAreaMultiplier = 0.8;
initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil];
topToolbar.items = @[ spacer, doneButton ];
topToolbar.items = @[ helpButton, spacer, doneButton ];
topToolbar.translatesAutoresizingMaskIntoConstraints = NO;
return topToolbar;
}
......
......@@ -7,10 +7,19 @@ import("//build/config/ios/rules.gni")
group("resources") {
deps = [
":password_breach_ic_help",
":password_breach_illustration",
]
}
imageset("password_breach_ic_help") {
sources = [
"password_breach_ic_help.imageset/Contents.json",
"password_breach_ic_help.imageset/password_breach_ic_help@2x.png",
"password_breach_ic_help.imageset/password_breach_ic_help@3x.png",
]
}
imageset("password_breach_illustration") {
sources = [
"password_breach_illustration.imageset/Contents.json",
......
{
"images": [
{
"idiom": "universal",
"scale": "2x",
"filename": "password_breach_ic_help@2x.png"
},
{
"idiom": "universal",
"scale": "3x",
"filename": "password_breach_ic_help@3x.png"
}
],
"info": {
"version": 1,
"author": "xcode"
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment