summaryrefslogtreecommitdiffstats
path: root/chrome/browser/resources/settings/people_page/people_page.html
blob: bcaf789051c899b48fb6a46442de38c37ffd2d6d (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
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
<link rel="import" href="chrome://resources/html/i18n_behavior.html">
<link rel="import" href="chrome://resources/html/polymer.html">
<link rel="import" href="chrome://resources/html/web_ui_listener_behavior.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-checkbox/paper-checkbox.html">
<link rel="import" href="chrome://resources/polymer/v1_0/paper-dialog/paper-dialog.html">
<link rel="import" href="chrome://md-settings/controls/settings_checkbox.html">
<link rel="import" href="chrome://md-settings/people_page/sync_page.html">
<link rel="import" href="chrome://md-settings/people_page/sync_private_api.html">
<link rel="import" href="chrome://md-settings/settings_page/settings_animated_pages.html">
<link rel="import" href="chrome://md-settings/settings_page/settings_subheader.html">
<link rel="import" href="chrome://md-settings/settings_shared_css.html">

<if expr="chromeos">
<link rel="import" href="chrome://md-settings/people_page/change_picture.html">
<link rel="import" href="chrome://md-settings/people_page/easy_unlock_browser_proxy.html">
<link rel="import" href="chrome://md-settings/people_page/easy_unlock_turn_off_dialog.html">
<link rel="import" href="chrome://md-settings/people_page/users_page.html">
</if>
<if expr="not chromeos">
<link rel="import" href="chrome://md-settings/people_page/manage_profile.html">
</if>

<dom-module id="settings-people-page">
  <link rel="import" type="css" href="people_page.css">
  <template>
    <style include="settings-shared"></style>
    <settings-animated-pages id="pages" current-route="{{currentRoute}}"
        section="people">
      <neon-animatable id="main">
        <div class="settings-box first two-line">
          <img id="account-picture" src="[[profileIconUrl_]]"
              on-tap="onPictureTap_">
          <div class="middle">
<if expr="chromeos">
            <span id="profile-name" on-tap="onProfileNameTap_">
              [[profileName_]]
            </span>
</if>
<if expr="not chromeos">
            <span id="profile-name">
              [[profileName_]]
            </span>
</if>
          </div>
<if expr="not chromeos">
          <template is="dom-if" if="[[!syncStatus.signedIn]]">
            <paper-button class="action-button" on-tap="onSigninTap_"
                disabled="[[syncStatus.setupInProgress]]">
              [[i18n('syncSignin')]]
            </paper-button>
          </template>
          <template is="dom-if" if="[[syncStatus.signedIn]]">
            <span class="secondary-action">
              <paper-button class="secondary-button" on-tap="onDisconnectTap_"
                  disabled="[[syncStatus.setupInProgress]]">
                [[i18n('syncDisconnect')]]
              </paper-button>
            </span>
          </template>
</if>
        </div>
        <div class="settings-box two-line" hidden="[[syncStatus.signedIn]]">
          [[i18n('syncOverview')]]
        </div>

        <div class="settings-box" hidden="[[!isStatusTextSet_(syncStatus)]]">
          <span id="syncStatusText"></span>
          <paper-button on-tap="onActionLinkTap_">
            [[syncStatus.actionLinkText]]
          </paper-button>
        </div>

        <template is="dom-if"
            if="[[isAdvancedSyncSettingsVisible_(syncStatus)]]">
          <div class="settings-box">
            <paper-button on-tap="onSyncTap_" class="primary-button">
              [[i18n('syncPageTitle')]]
            </paper-button>
          </div>
        </template>

<if expr="chromeos">
        <div class="settings-box">
          <settings-checkbox pref="{{prefs.settings.enable_screen_lock}}"
              i18n-values="label:enableScreenlock">
          </settings-checkbox>
        </div>

        <template is="dom-if" if=[[easyUnlockAllowed_]]>
          <div class="settings-box">
            <div class="middle">
              <div>[[i18n('easyUnlockSectionTitle')]]</div>
              <div class="secondary">
                <template is="dom-if" if=[[!easyUnlockEnabled_]]>
                  [[i18n('easyUnlockSetupIntro')]]
                </template>
                <template is="dom-if" if=[[easyUnlockEnabled_]]>
                  [[i18n('easyUnlockDescription')]]
                </template>
                <a target="_blank" href$="[[i18n('easyUnlockLearnMoreURL')]]">
                  [[i18n('learnMore')]]
                </a>
                <template is="dom-if" if=[[easyUnlockEnabled_]]>
                  <template is="dom-if"
                      if=[[easyUnlockProximityDetectionAllowed_]]>
                    <settings-checkbox
                        pref="{{prefs.easy_unlock.proximity_required}}"
                        i18n-values="label:easyUnlockRequireProximityLabel">
                    </settings-checkbox>
                  </template>
                </template>
              </div>
            </div>
            <div class="secondary-action">
              <template is="dom-if" if=[[!easyUnlockEnabled_]]>
                <paper-button id="easyUnlockSetup" class="secondary-button"
                    on-tap="onEasyUnlockSetupTap_">
                  [[i18n('easyUnlockSetupButton')]]
                </paper-button>
              </template>
              <template is="dom-if" if=[[easyUnlockEnabled_]]>
                <paper-button id="easyUnlockTurnOff" class="secondary-button"
                    on-tap="onEasyUnlockTurnOffTap_">
                  [[i18n('easyUnlockTurnOffButton')]]
                </paper-button>
              </template>
            </div>
          </div>
        </template>
</if>

        <div class="settings-box">
          <paper-button class="primary-button" i18n-content="manageOtherPeople"
              on-tap="onManageOtherPeople_">
          </paper-button>
        </div>
      </neon-animatable>
      <neon-animatable id="sync">
        <settings-subheader i18n-values="page-title:syncPageTitle">
        </settings-subheader>
        <settings-sync-page current-route="[[currentRoute]]">
        </settings-sync-page>
      </neon-animatable>
<if expr="chromeos">
      <neon-animatable id="users">
        <settings-subheader i18n-values="page-title:usersPageTitle">
        </settings-subheader>
        <settings-users-page prefs="{{prefs}}"></settings-users-page>
      </neon-animatable>
      <neon-animatable id="changePicture">
        <settings-subheader i18n-values="page-title:changePictureTitle">
        </settings-subheader>
        <settings-change-picture></settings-change-picture>
      </neon-animatable>
</if>
<if expr="not chromeos">
      <neon-animatable id="manageProfile">
        <settings-subheader i18n-values="page-title:editPerson">
        </settings-subheader>
        <settings-manage-profile profile-icon-url="[[profileIconUrl_]]"
            profile-name="[[profileName_]]">
        </settings-manage-profile>
      </neon-animatable>
</if>
    </settings-animated-pages>

    <paper-dialog modal id="disconnectDialog">
      <h2 i18n-content="syncDisconnectTitle"></h2>
      <div i18n-values=".innerHTML:syncDisconnectExplanation"></div>
<if expr="(not chromeos and is_posix) or is_win or is_macosx">
      <paper-checkbox id="deleteProfile"
          i18n-content="syncDisconnectDeleteProfile">
      </paper-checkbox>
</if>
      <div class="button-strip">
        <paper-button dialog-dismiss i18n-content="cancel">
        </paper-button>
        <paper-button dialog-confirm class="action-button"
            on-tap="onDisconnectConfirm_" i18n-content="syncDisconnectConfirm">
        </paper-button>
      </div>
    </paper-dialog>

<if expr="chromeos">
    <template is="dom-if" if="[[easyUnlockEnabled_]]">
      <easy-unlock-turn-off-dialog id="easyUnlockTurnOffDialog">
      </easy-unlock-turn-off-dialog>
    </template>
</if>
  </template>
  <script src="people_page.js"></script>
</dom-module>