mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-28 04:02:27 -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 {
|
||||
margin-bottom: 120px;
|
||||
}
|
||||
.fieldContainerWSS {
|
||||
display: none;
|
||||
}
|
||||
@media screen and (min-width: 768px) {
|
||||
.box {
|
||||
width: 50%;
|
||||
|
@ -1,6 +1,6 @@
|
||||
.aux
|
||||
background: lighten($gray-light, 93%)
|
||||
|
||||
|
||||
header
|
||||
margin-top: 8%
|
||||
text-align: center
|
||||
@ -49,6 +49,9 @@
|
||||
#loginbox
|
||||
margin-bottom: 120px
|
||||
|
||||
.fieldContainerWSS
|
||||
display: none
|
||||
|
||||
@media screen and (min-width: 768px)
|
||||
|
||||
.box
|
||||
|
@ -1,7 +1,9 @@
|
||||
$('#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 connURL = SERVER_CONFIG.wss;
|
||||
var connURL = SERVER_CONFIG.wss ? SERVER_CONFIG.wss : $('#connURL').val();
|
||||
|
||||
var transport;
|
||||
var wsURL = '';
|
||||
|
@ -15,9 +15,15 @@ block content
|
||||
.fieldContainer
|
||||
label(for='password') Password
|
||||
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!
|
||||
|
||||
block scripts
|
||||
script(src="/config.js")
|
||||
script(src="/js/login.js")
|
||||
script.
|
||||
if ("#{config.wss}".length == 0)
|
||||
$('.fieldContainerWSS').show();
|
||||
|
Loading…
Reference in New Issue
Block a user