Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken Polymer override for personalization page in brave://settings #15476

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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