summaryrefslogtreecommitdiff
path: root/chromium/chrome/browser/resources/print_preview/new/destination_list_item.html
blob: 702662e95418e51fe97f9c8f8d57aaefd9dad277 (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/hidden_style_css.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/load_time_data.html">
<link rel="import" href="../native_layer.html">
<link rel="import" href="../data/destination.html">
<link rel="import" href="highlight_utils.html">
<link rel="import" href="print_preview_shared_css.html">
<link rel="import" href="strings.html">

<dom-module id="print-preview-destination-list-item">
  <template>
    <style include="print-preview-shared action-link cr-hidden-style">
      :host .icon {
        -webkit-margin-end: 8px;
        display: inline-block;
        flex: 0 0 auto;
        height: 24px;
        transition: opacity 150ms;
        vertical-align: middle;
        width: 24px;
      }

      :host .name,
      :host .search-hint {
        flex: 0 1 auto;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        vertical-align: middle;
        white-space: nowrap;
      }

      :host .search-hint {
        -webkit-margin-start: 1em;
        color: #999;
        font-size: 75%;
      }

      :host .connection-status,
      :host .learn-more-link {
        -webkit-margin-start: 1em;
        flex: 0 0 auto;
        font-size: 75%;
        line-height: 24px;
        vertical-align: middle;
      }

      :host .learn-more-link {
        color: rgb(51, 103, 214);
      }

      :host .extension-controlled-indicator {
        display: flex;
        flex: 1;
        justify-content: flex-end;
        min-width: 150px;
      }

      :host .extension-name {
        -webkit-margin-start: 1em;
        color: #777;
        line-height: 24px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      :host .extension-icon {
        background-position: center;
        background-repeat: no-repeat;
        cursor: pointer;
        flex: 0 0 auto;
        height: 24px;
        margin: 0 3px;
        width: 24px;
      }

      :host .configuring-in-progress-text,
      :host .configuring-failed-text {
        -webkit-margin-start: 1em;
        flex: 0 1 auto;
        line-height: 24px;
        vertical-align: middle;
      }

      :host .configuring-failed-text {
        color: red;
        font-style: italic;
      }

      :host([stale_]) :-webkit-any(.icon, .name, .connection-status) {
        opacity: 0.4;
      }
    </style>
    <img class="icon" src="[[destination.iconUrl]]"
        srcset="[[destination.srcSet]]">
    <span class="name searchable">[[destination.displayName]]</span>
    <span class="search-hint searchable">[[searchHint_]]</span>
    <span class="connection-status"
        hidden$="[[!destination.isOfflineOrInvalid]]">
      [[destination.connectionStatusText]]
    </span>
    <a is="action-link" class="learn-more-link"
        hidden$="[[!destination.shouldShowInvalidCertificateError]]"
        on-click="onLearnMoreLinkClick_">
      $i18n{learnMore}
    </a>
    <span class="extension-controlled-indicator"
        hidden$="[[!destination.isExtension]]">
      <span class="extension-name searchable">
        [[destination.extensionName]]
      </span>
      <span class="extension-icon" role="button" tabindex="0"></span>
    </span>
<if expr="chromeos">
    <span class="configuring-in-progress-text"
      hidden$="[[!checkConfigurationStatus_(statusEnum_.IN_PROGRESS,
                                            configurationStatus_)]]">
      $i18n{configuringInProgressText}
      <span class="configuring-text-jumping-dots">
        <span>.</span><span>.</span><span>.</span>
      </span>
    </span>
    <span class="configuring-failed-text"
      hidden$="[[!checkConfigurationStatus_(statusEnum_.FAILED,
                                            configurationStatus_)]]">
      $i18n{configuringFailedText}
    </span>
</if>
  </template>
  <script src="destination_list_item.js"></script>
</dom-module>