OLD | NEW |
1 <link rel="import" href="chrome://md-user-manager/profile_browser_proxy.html"> | 1 <link rel="import" href="chrome://md-user-manager/profile_browser_proxy.html"> |
2 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> | 2 <link rel="import" href="chrome://md-user-manager/shared_styles.html"> |
3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> | 3 <link rel="import" href="chrome://resources/html/i18n_behavior.html"> |
4 <link rel="import" href="chrome://resources/html/polymer.html"> | 4 <link rel="import" href="chrome://resources/html/polymer.html"> |
5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> | 5 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/classe
s/iron-flex-layout.html"> |
6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> | 6 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icons/iron-icons.h
tml"> |
7 <link rel="import" href="chrome://resources/polymer/v1_0/iron-selector/iron-sele
ctor.html"> | |
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> | 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt
on.html"> |
| 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper
-icon-button.html"> |
| 9 <link rel="import" href="chrome://resources/polymer/v1_0/paper-item/paper-item.h
tml"> |
| 10 <link rel="import" href="chrome://resources/polymer/v1_0/paper-menu/paper-menu.h
tml"> |
9 | 11 |
10 <dom-module id="import-supervised-user"> | 12 <dom-module id="import-supervised-user"> |
11 <template> | 13 <template> |
12 <style include="shared-styles"> | 14 <style include="shared-styles"> |
13 #backdrop { | 15 #backdrop { |
14 align-items: center; | 16 align-items: center; |
15 background: rgba(255, 255, 255, 0.6); | 17 background: rgba(255, 255, 255, 0.6); |
16 bottom: 0; | 18 bottom: 0; |
17 display: flex; | 19 display: flex; |
18 justify-content: center; | 20 justify-content: center; |
19 left: 0; | 21 left: 0; |
20 position: absolute; | 22 position: absolute; |
21 right: 0; | 23 right: 0; |
22 top: 0; | 24 top: 0; |
23 } | 25 } |
24 | 26 |
25 #dialog { | 27 #dialog { |
26 background: white; | 28 background: white; |
27 border-radius: 2px; | 29 border-radius: 2px; |
28 box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), | 30 box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14), |
29 0 6px 30px 5px rgba(0, 0, 0, 0.12), | 31 0 6px 30px 5px rgba(0, 0, 0, 0.12), |
30 0 8px 10px -5px rgba(0, 0, 0, 0.4); | 32 0 8px 10px -5px rgba(0, 0, 0, 0.4); |
31 color: var(--paper-grey-800); | 33 color: var(--main-text-color); |
32 width: 512px; | 34 width: 512px; |
33 } | 35 } |
34 | 36 |
35 #title-bar { | 37 #title-bar { |
36 align-items: center; | 38 align-items: center; |
37 border-bottom: 1px solid rgba(0, 0, 0, .12); | 39 border-bottom: 1px solid rgba(0, 0, 0, .12); |
38 font-size: 16px; | 40 font-size: 16px; |
39 padding: 16px; | 41 padding: 16px; |
40 } | 42 } |
41 | 43 |
42 #title-bar iron-icon { | 44 #title-bar paper-icon-button { |
43 --iron-icon-height: 12px; | 45 --paper-icon-button: { |
44 --iron-icon-width: 12px; | 46 height: 36px; |
| 47 width: 36px; |
| 48 }; |
45 } | 49 } |
46 | 50 |
47 #message { | 51 #message { |
48 padding: 20px 16px 16px; | 52 padding: 20px 16px 16px; |
49 white-space: pre-wrap; | 53 white-space: pre-wrap; |
50 word-wrap: break-word; | 54 word-wrap: break-word; |
51 } | 55 } |
52 | 56 |
53 #user-list .list-item { | 57 paper-menu { |
54 align-items: center; | 58 --paper-menu-disabled-color: inherit; |
55 display: flex; | 59 --paper-menu: { |
56 height: 52px; | 60 padding: 0; |
57 padding: 0 16px; | 61 color: inherit; |
| 62 }; |
| 63 --paper-menu-focused-item: { |
| 64 background: rgba(0, 0, 0, .04); |
| 65 }; |
| 66 --paper-menu-selected-item: { |
| 67 background: rgba(0, 0, 0, .04); |
| 68 font-weight: normal; |
| 69 }; |
| 70 --paper-menu-focused-item-after: { |
| 71 background: none; |
| 72 }; |
58 } | 73 } |
59 | 74 |
60 #user-list .list-item .profile-img { | 75 paper-menu paper-item { |
| 76 --paper-item: { |
| 77 font-size: inherit; |
| 78 height: 52px; |
| 79 line-height: inherit; |
| 80 padding: 0 16px; |
| 81 }; |
| 82 --paper-item-focused-before: { |
| 83 background: none; |
| 84 } |
| 85 } |
| 86 |
| 87 paper-menu paper-item .profile-img { |
61 flex-shrink: 0; | 88 flex-shrink: 0; |
62 } | 89 } |
63 | 90 |
64 #user-list .list-item .profile-name { | 91 paper-menu paper-item .profile-name { |
65 -webkit-margin-start: 10px; | 92 -webkit-margin-start: 10px; |
66 overflow: hidden; | 93 overflow: hidden; |
67 text-overflow: ellipsis; | 94 text-overflow: ellipsis; |
68 white-space: nowrap; | 95 white-space: nowrap; |
69 } | 96 } |
70 | 97 |
71 #user-list .list-item .on-device { | 98 paper-menu paper-item .on-device { |
72 -webkit-margin-start: 10px; | 99 -webkit-margin-start: 10px; |
73 flex-shrink: 0; | 100 flex-shrink: 0; |
74 } | 101 } |
75 | 102 |
76 #user-list .list-item.selectable.iron-selected { | |
77 background: var(--paper-grey-200); | |
78 } | |
79 | |
80 #actions { | 103 #actions { |
81 margin-top: 20px; | 104 margin-top: 20px; |
82 padding: 16px; | 105 padding: 16px; |
83 } | 106 } |
84 | |
85 #actions paper-button { | |
86 border-radius: 2px; | |
87 font-weight: 500; | |
88 line-height: 36px; | |
89 margin: 0; | |
90 min-width: 52px; | |
91 padding: 0 16px; | |
92 } | |
93 | |
94 #actions #cancel { | |
95 color: var(--paper-grey-600); | |
96 } | |
97 | |
98 #actions #import { | |
99 -webkit-margin-start: 8px; | |
100 background: var(--google-blue-500); | |
101 color: white; | |
102 } | |
103 | |
104 #actions #import[disabled] { | |
105 background: rgba(66, 133, 244, .5); | |
106 } | |
107 </style> | 107 </style> |
108 <template is="dom-if" if="[[!popupHidden_]]"> | 108 <template is="dom-if" if="[[!popupHidden_]]"> |
109 <div id="backdrop"> | 109 <div id="backdrop"> |
110 <div id="dialog"> | 110 <div id="dialog"> |
111 <div id="title-bar" class="horizontal justified layout"> | 111 <div id="title-bar" class="horizontal justified layout"> |
112 <span id="title">[[i18n('supervisedUserImportTitle')]]</span> | 112 <span id="title">$i18n{supervisedUserImportTitle}</span> |
113 <iron-icon icon="close" on-tap="onCancelTap_"></iron-icon> | 113 <paper-icon-button icon="close" on-tap="onCancelTap_"> |
| 114 </paper-icon-button> |
114 </div> | 115 </div> |
115 <div id="message">[[getMessage_(supervisedUsers_)]]</div> | 116 <div id="message">[[getMessage_(supervisedUsers_)]]</div> |
116 <div id="user-list" class="content-area"> | 117 <paper-menu selected="{{supervisedUserIndex_}}"> |
117 <iron-selector selected="{{supervisedUserIndex_}}" | 118 <template is="dom-repeat" items="[[supervisedUsers_]]"> |
118 selectable=".selectable"> | 119 <paper-item disabled="[[item.onCurrentDevice]]"> |
119 <template is="dom-repeat" items="[[supervisedUsers_]]"> | 120 <img class="profile-img" src="[[item.iconURL]]"></img> |
120 <div class$="[[getUserClassNames_(item)]]"> | 121 <div class="profile-name">[[item.name]]</div> |
121 <img class="profile-img" src="[[item.iconURL]]"></img> | 122 <div class="on-device" hidden="[[!item.onCurrentDevice]]"> |
122 <div class="profile-name">[[item.name]]</div> | 123 $i18n{supervisedUserAlreadyOnThisDevice} |
123 <div class="on-device" hidden="[[!item.onCurrentDevice]]"> | |
124 [[i18n('supervisedUserAlreadyOnThisDevice')]] | |
125 </div> | |
126 </div> | 124 </div> |
127 </template> | 125 </paper-item> |
128 </iron-selector> | 126 </template> |
129 </div> | 127 </paper-menu> |
130 <div id="actions" class="horizontal end-justified layout"> | 128 <div id="actions" class="horizontal end-justified layout"> |
131 <paper-button id="cancel" on-tap="onCancelTap_"> | 129 <paper-button id="cancel" class="action secondary" |
132 [[i18n('cancel')]] | 130 on-tap="onCancelTap_"> |
| 131 $i18n{cancel} |
133 </paper-button> | 132 </paper-button> |
134 <paper-button id="import" on-tap="onImportTap_" | 133 <paper-button id="import" class="action primary" |
| 134 on-tap="onImportTap_" |
135 disabled="[[isImportDisabled_(supervisedUserIndex_)]]"> | 135 disabled="[[isImportDisabled_(supervisedUserIndex_)]]"> |
136 [[i18n('supervisedUserImportOk')]] | 136 $i18n{supervisedUserImportOk} |
137 </paper-button> | 137 </paper-button> |
138 </div> | 138 </div> |
139 </div> | 139 </div> |
140 </div> | 140 </div> |
141 </template> | 141 </template> |
142 </template> | 142 </template> |
143 <script src="chrome://md-user-manager/import_supervised_user.js"></script> | 143 <script src="chrome://md-user-manager/import_supervised_user.js"></script> |
144 </dom-module> | 144 </dom-module> |
OLD | NEW |