blob: f622ff71a9e76879b2400136d636d4a16c9ceb40 [file] [log] [blame]
<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/web_ui_listener_behavior.html">
<link rel="import" href="../appearance_page/appearance_page.html">
<link rel="import" href="../change_password_page/change_password_page.html">
<link rel="import" href="../controls/settings_idle_load.html">
<link rel="import" href="../on_startup_page/on_startup_page.html">
<link rel="import" href="../people_page/people_page.html">
<link rel="import" href="../reset_page/reset_profile_banner.html">
<link rel="import" href="../search_page/search_page.html">
<link rel="import" href="../settings_page/main_page_behavior.html">
<link rel="import" href="../settings_page/settings_section.html">
<link rel="import" href="../settings_page_css.html">
<link rel="import" href="../settings_vars_css.html">
<if expr="chromeos">
<link rel="import" href="../android_apps_page/android_apps_browser_proxy.html">
<link rel="import" href="../android_apps_page/android_apps_page.html">
<link rel="import" href="../bluetooth_page/bluetooth_page.html">
<link rel="import" href="../device_page/device_page.html">
<link rel="import" href="../internet_page/internet_page.html">
<link rel="import" href="../multidevice_page/multidevice_page.html">
</if>
<if expr="not chromeos">
<link rel="import" href="../default_browser_page/default_browser_page.html">
</if>
<if expr="is_win">
<link rel="import" href="../chrome_cleanup_page/chrome_cleanup_page.html">
</if>
<!-- TODO(michaelpg): Rename to something better than "basic" now that this page
includes both the basic and advanced settings. -->
<dom-module id="settings-basic-page">
<template>
<style include="settings-page-styles cr-hidden-style">
:host([is-subpage-animating]) {
/* Prevent an unwanted horizontal scrollbar when transitioning back from
* a sub-page. */
overflow: hidden;
}
#advancedToggle {
--paper-button: {
text-transform: none;
}
@apply(--settings-actionable);
align-items: center;
display: flex;
margin-bottom: 3px;
margin-top: 12px; /* Part of a 48px spacer (33px + 12px + 3px). */
min-height: 32px;
padding: 0 12px;
}
#secondaryUserBanner {
@apply(--shadow-elevation-2dp);
align-items: center;
background-color: white;
border-radius: 2px;
display: flex;
margin: 21px 0;
}
#secondaryUserIcon {
/* TODO(stevenjb): Replace this with the correct variable or color once
* established by UX, see crbug.com/687749. */
background-color : rgb(210, 210, 212);
background-image: url(chrome://theme/IDR_SECONDARY_USER_SETTINGS);
background-position: center;
background-repeat: no-repeat;
height: 55px;
margin: 18px;
width: 58px;
}
#toggleContainer {
align-items: center;
display: flex;
font: inherit;
justify-content: center;
margin-bottom: 0;
margin-top: 0;
}
#toggleSpacer {
padding-top: 33px; /* Part of a 48px spacer (33px + 12px + 3px). */
}
iron-icon {
-webkit-margin-start: 16px;
}
</style>
<template is="dom-if" if="[[showBasicPage_(
currentRoute_, inSearchMode, hasExpandedSection_)]]">
<div id="basicPage">
<template is="dom-if" if="[[showResetProfileBanner_]]" restamp>
<settings-reset-profile-banner on-close="onResetProfileBannerClosed_">
</settings-reset-profile-banner>
</template>
<if expr="chromeos">
<div id="secondaryUserBanner" hidden="[[!showSecondaryUserBanner_]]">
<div id="secondaryUserIcon"></div>
<div class="flex">$i18n{secondaryUserBannerText}</div>
</div>
</if>
<if expr="chromeos">
<template is="dom-if" if="[[showPage_(pageVisibility.internet)]]"
restamp>
<settings-section page-title="$i18n{internetPageTitle}"
section="internet">
<settings-internet-page prefs="{{prefs}}">
</settings-internet-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.bluetooth)]]"
restamp>
<settings-section page-title="$i18n{bluetoothPageTitle}"
section="bluetooth">
<settings-bluetooth-page prefs="{{prefs}}">
</settings-bluetooth-page>
</settings-section>
</template>
</if>
<if expr="is_win">
<template is="dom-if" if="[[showChromeCleanup]]" restamp>
<settings-section section="chromeCleanup">
<settings-chrome-cleanup-page></settings-chrome-cleanup-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showChangePassword]]" restamp>
<settings-section section="changePassword">
<settings-change-password-page></settings-change-password-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.people)]]" restamp>
<settings-section page-title="$i18n{peoplePageTitle}"
section="people">
<settings-people-page prefs="{{prefs}}"></settings-people-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.appearance)]]"
restamp>
<settings-section page-title="$i18n{appearancePageTitle}"
section="appearance">
<settings-appearance-page prefs="{{prefs}}"
page-visibility="[[pageVisibility.appearance]]">
</settings-appearance-page>
</settings-section>
</template>
<if expr="chromeos">
<template is="dom-if" if="[[showPage_(pageVisibility.device)]]" restamp>
<settings-section page-title="$i18n{devicePageTitle}"
section="device">
<settings-device-page prefs="{{prefs}}"></settings-device-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.search)]]" restamp>
<settings-section page-title="$i18n{searchPageTitle}"
section="search">
<settings-search-page prefs="{{prefs}}"></settings-search-page>
</settings-section>
</template>
<if expr="chromeos">
<template is="dom-if"
if="[[shouldShowAndroidApps_(showAndroidApps, androidAppsInfo, pageVisibility)]]"
restamp>
<settings-section page-title="$i18n{androidAppsPageTitle}"
section="androidApps">
<settings-android-apps-page prefs="{{prefs}}"
android-apps-info="[[androidAppsInfo]]"
have-play-store-app="[[havePlayStoreApp]]">
</settings-android-apps-page>
</settings-section>
</template>
</if>
<if expr="not chromeos">
<template is="dom-if" if="[[showPage_(pageVisibility.defaultBrowser)]]"
restamp>
<settings-section page-title="$i18n{defaultBrowser}"
section="defaultBrowser">
<settings-default-browser-page></settings-default-browser-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.onStartup)]]"
restamp>
<settings-section page-title="$i18n{onStartup}" section="onStartup">
<settings-on-startup-page prefs="{{prefs}}">
</settings-on-startup-page>
</settings-section>
</template>
</div>
</template>
<template is="dom-if" if="[[showAdvancedSettings_(pageVisibility.advancedSettings)]]">
<template is="dom-if" if="[[showAdvancedToggle_(
inSearchMode, hasExpandedSection_)]]">
<div id="toggleSpacer"></div>
<h2 id="toggleContainer">
<paper-button id="advancedToggle" active="{{advancedToggleExpanded}}"
aria-active-attribute="aria-expanded" toggles>
<span>$i18n{advancedPageTitle}</span>
<iron-icon icon="[[getArrowIcon_(advancedToggleExpanded)]]">
</iron-icon>
</paper-button>
</h2>
</template>
<template is="settings-idle-load" id="advancedPageTemplate"
url="/lazy_load.html">
<div id="advancedPage" hidden$="[[!showAdvancedPage_(
currentRoute_, inSearchMode, hasExpandedSection_,
advancedToggleExpanded)]]">
<if expr="chromeos">
<template is="dom-if" if="[[showPage_(pageVisibility.dateTime)]]"
restamp>
<settings-section page-title="$i18n{dateTimePageTitle}"
section="dateTime">
<settings-date-time-page prefs="{{prefs}}"
page-visibility="[[pageVisibility.dateTime]]">
</settings-date-time-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.privacy)]]"
restamp>
<settings-section page-title="$i18n{privacyPageTitle}"
section="privacy">
<settings-privacy-page prefs="{{prefs}}"
page-visibility="[[pageVisibility.privacy]]">
</settings-privacy-page>
</settings-section>
</template>
<template is="dom-if"
if="[[showPage_(pageVisibility.passwordsAndForms)]]" restamp>
<settings-section
page-title="$i18n{passwordsAndAutofillPageTitle}"
section="passwordsAndForms">
<settings-passwords-and-forms-page prefs="{{prefs}}">
</settings-passwords-and-forms-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.languages)]]"
restamp>
<settings-section page-title="$i18n{languagesPageTitle}"
section="languages">
<settings-languages-page prefs="{{prefs}}">
</settings-languages-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.downloads)]]"
restamp>
<settings-section page-title="$i18n{downloadsPageTitle}"
section="downloads">
<settings-downloads-page prefs="{{prefs}}"
page-visibility="[[pageVisibility.downloads]]">
</settings-downloads-page>
</settings-section>
</template>
<template is="dom-if" if="[[showPage_(pageVisibility.printing)]]"
restamp>
<settings-section page-title="$i18n{printingPageTitle}"
section="printing">
<settings-printing-page prefs="{{prefs}}">
</settings-printing-page>
</settings-section>
</template>
<if expr="chromeos">
<template is="dom-if"
if="[[shouldShowMultidevice_(showMultidevice, pageVisibility)]]"
restamp>
<settings-section page-title="$i18n{multidevicePageTitle}"
section="multidevice">
<settings-multidevice-page prefs="{{prefs}}">
</settings-multidevice-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.a11y)]]" restamp>
<settings-section page-title="$i18n{a11yPageTitle}" section="a11y">
<settings-a11y-page prefs="{{prefs}}"></settings-a11y-page>
</settings-section>
</template>
<if expr="not chromeos">
<template is="dom-if" if="[[showPage_(pageVisibility.system)]]"
restamp>
<settings-section page-title="$i18n{systemPageTitle}"
section="system">
<settings-system-page prefs="{{prefs}}"></settings-system-page>
</settings-section>
</template>
</if>
<template is="dom-if" if="[[showPage_(pageVisibility.reset)]]"
restamp>
<settings-section page-title="$i18n{resetPageTitle}"
section="reset">
<settings-reset-page></settings-reset-page>
</settings-section>
</template>
</div>
</template>
</template>
</template>
<script src="basic_page.js"></script>
</dom-module>