summaryrefslogtreecommitdiffstats
path: root/remoting/webapp/me2mom/choice.html
blob: c2e8ebe1bf0716f484122127899f0a2a289b0259 (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
<!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 rel="shortcut icon" href="chromoting128.png" />
    <link rel="stylesheet" href="main.css" />
    <link rel="stylesheet" href="choice.css" />
    <script src="remoting.js"></script>
    <script src="oauth2.js"></script>
    <title>Chromoting</title>
  </head>

  <body>
    <div id="auth-panel">
      <span id="oauth2-entry">
        <form action="" onsubmit="authorizeOAuth2(); return false;">
          <label for="oauth2-code">OAuth2 Token:</label>
          <input id="oauth2-code" class="display-inline" type="text"
                 oninput="handleOAuth2CodeChange();" />
          <input id="oauth2-submit-button" class="display-inline"
                 type="submit" />
          <input id="oauth2-code-button" class="display-inline" type="button"
                 onclick="remoting.oauth2.openOAuth2Window(); return false;"
                 value="Get OAuth2 Token&hellip;" />
          <input id="oauth2-clear-button" class="display-inline" type="button"
                 onclick="clearOAuth2(); return false;" value="Revoke" />
        </form>
      </span> <!-- oauth2-entry -->

      <span id="email-entry">
        <form action=""
              onsubmit="setEmail(this['new-email'].value); return false;">
          <label for="new-email">Email:</label>
          <span id="current-email" class="display-inline"></span>
          <input id="new-email" class="display-inline" name="new-email"
                 type="text" />
          <input id="email-submit-button" class="display-inline"
                 type="submit" />
          <input id="change-email-button" class="display-inline" type="button"
                 onclick="setEmail(''); return false;" value="Change Email" />
        </form>
      </span> <!-- email-entry -->

    </div> <!-- auth-panel -->

    <div id="main-panel">
      <header>
        <img id="icon" src="chromoting128.png">
        <h1 class="icon-label host-element display-inline">
          Chromoting&nbsp;>&nbsp;Share
        </h1>
        <h1 class="icon-label client-element display-inline">
          Chromoting&nbsp;>&nbsp;Connect
        </h1>
        <img id="divider-top" src="dividertop.png">
      </header>

      <section id="host-section" 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>
          <form class="centered-form">
            <button id="share-button" class="auth-status-control"
                    type="button" onclick="tryShare(); return false;">
              Share this computer
            </button>
          </form>
        </div> <!-- unshared -->

        <div id="preparing-to-share" class="mode">
          <div class="message">
            Connecting...
          </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">
            FAILED!
          </div>
          <div class="message">
            Waiting for connection...
          </div>
          <form class="centered-form">
            <button type="button" onclick="cancelShare(); return false;">
              Cancel
            </button>
          </form>
        </div> <!-- ready-to-share -->

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

      <section id="client-section" class="client-element">
        <div id="unconnected"  class="mode">
          <div class="description">
            Have the user whose computer you wish to access click
            ‘Share this computer with another user’ and then have them read
            their access code to you.
          </div>
          <div id="access-code-entry-row">
            <form action="">
              <label class="auth-status-control" for="access-code-entry">
                Access code:
              </label>
              <input id="access-code-entry" class="auth-status-control"
                     type="text"/>
            </form>
            <form class="centered-form">
              <button id="connect-button" class="auth-status-control"
                      type="button" onclick="tryConnect();  return false;">
                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.
            <form class="centered-form">
              <button onclick="cancelConnect(); return false;">
                Cancel
              </button>
            </form>
            -->
          </div>
        </div> <!-- connecting -->

        <div id="connect-failed" class="mode">
          <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>
          <form class="centered-form">
            <button type="button"
                    onclick="setClientMode('unconnected'); return false;">
              OK
            </button>
          </form>
        </div> <!-- connect-failed -->
      </section> <!-- client-section -->

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

        <div class="host-element">
          Click here to <a class="switch-mode"
             href="#"
             onclick="setGlobalModePersistent(remoting.CLIENT_MODE);
                      return false;">
            access a shared computer</a>.
        </div> <!-- host-footer -->
      </footer>
    </div> <!-- main-panel -->
    <div id="plugin-wrapper">
    </div>
  </body>
</html>