Commit 506fb865 authored by Monica Basta's avatar Monica Basta Committed by Commit Bot

[ProfilePicker]: Add chrome logo + title text for the main view.

Screenshot:
https://drive.google.com/file/d/1TV-gYNJkIQ99opvaY3YanKGfPYeKUHle/view?usp=sharing

Bug: 1063856
Change-Id: I40675ec609fb2a1cd358e72be17b982ebe663779
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2302904
Commit-Queue: Monica Basta <msalama@chromium.org>
Reviewed-by: default avatarRebekah Potter <rbpotter@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790298}
parent af72e846
......@@ -1145,6 +1145,16 @@ Chromium is unable to recover your settings.
</if>
<!-- Profile Picker -->
<if expr="not chromeos and not is_android">
<message name="IDS_PROFILE_PICKER_MAIN_VIEW_TITLE" desc="Profile picker main view title">
Pick your Chromium Space
</message>
<message name="IDS_PROFILE_PICKER_MAIN_VIEW_SUBTITLE" desc="Profile picker main view subtitle">
Use Chromium Spaces to keep your browsing organized on this device
</message>
</if>
</messages>
</release>
</grit>
c3d7fda79021a7aced9e44521ec13b3d450f9e59
\ No newline at end of file
c3d7fda79021a7aced9e44521ec13b3d450f9e59
\ No newline at end of file
......@@ -1160,6 +1160,17 @@ Google Chrome is unable to recover your settings.
Your parent has turned off "Permissions for sites, apps and extensions" for Chrome. Enabling this <ph name="EXTENSION_TYPE_PARAMETER">$1<ex>extension</ex></ph> is not allowed.
</message>
</if>
<!-- Profile Picker -->
<if expr="not chromeos and not is_android">
<message name="IDS_PROFILE_PICKER_MAIN_VIEW_TITLE" desc="Profile picker main view title">
Pick your Chrome Space
</message>
<message name="IDS_PROFILE_PICKER_MAIN_VIEW_SUBTITLE" desc="Profile picker main view subtitle">
Use Chrome Spaces to keep your browsing organized on this device
</message>
</if>
</messages>
</release>
</grit>
c3d7fda79021a7aced9e44521ec13b3d450f9e59
\ No newline at end of file
c3d7fda79021a7aced9e44521ec13b3d450f9e59
\ No newline at end of file
......@@ -69,5 +69,6 @@ html_to_js("web_components_local") {
"profile_picker_app.js",
"profile_picker_main_view.js",
"profile_card.js",
"profile_picker_shared_css.js",
]
}
<style>
<style include="profile-picker-shared">
cr-view-manager {
display: flex;
font-size: 100%;
......
......@@ -5,6 +5,7 @@
import 'chrome://resources/cr_elements/cr_view_manager/cr_view_manager.m.js';
import 'chrome://resources/cr_elements/cr_lazy_render/cr_lazy_render.m.js';
import './profile_picker_main_view.js';
import './profile_picker_shared_css.js';
import {assert, assertNotReached} from 'chrome://resources/js/assert.m.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
......
<style>
<style include="profile-picker-shared">
:host {
--avatar-icon-size: 74px;
--banner-img-height: 628px;
......@@ -26,6 +26,11 @@
right: 0;
}
.title-container {
margin: 30px auto;
text-align: center;
}
.profiles-container {
--grid-gutter: 24px;
--profile-item-height:178px;
......@@ -92,6 +97,14 @@
</style>
<div id="leftBanner" class="banner"></div>
<div class="title-container">
<img id="product-logo" on-click="onProductLogoTap_"
srcset="chrome://theme/current-channel-logo@1x 1x,
chrome://theme/current-channel-logo@2x 2x"
role="presentation">
<h2>$i18n{mainViewTitle}</h2>
<h3>$i18n{mainViewSubtitle}</h3>
</div>
<div class="profiles-container">
<template is="dom-repeat"
hidden="[[!profilesList_]]" items="[[profilesList_]]">
......
......@@ -6,6 +6,7 @@ import 'chrome://resources/cr_elements/cr_icon_button/cr_icon_button.m.js';
import 'chrome://resources/cr_elements/shared_vars_css.m.js';
import './icons.js';
import './profile_card.js';
import './profile_picker_shared_css.js';
import {WebUIListenerBehavior} from 'chrome://resources/js/web_ui_listener_behavior.m.js';
import {html, Polymer} from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
......@@ -47,6 +48,18 @@ Polymer({
this.manageProfilesBrowserProxy_.initializeMainView();
},
/** @private */
onProductLogoTap_() {
this.$['product-logo'].animate(
{
transform: ['none', 'rotate(-10turn)'],
},
{
duration: 500,
easing: 'cubic-bezier(1, 0, 0, 1)',
});
},
/**
* Handler for when the profiles list are updated.
* @param {!Array<!ProfileState>} profilesList
......
......@@ -21,16 +21,19 @@
<!-- Generated Polymer 3 elements -->
<include name="IDR_PROFILE_PICKER_PROFILE_PICKER_MAIN_VIEW_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_picker_main_view.js"
use_base_dir="false" type="BINDATA" preprocess="true"/>
use_base_dir="false" type="BINDATA"/>
<include name="IDR_PROFILE_PICKER_PROFILE_PICKER_APP_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_picker_app.js"
use_base_dir="false" type="BINDATA" preprocess="true"/>
use_base_dir="false" type="BINDATA"/>
<include name="IDR_PROFILE_PICKER_PROFILE_CARD_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_card.js"
use_base_dir="false" type="BINDATA" preprocess="true"/>
<include name="IDR_PROFILE_PICKER_PROFILE_CREATION_FLOW_PROFILE_TYPE_CHOICE_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_creation_flow/profile_type_choice.js"
use_base_dir="false" type="BINDATA"/>
<include name="IDR_PROFILE_PICKER_PROFILE_PICKER_SHARED_CSS_JS"
file="${root_gen_dir}/chrome/browser/resources/signin/profile_picker/profile_picker_shared_css.js"
use_base_dir="false" type="BINDATA"/>
</includes>
<structures>
<structure
......
<template>
<style>
h3 {
color: var(--google-grey-refresh-700);
font-weight: 500;
}
</style>
</template>
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'chrome://resources/cr_elements/shared_vars_css.m.js';
import 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
const template = document.createElement('template');
template.innerHTML = `
<dom-module id="profile-picker-shared">{__html_template__}</dom-module>
`;
document.body.appendChild(template.content.cloneNode(true));
......@@ -8,9 +8,23 @@
#include "chrome/browser/ui/webui/signin/profile_picker_handler.h"
#include "chrome/browser/ui/webui/webui_util.h"
#include "chrome/common/webui_url_constants.h"
#include "chrome/grit/chromium_strings.h"
#include "chrome/grit/profile_picker_resources.h"
#include "chrome/grit/profile_picker_resources_map.h"
#include "content/public/browser/web_ui_data_source.h"
#include "ui/base/webui/web_ui_util.h"
namespace {
void AddStrings(content::WebUIDataSource* html_source) {
static constexpr webui::LocalizedString kLocalizedStrings[] = {
{"mainViewTitle", IDS_PROFILE_PICKER_MAIN_VIEW_TITLE},
{"mainViewSubtitle", IDS_PROFILE_PICKER_MAIN_VIEW_SUBTITLE},
};
AddLocalizedStringsBulk(html_source, kLocalizedStrings);
}
} // namespace
ProfilePickerUI::ProfilePickerUI(content::WebUI* web_ui)
: content::WebUIController(web_ui) {
......@@ -27,6 +41,7 @@ ProfilePickerUI::ProfilePickerUI(content::WebUI* web_ui)
base::make_span(kProfilePickerResources, kProfilePickerResourcesSize),
generated_path, IDR_PROFILE_PICKER_PROFILE_PICKER_HTML);
AddStrings(html_source);
content::WebUIDataSource::Add(profile, html_source);
}
......
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