blob: 5ba740a8d0b93d0fe35ad2f3e9f2df3f8da6a7f2 [file] [log] [blame]
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/policy/cr_policy_indicator.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../prefs/prefs_behavior.html">
<link rel="import" href="../settings_page/settings_animated_pages.html">
<link rel="import" href="../settings_page/settings_subpage.html">
<link rel="import" href="../settings_shared_css.html">
<link rel="import" href="crostini_browser_proxy.html">
<link rel="import" href="crostini_subpage.html">
<link rel="import" href="crostini_shared_paths.html">
<link rel="import" href="crostini_shared_usb_devices.html">
<dom-module id="settings-crostini-page">
<template>
<style include="settings-shared"></style>
<settings-animated-pages id="pages" section="crostini"
focus-config="[[focusConfig_]]">
<div route-path="default">
<div id="crostini" class="settings-box two-line first"
actionable$="[[prefs.crostini.enabled.value]]"
on-click="onSubpageTap_">
<div class="start">
$i18n{crostiniPageLabel}
<div class="secondary" id="secondaryText"
inner-h-t-m-l="[[i18nAdvanced('crostiniSubtext')]]">
</div>
</div>
<template is="dom-if" if="[[!allowCrostini]]" restamp>
<cr-policy-indicator indicator-type="userPolicy">
</cr-policy-indicator>
</template>
<template is="dom-if" if="[[prefs.crostini.enabled.value]]">
<paper-icon-button-light class="subpage-arrow">
<button aria-label="$i18n{crostiniPageTitle}"
aria-describedby="secondaryText">
</button>
</paper-icon-button-light>
</template>
<template is="dom-if" if="[[!prefs.crostini.enabled.value]]">
<div class="separator"></div>
<paper-button id="enable"
disabled="[[!allowCrostini]]"
on-click="onEnableTap_"
aria-label="$i18n{crostiniPageTitle}"
aria-describedby="secondaryText">
$i18n{crostiniEnable}
</paper-button>
</template>
</div>
</div>
<template is="dom-if" route-path="/crostini/details">
<settings-subpage
associated-control="[[$$('#crostini')]]"
page-title="$i18n{crostiniPageLabel}">
<settings-crostini-subpage prefs="{{prefs}}">
</settings-crostini-subpage>
</settings-subpage>
</template>
<template is="dom-if" route-path="/crostini/sharedPaths">
<settings-subpage
associated-control="[[$$('#crostini')]]"
page-title="$i18n{crostiniSharedPaths}">
<settings-crostini-shared-paths prefs="{{prefs}}">
</settings-crostini-shared-paths>
</settings-subpage>
</template>
<template is="dom-if" route-path="/crostini/sharedUsbDevices">
<settings-subpage
associated-control="[[$$('#crostini')]]"
page-title="$i18n{crostiniSharedUsbDevicesLabel}">
<div class="settings-box first">
<div class="label">$i18n{crostiniSharedUsbDevicesDescription}</div>
</div>
<settings-crostini-shared-usb-devices prefs="{{prefs}}">
</settings-crostini-shared-usb-devices>
</settings-subpage>
</template>
</settings-animated-pages>
</template>
<script src="crostini_page.js"></script>
</dom-module>