File: privacy_sandbox_fledge_subpage.html

package info (click to toggle)
chromium 139.0.7258.138-1
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 6,120,676 kB
  • sloc: cpp: 35,100,869; ansic: 7,163,530; javascript: 4,103,002; python: 1,436,920; asm: 946,517; xml: 746,709; pascal: 187,653; perl: 88,691; sh: 88,436; objc: 79,953; sql: 51,488; cs: 44,583; fortran: 24,137; makefile: 22,147; tcl: 15,277; php: 13,980; yacc: 8,984; ruby: 7,485; awk: 3,720; lisp: 3,096; lex: 1,327; ada: 727; jsp: 228; sed: 36
file content (220 lines) | stat: -rw-r--r-- 7,396 bytes parent folder | download | duplicates (8)
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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
<style include="cr-shared-style">
  #currentSitesSection {
    align-items: center;
    display: flex;
    padding: 0 var(--cr-section-padding);
  }

  #currentSitesSectionWrapper {
    width: 100%;
  }

  #currentSitesHeading {
    color: var(--cr-secondary-text-color);
    font-size: 100%;
    font-weight: 500;
    margin: 0;
    padding-block-start: var(--cr-section-vertical-padding);
  }

  #currentSitesDescription {
    padding-block-end: var(--cr-section-vertical-padding);
  }

  #learnMoreLink, #learnMoreLinkV2 {
    background: none;
    border: none;
    color: var(--cr-link-color);
    cursor: pointer;
    margin: 0;
    padding: 0;
    text-decoration: underline;
  }

  .no-sites {
    padding-block-end: 32px;
    padding-block-start: 16px;
    padding-inline-start: 40px;
  }

  #blockedSitesDescription {
    min-height: auto;
    padding-block-end: 16px;
    padding-block-start: 16px;
  }

  .no-blocked-sites {
    padding-inline-start: 60px;
  }

  #blockedSitesList {
    padding: 0 var(--cr-section-padding);
  }

  #footer {
    padding-block-end: 16px;
    padding-block-start: 16px;
  }

  #dialog p {
    margin: 0;
    padding-block-end: 16px;
    padding-block-start: 4px;
  }

  .footer {
    padding: 16px var(--cr-section-padding);
  }

  #secondDescription, #secondDescriptionV2 {
    padding: 0 var(--cr-section-padding) var(--cr-section-vertical-padding);
  }

  a {
    color: var(--cr-link-color);
  }
</style>

<template is="dom-if" if="[[!shouldShowV2_]]">
  <settings-toggle-button
      id="fledgeToggle"
      pref="{{prefs.privacy_sandbox.m1.fledge_enabled}}"
      label="$i18n{fledgePageToggleLabel}"
      sub-label="$i18n{fledgePageToggleSubLabel}"
      on-settings-boolean-control-change="onToggleChange_">
  </settings-toggle-button>
  <div id="secondDescription" class="cr-secondary-text">
    $i18n{fledgePageExplanation}
  </div>
</template>
<template is="dom-if" if="[[shouldShowV2_]]">
  <settings-toggle-button
      id="siteSuggestedAdsToggleV2"
      pref="{{prefs.privacy_sandbox.m1.fledge_enabled}}"
      label="$i18n{fledgePageToggleLabel}"
      sub-label="$i18n{siteSuggestedAdsPageToggleSubLabelV2}"
      on-settings-boolean-control-change="onToggleChange_">
  </settings-toggle-button>
  <div id="secondDescriptionV2" class="cr-secondary-text">
    $i18n{siteSuggestedAdsPageExplanationV2}
    <button id="learnMoreLinkV2" on-click="onLearnMoreClick_"
        aria-label="$i18n{siteSuggestedAdsPageExplanationV2LinkAriaDescription}">
      $i18n{siteSuggestedAdsPageExplanationV2LinkText}
    </button>
  </div>
</template>
<template is="dom-if" if="[[!isFledgePrefManaged_(
    prefs.privacy_sandbox.m1.fledge_enabled.enforcement)]]" restamp>
  <div id="currentSitesSection">
    <div id="currentSitesSectionWrapper" class="hr">
      <h2 id="currentSitesHeading">
        $i18n{fledgePageCurrentSitesHeading}
      </h2>
      <div id="currentSitesDescription" class="cr-secondary-text">
        $i18n{fledgePageCurrentSitesDescription}
        <!-- TODO(b/264024469): Add "Learn more" into current sites description
             string. -->
        <button id="learnMoreLink" on-click="onLearnMoreClick_" aria-label=
            "$i18n{fledgePageCurrentSitesDescriptionLearnMoreA11yLabel}" hidden$="[[shouldShowV2_]]">
          $i18n{fledgePageCurrentSitesDescriptionLearnMore}
        </button>
      </div>
      <template is="dom-if" if="[[isFledgeEnabledAndLoaded_(
          prefs.privacy_sandbox.m1.fledge_enabled.value, isSitesListLoaded_)]]"
          restamp>
        <div role="region"
            aria-label="$i18n{fledgePageCurrentSitesRegionA11yDescription}">
          <template is="dom-repeat" items="[[mainSitesList_]]">
            <privacy-sandbox-interest-item interest="[[item]]"
                on-interest-changed="onInterestChanged_">
            </privacy-sandbox-interest-item>
          </template>
        </div>
        <template is="dom-if" if="[[!isRemainingSitesListEmpty_(
            remainingSitesList_.length)]]" restamp>
          <cr-expand-button id="seeAllSites"
              expanded="{{seeAllSitesExpanded_}}">
            $i18n{fledgePageSeeAllSitesLabel}
          </cr-expand-button>
          <cr-collapse opened="[[seeAllSitesExpanded_]]">
            <div role="region"
                aria-label="$i18n{fledgePageCurrentSitesRegionA11yDescription}">
              <template is="dom-repeat" items="[[remainingSitesList_]]">
                <privacy-sandbox-interest-item interest="[[item]]"
                    on-interest-changed="onInterestChanged_">
                </privacy-sandbox-interest-item>
              </template>
            </div>
          </cr-collapse>
        </template>
        <div id="currentSitesDescriptionEmpty"
            class="no-sites cr-secondary-text"
            hidden="[[!isSitesListEmpty_(sitesList_.length)]]">
          $i18n{fledgePageCurrentSitesDescriptionEmpty}
        </div>
      </template>
      <div id="currentSitesDescriptionDisabled"
          class="no-sites cr-secondary-text"
          hidden="[[prefs.privacy_sandbox.m1.fledge_enabled.value]]">
        $i18n{fledgePageCurrentSitesDescriptionDisabled}
      </div>
    </div>
  </div>
</template>
<cr-expand-button id="blockedSitesRow" class="cr-row"
    expanded="{{blockedSitesExpanded_}}">
  $i18n{fledgePageBlockedSitesHeading}
</cr-expand-button>
<cr-collapse opened="[[blockedSitesExpanded_]]">
  <div id="blockedSitesDescription"
      class$="[[getBlockedSitesDescriptionClass_(blockedSitesList_.length)]]">
    [[computeBlockedSitesDescription_(blockedSitesList_.length)]]
  </div>
  <div id="blockedSitesList" role="region"
      aria-label="$i18n{fledgePageBlockedSitesRegionA11yDescription}">
    <template is="dom-repeat" items="[[blockedSitesList_]]">
      <privacy-sandbox-interest-item interest="[[item]]"
          on-interest-changed="onInterestChanged_">
      </privacy-sandbox-interest-item>
    </template>
  </div>
</cr-collapse>

<template is="dom-if" if="[[!shouldShowV2_]]">
  <div id="footer" class="cr-secondary-text hr footer">
    $i18nRaw{fledgePageFooter}
  </div>
</template>
<template is="dom-if" if="[[shouldShowV2_]]">
  <div id="footerV2" class="cr-secondary-text hr footer">
    $i18nRaw{siteSuggestedAdsFooterV2Desktop}
  </div>
  <div id="disclaimer" class="cr-secondary-text footer">
    $i18nRaw{siteSuggestedAdsPageDisclaimer}
  </div>
</template>
<template is="dom-if" if="[[isLearnMoreDialogOpen_]]" restamp>
  <cr-dialog id="dialog" on-close="onCloseDialog_" show-on-attach>
    <div slot="title">$i18n{fledgePageLearnMoreHeading}</div>
    <template is="dom-if" if="[[!shouldShowV2_]]">
      <div id="body" slot="body">
        <p>$i18n{fledgePageLearnMoreBullet1}</p>
        <p>$i18n{fledgePageLearnMoreBullet2}</p>
        <p>$i18nRaw{fledgePageLearnMoreBullet3}</p>
      </div>
    </template>
    <template is="dom-if" if="[[shouldShowV2_]]">
      <div id="bodyV2" slot="body">
        <p>$i18n{siteSuggestedAdsPageLearnMoreBullet1V2}</p>
        <p>$i18n{siteSuggestedAdsPageLearnMoreBullet2V2}</p>
        <p>$i18nRaw{siteSuggestedAdsPageLearnMoreBullet3V2}</p>
      </div>
    </template>
    <div slot="button-container">
      <cr-button id="closeButton" class="cancel-button" autofocus
          on-click="onCloseDialog_">
        $i18n{close}
      </cr-button>
    </div>
  </cr-dialog>
</template>