summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/me2mom/choice.html
blob: 5c83ccac18c8afbfb566f250393479e4906b55e3 (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
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
<!doctype html>
<!--
Copyright (c) 2011 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<html>
  <head>
    <meta charset="utf-8" />
    <link href="http://fonts.googleapis.com/css?family=Droid+Sans&amp;v1"
          rel="stylesheet" type="text/css">
    <link rel="shortcut icon" href="chromoting128.png" />
    <link rel="stylesheet" href="debug_log.css" />
    <link rel="stylesheet" href="main.css" />
    <link rel="stylesheet" href="choice.css" />
    <link rel="stylesheet" href="toolbar.css" />
    <script src="client_session.js"></script>
    <script src="debug_log.js"></script>
    <script src="oauth2.js"></script>
    <script src="plugin_settings.js"></script>
    <script src="remoting.js"></script>
    <script src="xhr.js"></script>
    <title>Chromoting</title>
  </head>

  <body onLoad="remoting.init();"
        onUnload="remoting.disconnect();">
    <div id="control-panel" class="client-element host-element">
      <span id="email-status">
        <span class="auth-status-label">Email:</span>
        <span id="current-email"></span>
      </span> <!-- email-status -->

      <span id="oauth2-entry">
        <form>
          <span class="auth-status-label">OAuth2 Token:</span>
          <input id="oauth2-token-button" type="button"
                 onclick="remoting.oauth2.doAuthRedirect();"
                 value="Get OAuth2 Token&hellip;" />
          <input id="oauth2-clear-button" type="button"
                 onclick="remoting.clearOAuth2();"
                 value="Revoke" />
        </form>
      </span> <!-- oauth2-entry -->

      <span id="debug-enable">
        <form>
          <input id="debug-log-toggle" type="button" value="Debug log"
                 onclick="remoting.toggleDebugLog();"/>
        </form>
      </span> <!-- debug-enable -->
    </div> <!-- control-panel -->

    <div id="session-toolbar"
         class="toolbar-container in-session-element"
         hidden>
      <div class="toolbar-border">
        <span id="session-status-message">Initialising...</span>
        <strong id="connected-to"></strong>
        <button type="button" onclick="remoting.disconnect();">
          Disconnect
        </button>
        <span class="right-align">
          <button type="button"
                  onclick="remoting.toggleDebugLog();">
            Debug log
          </button>
          <button type="button"
                  onclick="remoting.toggleScaleToFit();">
            Fit screen
          </button>
        </span>
      </div>
      <div class="toolbar-stub">
        <img src="toolbar-stub.png">
      </div>
    </div> <!-- session-toolbar -->

    <section id="choice-mode" class="mode host-element client-element" hidden>
      <header class="choice-header">
        <img id="icon" src="chromoting128.png">
        <h1 class="icon-label host-element">
          Chromoting&nbsp;&rsaquo;&nbsp;Share
        </h1>
        <h1 class="icon-label client-element">
          Chromoting&nbsp;&rsaquo;&nbsp;Connect
        </h1>
        <img id="divider-top" src="dividertop.png">
      </header>

      <div id="host-panel" class="host-element">
        <div id="unshared" class="mode">
          <div class="description">
            With Chromoting you can easily let another Chrome user see and
            control your computer.
          </div>
          <div class="centered-button">
            <button id="share-button" class="auth-status-control big-button"
                    type="button" onclick="remoting.tryShare();">
              Share this computer
            </button>
          </div>
        </div> <!-- unshared -->

        <div id="preparing-to-share" class="mode">
          <div class="message">
            Generating access code&hellip;
          </div>
        </div> <!-- preparing-to-share -->

        <div id="ready-to-share" class="mode">
          <div class="description">
            To begin sharing your desktop, read out the access code below to the
            person who will be assisting you.
          </div>
          <div id="access-code-display">
          </div>
          <div id="access-code-countdown-container">
            <div id="access-code-countdown" class="expiring" hidden>
              This access code will expire in
              0:<span id="seconds-remaining"></span>
            </div>
          </div>
          <div class="description">
            Once they enter the code your sharing session will begin.
          </div>
        </div> <!-- ready-to-share -->

        <div id="shared" class="mode">
          <div class="message">
            Your desktop is currently being shared.
          </div>
          <div class="centered-button">
            <button type="button" class="big-button"
                    onclick="remoting.cancelShare();">
              Stop sharing
            </button>
          </div>
        </div> <!-- shared -->

        <div id="share-failed" class="mode">
          <div id="unable-to-get-token" class="message">
            Unable to get access token.
          </div>
          <div class="centered-button">
            <button type="button" class="auth-status-control big-button"
                    onclick="remoting.setHostMode('unshared');">
              OK
            </button>
          </div>
        </div> <!-- share-failed -->
      </div> <!-- host-panel -->

      <div id="client-panel" class="client-element">
        <div id="unconnected"  class="mode">
          <div class="description">
            Have the user whose computer you wish to access click
            ‘Share this computer’ and then have them read
            their access code to you.
          </div>
          <div id="access-code-entry-row">
            <form action="" onsubmit="remoting.tryConnect(); return false;">
              <label class="auth-status-control" for="access-code-entry">
                Access code
              </label>
              <input id="access-code-entry" class="auth-status-control"
                     type="text"/>
              <button id="connect-button" class="auth-status-control big-button"
                      type="submit">
                Connect
              </button>
            </form>
          </div> <!-- code-entry-row -->
        </div> <!-- unconnected -->

        <div id="connecting" class="mode">
          <div class="message">
            Verifying access code...
            <!-- TODO(jamiewalch): Implement Cancel, being careful when ignoring
                 the eventual server response not to ignore responses for any
                 subsequent requests. This should be unified with the host-side
                 Cancel button in the footer.
            -->
          </div>
        </div> <!-- connecting -->

        <div id="connect-failed" class="mode">
          <div id="no-response" class="message">
            Failed to get response from server.
          </div>
          <div id="invalid-access-code" class="message">
            Invalid access code.
          </div>
          <div id="other-connect-error" class="message">
            An error occurred. The server response was
            <div id="server-response"></div>.
          </div>
          <div class="centered-button">
            <button type="button" class="auth-status-control big-button"
                    onclick="remoting.setClientMode('unconnected');">
              OK
            </button>
          </div>
        </div> <!-- connect-failed -->
      </div> <!-- client-panel -->

      <footer class="choice-footer">
        <img id="divider-bottom" src="dividerbottom.png">
        <div id="client-footer-text" class="client-element">
          Click here to
          <a class="switch-mode"
             href="#"
             onclick="remoting.setAppMode(remoting.AppMode.HOST);">
            share this computer</a>
          with another user.
        </div> <!-- client-footer-text -->

        <div id="client-footer-text-cros" class="client-element">
          Currently Hosting is not supported on Chromebooks. Hosting is
          supported on Win, Mac and Linux.
        </div> <!-- client-footer-text-cros -->

        <div id="host-footer-text" class="host-element">
          Click here to <a class="switch-mode"
             href="#"
             onclick="remoting.setAppMode(remoting.AppMode.CLIENT);">
            access a shared computer</a>.
        </div> <!-- host-footer-text -->

        <div id="waiting-footer">
          <img src="spinner.gif">
          <span class="waiting icon-label">waiting for connection&hellip;</span>
          <button id="cancel-button" class="big-button"
                  onclick="remoting.cancelPendingOperation();">
            Cancel
          </button>
        </div> <!-- waiting-footer -->
      </footer>
    </section> <!-- choice-mode -->

    <section id="session-mode" class="mode in-session-element client-element">
    </section> <!-- session-mode -->


    <section id="loading-mode">
      <em>Loading&hellip;</em>
    </section> <!-- loading-mode -->

    <div id="host-plugin-container">
    </div> <!-- host-plugin-container -->

    <section id="debug-log" hidden>
      <div id="statistics">
      </div>
      <div id="debug-messages">
      </div>
    </section> <!-- debug-log -->

  </body>
</html>