mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-24 10:12:18 -05:00
Login form with/without wss input
This commit is contained in:
parent
e38fdf8b9e
commit
d4dffab8df
@ -1559,6 +1559,9 @@ button.secondary:hover:not(:disabled) {
|
|||||||
#loginbox {
|
#loginbox {
|
||||||
margin-bottom: 120px;
|
margin-bottom: 120px;
|
||||||
}
|
}
|
||||||
|
.fieldContainerWSS {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
.box {
|
.box {
|
||||||
width: 50%;
|
width: 50%;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
.aux
|
.aux
|
||||||
background: lighten($gray-light, 93%)
|
background: lighten($gray-light, 93%)
|
||||||
|
|
||||||
header
|
header
|
||||||
margin-top: 8%
|
margin-top: 8%
|
||||||
text-align: center
|
text-align: center
|
||||||
@ -49,6 +49,9 @@
|
|||||||
#loginbox
|
#loginbox
|
||||||
margin-bottom: 120px
|
margin-bottom: 120px
|
||||||
|
|
||||||
|
.fieldContainerWSS
|
||||||
|
display: none
|
||||||
|
|
||||||
@media screen and (min-width: 768px)
|
@media screen and (min-width: 768px)
|
||||||
|
|
||||||
.box
|
.box
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
$('#loginbox form').on('submit', function (e) {
|
$('#loginbox form').on('submit', function (e) {
|
||||||
var jid = $('#jid').val() + "@" + SERVER_CONFIG.domain;
|
var jid = $('#jid').val();
|
||||||
|
if (SERVER_CONFIG.domain && jid.indexOf('@') == -1)
|
||||||
|
jid += "@" + SERVER_CONFIG.domain;
|
||||||
var password = $('#password').val();
|
var password = $('#password').val();
|
||||||
var connURL = SERVER_CONFIG.wss;
|
var connURL = SERVER_CONFIG.wss ? SERVER_CONFIG.wss : $('#connURL').val();
|
||||||
|
|
||||||
var transport;
|
var transport;
|
||||||
var wsURL = '';
|
var wsURL = '';
|
||||||
|
@ -15,9 +15,15 @@ block content
|
|||||||
.fieldContainer
|
.fieldContainer
|
||||||
label(for='password') Password
|
label(for='password') Password
|
||||||
input(type='password', id='password', name='password', placeholder='•••••••••••••', tabindex='2')
|
input(type='password', id='password', name='password', placeholder='•••••••••••••', tabindex='2')
|
||||||
|
.fieldContainer.fieldContainerWSS
|
||||||
|
label(for='wsURL') WebSocket or BOSH URL
|
||||||
|
input(type='text', id='connURL', name='connURL', placeholder='wss://aweso.me:5281/xmpp-websocket', tabindex='3')
|
||||||
|
|
||||||
button(type='submit', tabindex='3', class="primary") Go!
|
button(type='submit', tabindex='3', class="primary") Go!
|
||||||
|
|
||||||
block scripts
|
block scripts
|
||||||
script(src="/config.js")
|
script(src="/config.js")
|
||||||
script(src="/js/login.js")
|
script(src="/js/login.js")
|
||||||
|
script.
|
||||||
|
if ("#{config.wss}".length == 0)
|
||||||
|
$('.fieldContainerWSS').show();
|
||||||
|
Loading…
Reference in New Issue
Block a user