blob: 3f6c5212ac0c6cae2f421cc9a764c452d5dac62f (
plain)
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
|
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/cr_elements/cr_toggle/cr_toggle.html">
<link rel="import" href="chrome://resources/html/cr.html">
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.html">
<link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.html">
<link rel="import" href="chrome://resources/polymer/v1_0/neon-animation/neon-animatable.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-button.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper-icon-button-light.html">
<link rel="import" href="../i18n_setup.html">
<link rel="import" href="../icons.html">
<link rel="import" href="../route.html">
<link rel="import" href="../controls/password_prompt_dialog.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="multidevice_browser_proxy.html">
<link rel="import" href="multidevice_constants.html">
<link rel="import" href="multidevice_feature_behavior.html">
<link rel="import" href="multidevice_feature_toggle.html">
<link rel="import" href="multidevice_smartlock_subpage.html">
<link rel="import" href="multidevice_subpage.html">
<dom-module id="settings-multidevice-page">
<template>
<style include="settings-shared">
cr-policy-indicator {
padding: 0 var(--cr-controlled-by-spacing);
}
</style>
<settings-animated-pages id="pages" section="multidevice"
focus-config="[[focusConfig_]]">
<neon-animatable route-path="default">
<div id="multidevice-item"
class="settings-box two-line"
on-click="handleItemClick_"
actionable$="[[doesClickOpenSubpage_(pageContentData)]]">
<template is="dom-if" if="[[isHostSet(pageContentData)]]" restamp>
<iron-icon icon=
"[[getIconName(MultiDeviceFeature.BETTER_TOGETHER_SUITE)]]">
</iron-icon>
</template>
<div class$=
"[[getMultiDeviceItemLabelBlockCssClass_(pageContentData)]]">
<div id="multidevice-label">[[getLabelText_(pageContentData)]]</div>
<div id="multideviceSubLabel" class="secondary"
inner-h-t-m-l="[[getSubLabelInnerHtml_(pageContentData)]]">
</div>
</div>
<template is="dom-if"
if="[[!isSuiteAllowedByPolicy(pageContentData)]]"
restamp>
<cr-policy-indicator indicator-type="userPolicy">
</cr-policy-indicator>
<settings-multidevice-feature-toggle
feature="[[MultiDeviceFeature.BETTER_TOGETHER_SUITE]]"
page-content-data="[[pageContentData]]">
</settings-multidevice-feature-toggle>
</template>
<template is="dom-if"
if="[[shouldShowSeparatorAndSubpageArrow_(pageContentData)]]"
restamp>
<template is="dom-if"
if="[[doesClickOpenSubpage_(pageContentData)]]"
restamp>
<paper-icon-button-light class="subpage-arrow">
<button aria-labelledby="multidevice-label"
aria-describedby="multideviceSubLabel"></button>
</paper-icon-button-light>
</template>
<div class="separator"></div>
</template>
<template is="dom-if"
if="[[shouldShowButton_(pageContentData)]]"
restamp>
<paper-button class="secondary-button"
on-click="handleButtonClick_">
[[getButtonText_(pageContentData)]]
</paper-button>
</template>
<template is="dom-if"
if="[[shouldShowToggle_(pageContentData)]]"
restamp>
<settings-multidevice-feature-toggle
feature="[[MultiDeviceFeature.BETTER_TOGETHER_SUITE]]"
page-content-data="[[pageContentData]]">
</settings-multidevice-feature-toggle>
</template>
</div>
</neon-animatable>
<template is="dom-if" route-path="/multidevice/features" restamp>
<settings-subpage associated-control="[[$$('#multidevice-item')]]"
page-title="[[pageContentData.hostDeviceName]]">
<settings-multidevice-subpage
page-content-data="[[pageContentData]]">
</settings-multidevice-subpage>
</settings-subpage>
</template>
<template is="dom-if" route-path="/multidevice/features/smartLock"
restamp>
<settings-subpage page-title="$i18n{easyUnlockSectionTitle}">
<settings-multidevice-smartlock-subpage
prefs="{{prefs}}"
page-content-data="[[pageContentData]]">
</settings-multidevice-smartlock-subpage>
</settings-subpage>
</template>
</settings-animated-pages>
<template is="dom-if" if="[[showPasswordPromptDialog_]]" restamp>
<settings-password-prompt-dialog id="multidevicePasswordPrompt">
</settings-password-prompt-dialog>
</template>
</template>
<script src="multidevice_page.js"></script>
</dom-module>
|