Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(512)

Side by Side Diff: chrome/browser/resources/md_user_manager/create_profile.html

Issue 2068713003: Refactors profile avatar selector into a Polymer element to use in md-settings & md-user-manager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="/import_supervised_user.html"> 1 <link rel="import" href="/import_supervised_user.html">
2 <link rel="import" href="/profile_browser_proxy.html"> 2 <link rel="import" href="/profile_browser_proxy.html">
3 <link rel="import" href="/shared_styles.html"> 3 <link rel="import" href="/shared_styles.html">
4 <link rel="import" href="chrome://resources/cr_elements/cr_profile_avatar_select or/cr_profile_avatar_selector.html">
4 <link rel="import" href="chrome://resources/cr_elements/icons.html"> 5 <link rel="import" href="chrome://resources/cr_elements/icons.html">
5 <link rel="import" href="chrome://resources/html/action_link.html"> 6 <link rel="import" href="chrome://resources/html/action_link.html">
6 <link rel="import" href="chrome://resources/html/cr.html"> 7 <link rel="import" href="chrome://resources/html/cr.html">
7 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> 8 <link rel="import" href="chrome://resources/html/i18n_behavior.html">
8 <link rel="import" href="chrome://resources/html/polymer.html"> 9 <link rel="import" href="chrome://resources/html/polymer.html">
9 <link rel="import" href="chrome://resources/html/util.html"> 10 <link rel="import" href="chrome://resources/html/util.html">
10 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html"> 11 <link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
11 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
12 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html"> 13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-checkbox/paper-ch eckbox.html">
13 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.html"> 14 <link rel="import" href="chrome://resources/polymer/v1_0/paper-dropdown-menu/pap er-dropdown-menu.html">
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 }; 80 };
80 --paper-input-container-underline-focus: var(--google-blue-500); 81 --paper-input-container-underline-focus: var(--google-blue-500);
81 } 82 }
82 83
83 #nameInput { 84 #nameInput {
84 margin-bottom: 24px; 85 margin-bottom: 24px;
85 margin-top: 32px; 86 margin-top: 32px;
86 width: 300px; 87 width: 300px;
87 } 88 }
88 89
89 #icons {
90 display: flex;
91 flex-wrap: wrap;
92 margin: -12px;
93 }
94
95 #icons paper-button {
96 --paper-button: {
97 background: var(--paper-grey-300);
98 };
99 --paper-button-flat-keyboard-focus: {
100 background: var(--paper-grey-400);
101 };
102 border: var(--user-manager-separator-line);
103 margin: 12px;
104 min-width: 0;
105 padding: 6px 4px;
106 }
107
108 #icons paper-button[active] {
109 border-color: var(--google-blue-500);
110 }
111
112 paper-checkbox { 90 paper-checkbox {
113 --paper-checkbox-checked-color: var(--google-blue-500); 91 --paper-checkbox-checked-color: var(--google-blue-500);
114 --paper-checkbox-label-spacing: 16px; 92 --paper-checkbox-label-spacing: 16px;
115 --paper-checkbox-size: 16px; 93 --paper-checkbox-size: 16px;
116 --paper-checkbox-unchecked-color: var(--paper-grey-600); 94 --paper-checkbox-unchecked-color: var(--paper-grey-600);
117 margin-top: 24px; 95 margin-top: 24px;
118 } 96 }
119 97
120 #supervised-user-container { 98 #supervised-user-container {
121 -webkit-padding-start: 32px; 99 -webkit-padding-start: 32px;
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 </style> 156 </style>
179 <div id="message-container" visible$="[[isMessageVisble_]]"> 157 <div id="message-container" visible$="[[isMessageVisble_]]">
180 <iron-icon icon="cr:warning"></iron-icon> 158 <iron-icon icon="cr:warning"></iron-icon>
181 <span id="message" inner-h-t-m-l="[[message_]]"></span> 159 <span id="message" inner-h-t-m-l="[[message_]]"></span>
182 </div> 160 </div>
183 <div class="container"> 161 <div class="container">
184 <div id="title-bar">$i18n{createProfileTitle}</div> 162 <div id="title-bar">$i18n{createProfileTitle}</div>
185 <paper-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*" 163 <paper-input id="nameInput" value="{{profileName_}}" pattern=".*\S.*"
186 no-label-float auto-validate> 164 no-label-float auto-validate>
187 </paper-input> 165 </paper-input>
188 <div id="icons"> 166 <cr-profile-avatar-selector avatars="[[availableIcons_]]"
189 <template is="dom-repeat" items="[[availableIcons_]]"> 167 selected-avatar-url="{{profileIconUrl_}}">
190 <paper-button toggles on-tap="onIconTap_" 168 </cr-profile-avatar-selector>
191 data-icon-url$="[[item.url]]"
192 active="[[isActiveIcon_(item.url, profileIconUrl_)]]">
193 <img src="[[item.url]]" alt="[[item.label]]">
194 </paper-button>
195 </template>
196 </div>
197 <paper-checkbox checked="{{isSupervised_}}"> 169 <paper-checkbox checked="{{isSupervised_}}">
198 $i18n{manageProfilesSupervisedSignedInLabel} 170 $i18n{manageProfilesSupervisedSignedInLabel}
199 </paper-checkbox> 171 </paper-checkbox>
200 <div id="supervised-user-container"> 172 <div id="supervised-user-container">
201 <div id="learn-more" > 173 <div id="learn-more" >
202 <a is="action-link" on-tap="onLearnMoreTap_">$i18n{learnMore}</a> 174 <a is="action-link" on-tap="onLearnMoreTap_">$i18n{learnMore}</a>
203 </div> 175 </div>
204 <template is="dom-if" if="[[isSupervised_]]"> 176 <template is="dom-if" if="[[isSupervised_]]">
205 <template is="dom-if" if="[[isSignedIn_(signedInUsers_)]]"> 177 <template is="dom-if" if="[[isSignedIn_(signedInUsers_)]]">
206 <paper-dropdown-menu label="$i18n{selectAnAccount}" no-label-float> 178 <paper-dropdown-menu label="$i18n{selectAnAccount}" no-label-float>
(...skipping 28 matching lines...) Expand all
235 <paper-button id="save" class="action primary" on-tap="onSaveTap_" 207 <paper-button id="save" class="action primary" on-tap="onSaveTap_"
236 disabled="[[isSaveDisabled_(createInProgress_, profileName_)]]"> 208 disabled="[[isSaveDisabled_(createInProgress_, profileName_)]]">
237 $i18n{createProfileConfirm} 209 $i18n{createProfileConfirm}
238 </paper-button> 210 </paper-button>
239 </div> 211 </div>
240 <import-supervised-user id="importUserPopup"></import-supervised-user> 212 <import-supervised-user id="importUserPopup"></import-supervised-user>
241 </div> 213 </div>
242 </template> 214 </template>
243 <script src="create_profile.js"></script> 215 <script src="create_profile.js"></script>
244 </dom-module> 216 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698