blob: 847f192031d07e198653e6853d948197d6f8a6a2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icon_button/cr_icon_button.html">
<link rel="import" href="chrome://resources/cr_elements/cr_icons_css.html">
<link rel="import" href="chrome://resources/html/cr/ui/focus_row_behavior.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="../site_favicon.html">
<link rel="import" href="passwords_shared_css.html">
<link rel="import" href="show_password_behavior.html">
<dom-module id="password-list-item">
<template>
<style include="settings-shared passwords-shared">
#originUrl {
/* The following non-flex directives allow eliding long originUrls from
* the left. Forcing rtl should not cause an issue for right-to-left
* languages in this case, since valid URL characters are restricted to
* ASCII.
*/
direction: rtl;
display: flex;
}
#username,
#password {
color: inherit;
/* Since #password is an input element this is necessary to prevent
* Chrome from using the operating system's font instead of the Material
* Design font. TODO(dbeam): why not font: inherit? */
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
#username,
#password:not([type='password']) {
text-overflow: ellipsis;
}
#password {
<if expr="chromeos or is_linux">
font-family: 'DejaVu Sans Mono', monospace;
</if>
<if expr="is_win">
font-family: 'Consolas', monospace;
</if>
<if expr="is_macosx">
font-family: 'Menlo', monospace;
</if>
}
</style>
<div class="list-item" focus-row-container>
<div class="website-column no-min-width"
title="[[item.entry.urls.link]]">
<site-favicon url="[[item.entry.urls.link]]"></site-favicon>
<a id="originUrl" target="_blank" class="no-min-width"
href="[[item.entry.urls.link]]"
focus-row-control focus-type="originUrl">
<span class="text-elide">
<!-- This bdo tag is necessary to fix the display of domains
starting with numbers. -->
<bdo dir="ltr">[[item.entry.urls.shown]]</bdo>
</span>
</a>
</div>
<input id="username" class="username-column password-field"
readonly tabindex="-1" value="[[item.entry.username]]">
<div class="password-column">
<template is="dom-if" if="[[!item.entry.federationText]]">
<input id="password" aria-label=$i18n{editPasswordPasswordLabel}
type="[[getPasswordInputType_(item.password)]]"
on-click="onReadonlyInputTap_" class="password-field" readonly
disabled$="[[!item.password]]"
value="[[getPassword_(item.password)]]">
<cr-icon-button id="showPasswordButton"
class$="[[getIconClass_(item.password)]]"
on-click="onShowPasswordButtonTap_"
title="[[showPasswordTitle_(item.password,
'$i18nPolymer{hidePassword}',
'$i18nPolymer{showPassword}')]]"
focus-row-control focus-type="showPassword"></cr-icon-button>
</template>
<span class="password-field text-elide" id="federated"
hidden$="[[!item.entry.federationText]]">
[[item.entry.federationText]]
</span>
</div>
<cr-icon-button class="icon-more-vert" id="passwordMenu"
on-click="onPasswordMenuTap_" title="$i18n{moreActions}"
focus-row-control focus-type="passwordMenu"
aria-label$="[[getMoreActionsLabel_(item)]]"></cr-icon-button>
</div>
</template>
<script src="password_list_item.js"></script>
</dom-module>
|