Mercurial > libervia-templates
annotate default/login/logged.html @ 84:b2ef34e602cf
base, js (websocket), css (main style): dynamic pages implementation, first draft:
this patch introduces the browser part of dynamic pages.
Dynamic pages work by establishing a websocket between server and the current page, if requested by server (which means that needed arguments are present in template).
Once the connection is established, the server can, for now, reload the page, append HTML elements, or receive arbitrary data (without reloading the page, in opposition to data post).
If connection can't be established, a popup will be displayed and connection will be retried many times after variable timeouts.
The browser will finally give up and display an alert to client if the number of retries is too high (20 for now).
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 03 Jan 2018 01:12:16 +0100 |
parents | a5dc14675d5e |
children | a37d535b7ddd |
rev | line source |
---|---|
54
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
1 {% set post_confirm_message=_("You have been logged correctly") %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
2 {% if not embedded %}{% extends 'base/base.html' %}{% endif %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
3 {% import 'input/form.html' as form with context %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
4 {% import 'input/field.html' as field with context %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
5 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
6 {% block title %}{{C.APP_NAME}}{% endblock %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
7 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
8 {% block confirm_message %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
9 {% trans %}You have been logged correctly{% endtrans %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
10 {% endblock confirm_message %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
11 |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
12 {% block body %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
13 <div id='logged'> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
14 <div class='logged_box box'> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
15 <p>You are logged under the account <span class="logged_profile">{{profile}}</span></p> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
16 </div> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
17 {% call form.form() %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
18 {{ field.meta('type', 'disconnect') }} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
19 {{ field.submit(_("Disconnect")) }} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
20 {% endcall %} |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
21 </div> |
a5dc14675d5e
login: login, logged and registration pages
Goffi <goffi@goffi.org>
parents:
diff
changeset
|
22 {% endblock body %} |