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
|
<style include="cr-shared-style">
#currentTopicsSection {
align-items: center;
display: flex;
padding: 0 var(--cr-section-padding);
}
.topics-empty-text {
width: 100%;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
padding-top: 48px;
padding-bottom: 48px;
}
#currentTopicsSectionWrapper {
width: 100%;
}
#currentTopicsHeading {
color: var(--cr-secondary-text-color);
font-size: 100%;
font-weight: 500;
margin: 0;
padding-block-start: var(--cr-section-vertical-padding);
}
#currentTopicsDescription {
padding-block-end: var(--cr-section-vertical-padding);
}
#disclaimer {
padding: 0 var(--cr-section-padding);
padding-bottom: var(--cr-section-vertical-padding);
color: var(--cr-secondary-text-color);
}
#learnMoreLink {
background: none;
border: none;
color: var(--cr-link-color);
cursor: pointer;
margin: 0;
padding: 0;
text-decoration: underline;
}
.no-topics {
padding-block-end: 32px;
padding-block-start: 16px;
padding-inline-start: 40px;
}
#blockedTopicsDescription {
color: var(--cr-secondary-text-color);
}
.no-blocked-topics {
padding-inline-start: 60px;
}
#blockedTopicsList {
padding: 0 var(--cr-section-padding);
}
.footer {
padding: 16px var(--cr-section-padding);
}
a {
color: var(--cr-link-color);
}
#dialog p {
margin: 0;
padding-block-end: 16px;
padding-block-start: 4px;
}
cr-toast {
--cr-toast-max-width: 80%;
}
</style>
<settings-toggle-button
id="topicsToggle"
pref="{{prefs.privacy_sandbox.m1.topics_enabled}}"
label="$i18n{topicsPageToggleLabel}"
sub-label="[[adTopicsToggleSubLabel_]]"
on-settings-boolean-control-change="onToggleChange_">
</settings-toggle-button>
<div id="disclaimer">
$i18nRaw{topicsPageDisclaimerDesktop}
</div>
<template is="dom-if" if="[[!emptyState_]]" restamp>
<template is="dom-if" if="[[!isTopicsPrefManaged_(
prefs.privacy_sandbox.m1.topics_enabled.enforcement)]]" restamp>
<div id="currentTopicsSection">
<div id="currentTopicsSectionWrapper" class="hr">
<h2 id="currentTopicsHeading">$i18n{topicsPageActiveTopicsHeading}</h2>
<template is="dom-if" if="[[shouldShowAdTopicsContentParity_]]">
<div id="currentTopicsDescriptionV2" class="cr-secondary-text">
$i18n{adTopicsPageActiveTopicsDescription}
</div>
</template>
<template is="dom-if" if="[[!shouldShowAdTopicsContentParity_]]">
<div id="currentTopicsDescription" class="cr-secondary-text">
$i18n{topicsPageActiveTopicsDescription}
</div>
</template>
<template is="dom-if" if="[[isTopicsEnabledAndLoaded_(
prefs.privacy_sandbox.m1.topics_enabled.value,
isTopicsListLoaded_)]]" restamp>
<div role="region" aria-label=
"$i18n{topicsPageCurrentTopicsRegionA11yDescription}">
<template is="dom-repeat" items="[[topicsList_]]">
<privacy-sandbox-interest-item interest="[[item]]"
on-interest-changed="onInterestChanged_">
</privacy-sandbox-interest-item>
</template>
</div>
<div id="currentTopicsEmptyText"
class="topics-empty-text"
hidden="[[!isTopicsListEmpty_(topicsList_.length)]]">
<span id="currentTopicsDescriptionEmptyTextHeading">
$i18n{topicsPageCurrentTopicsDescriptionEmptyTextHeading}
</span>
<span id="currentTopicsDescriptionEmptyText"
class="cr-secondary-text">
$i18n{topicsPageCurrentTopicsDescriptionEmptyText}
</span>
</div>
</template>
<div id="currentTopicsDescriptionDisabled"
class="no-topics cr-secondary-text"
hidden="[[prefs.privacy_sandbox.m1.topics_enabled.value]]">
$i18n{topicsPageCurrentTopicsDescriptionDisabled}
</div>
</div>
</div>
</template>
<cr-expand-button id="blockedTopicsRow" class="cr-row"
expanded="{{blockedTopicsExpanded_}}">
$i18n{topicsPageBlockedTopicsHeading}
<div id="blockedTopicsDescription">
$i18n{topicsPageBlockedTopicsDescription}
</div>
</cr-expand-button>
<cr-collapse opened="[[blockedTopicsExpanded_]]">
<div id="blockedTopicsEmptyText"
class="topics-empty-text"
hidden="[[!isBlockedTopicsListEmpty_(blockedTopicsList_.length)]]">
<span id="blockedTopicsDescriptionEmptyTextHeading">
$i18n{topicsPageBlockedTopicsDescriptionEmptyTextHeading}
</span>
<span id="blockedTopicsDescriptionEmptyText"
class="cr-secondary-text">
$i18n{topicsPageBlockedTopicsDescriptionEmptyText}
</span>
</div>
<div id="blockedTopicsList" role="region"
aria-label="$i18n{topicsPageBlockedTopicsRegionA11yDescription}">
<template is="dom-repeat" items="[[blockedTopicsList_]]">
<privacy-sandbox-interest-item interest="[[item]]"
on-interest-changed="onInterestChanged_">
</privacy-sandbox-interest-item>
</template>
</div>
</cr-collapse>
<div id="manageTopicsSection" class="hr">
<cr-link-row id="privacySandboxManageTopicsLinkRow"
label="$i18n{manageTopicsHeading}"
sub-label="$i18n{manageTopicsDescription}"
on-click="onPrivacySandboxManageTopicsClick_">
</cr-link-row>
</div>
</template>
<template is="dom-if" if="[[!shouldShowV2_]]">
<div id="footer" class="cr-secondary-text hr footer">
$i18nRaw{topicsPageFooter}
</div>
</template>
<template is="dom-if" if="[[shouldShowV2_]]">
<div id="footerV2" class="cr-secondary-text hr footer">
$i18nRaw{adTopicsPageFooterV2Desktop}
</div>
<template is="dom-if" if="[[shouldShowAdTopicsContentParity_]]">
<div id="footerDisclaimerV2" class="cr-secondary-text footer">
$i18nRaw{adTopicsPageDisclaimerV2Desktop}
</div>
</template>
<template is="dom-if" if="[[!shouldShowAdTopicsContentParity_]]">
<div id="footerDisclaimer" class="cr-secondary-text footer">
$i18nRaw{adTopicsPageDisclaimer}
</div>
</template>
</template>
<cr-toast id="unblockTopicToast" duration="10000">
<div id="unblockTopicToastBody">$i18n{unblockTopicToastBody}</div>
<cr-button id="closeToastButton" on-click="onHideToastClick_">
$i18n{unblockTopicToastButtonText}
</cr-button>
</cr-toast>
<template is="dom-if" if="[[shouldShowBlockTopicDialog_]]" restamp>
<settings-simple-confirmation-dialog id="blockTopicDialog"
title-text="[[blockTopicDialogTitle_]]"
body-text="[[blockTopicDialogBody_]]"
confirm-text="$i18n{topicsPageBlockTopic}"
on-close="onBlockTopicDialogClose_">
</settings-simple-confirmation-dialog>
</template>
|