Skip to content

Commit

Permalink
Merge pull request #15476 from brave/cr107-followup-personalization-p…
Browse files Browse the repository at this point in the history
…age-missing-settings

Fix broken Polymer override for personalization page in brave://settings
  • Loading branch information
emerick authored Oct 15, 2022
2 parents 06cb571 + 458d8a7 commit ad98457
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 55 deletions.
Original file line number Diff line number Diff line change
@@ -1,57 +1,44 @@
<link rel="import" href="chrome://resources/html/polymer.html">

<link rel="import" href="chrome://resources/cr_elements/i18n_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/cr_elements/md_select.css.html">
<link rel="import" href="brave_privacy_page_browser_proxy.html">
<script type="module" src="../settings_shared.css.js"></script>
<script type="module" src="../settings_vars.css.js"></script>

<dom-module id="settings-brave-personalization-options">
<template>
<style include="settings-shared md-select iron-flex">
.settings-box {
display: flex;
justify-content: space-between;
}
</style>
<div class="settings-box">
<div calss="start" id="labelWrapper">
<div class="label">$i18n{webRTCPolicyLabel}</div>
<a id="learnMore" href="$i18n{webRTCLearnMoreURL}" target="_blank">
$i18n{webRTCPolicySubLabel}
</a>
</div>
<settings-dropdown-menu label="$i18n{webRTCLearnMoreURL}"
pref="{{prefs.webrtc.ip_handling_policy}}"
menu-options="[[webRTCPolicies_]]">
</settings-dropdown-menu>
</div>
<settings-toggle-button id="pushMessagingEnabled"
class="cr-row"
pref="{{prefs.brave.gcm.channel_status}}"
label="$i18n{pushMessagingLabel}">
<template is="dom-if" if="[[shouldShowRestart_(
prefs.brave.gcm.channel_status.value)]]">
<cr-button on-click="restartBrowser_" slot="more-actions">
$i18n{restart}
</cr-button>
</template>
</settings-toggle-button>
<settings-toggle-button id="p3aEnabled"
class="cr-row"
pref="[[p3aEnabledPref_]]"
label="$i18n{p3aEnableTitle}"
sub-label="$i18n{p3aEnabledDesc}"
on-settings-boolean-control-change="onP3AEnabledChange_">
</settings-toggle-button>
<settings-toggle-button id="statsUsagePingEnabled"
class="cr-row"
pref="[[statsUsagePingEnabledPref_]]"
label="$i18n{statsUsagePingEnabledTitle}"
sub-label="$i18n{statsUsagePingEnabledDesc}"
on-settings-boolean-control-change="onStatsUsagePingEnabledChange_">
</settings-toggle-button>
<style include="settings-shared md-select iron-flex">
.settings-box {
display: flex;
justify-content: space-between;
}
</style>
<div class="settings-box">
<div class="start" id="labelWrapper">
<div class="label">$i18n{webRTCPolicyLabel}</div>
<a id="learnMore" href="$i18n{webRTCLearnMoreURL}" target="_blank">
$i18n{webRTCPolicySubLabel}
</a>
</div>
<settings-dropdown-menu label="$i18n{webRTCLearnMoreURL}"
pref="{{prefs.webrtc.ip_handling_policy}}"
menu-options="[[webRTCPolicies_]]">
</settings-dropdown-menu>
</div>
<settings-toggle-button id="pushMessagingEnabled"
class="cr-row"
pref="{{prefs.brave.gcm.channel_status}}"
label="$i18n{pushMessagingLabel}">
<template is="dom-if" if="[[shouldShowRestart_(
prefs.brave.gcm.channel_status.value)]]">
<cr-button on-click="restartBrowser_" slot="more-actions">
$i18n{restart}
</cr-button>
</template>
<script src="brave_personalization_options.js"></script>
</dom-module>
</settings-toggle-button>
<settings-toggle-button id="p3aEnabled"
class="cr-row"
pref="[[p3aEnabledPref_]]"
label="$i18n{p3aEnableTitle}"
sub-label="$i18n{p3aEnabledDesc}"
on-settings-boolean-control-change="onP3AEnabledChange_">
</settings-toggle-button>
<settings-toggle-button id="statsUsagePingEnabled"
class="cr-row"
pref="[[statsUsagePingEnabledPref_]]"
label="$i18n{statsUsagePingEnabledTitle}"
sub-label="$i18n{statsUsagePingEnabledDesc}"
on-settings-boolean-control-change="onStatsUsagePingEnabledChange_">
</settings-toggle-button>
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,13 @@
import { Polymer } from 'chrome://resources/polymer/v3_0/polymer/polymer_bundled.min.js';
import {WebUIListenerBehavior} from 'chrome://resources/cr_elements/web_ui_listener_behavior.js';
import {BravePrivacyBrowserProxy, BravePrivacyBrowserProxyImpl} from './brave_privacy_page_browser_proxy.js'
import { getTemplate } from './brave_personalization_options.html.js'

Polymer({
is: 'settings-brave-personalization-options',

_template: getTemplate(),

behaviors: [
WebUIListenerBehavior,
],
Expand Down

0 comments on commit ad98457

Please sign in to comment.