Remember user
This commit is contained in:
parent
73b995931b
commit
7ac793fc89
@ -221,7 +221,9 @@ button {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
width: 220px;
|
width: 220px;
|
||||||
}
|
}
|
||||||
#footer button {
|
#footer .icon {
|
||||||
|
color: #7c838d;
|
||||||
|
display: inline-block;
|
||||||
font: 16px Octicons;
|
font: 16px Octicons;
|
||||||
line-height: 34px;
|
line-height: 34px;
|
||||||
padding: 0px 12px;
|
padding: 0px 12px;
|
||||||
@ -613,6 +615,9 @@ button {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 480px) {
|
@media (max-width: 480px) {
|
||||||
|
.title {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
.container {
|
.container {
|
||||||
margin-bottom: 5%;
|
margin-bottom: 5%;
|
||||||
}
|
}
|
||||||
|
@ -26,10 +26,10 @@
|
|||||||
You're not connected to any networks yet.
|
You're not connected to any networks yet.
|
||||||
</div>
|
</div>
|
||||||
<footer id="footer">
|
<footer id="footer">
|
||||||
<button class="sign-in" data-target="#sign-in" data-title="Sign in" data-placement="top" title="Sign in to Shout"></button>
|
<button class="icon sign-in" data-target="#sign-in" data-title="Sign in" data-placement="top" title="Sign in to Shout"></button>
|
||||||
<button class="connect" data-target="#connect" data-title="Connect" data-placement="top" title="Connect to network"></button>
|
<button class="icon connect" data-target="#connect" data-title="Connect" data-placement="top" title="Connect to network"></button>
|
||||||
<button class="settings" data-target="#settings" data-title="Settings" data-placement="top" title="Client settings"></button>
|
<button class="icon settings" data-target="#settings" data-title="Settings" data-placement="top" title="Client settings"></button>
|
||||||
<button class="sign-out" data-placement="top" title="Sign out user"></button>
|
<a href="" class="icon sign-out" data-placement="top" title="Sign out user"></a>
|
||||||
</footer>
|
</footer>
|
||||||
</aside>
|
</aside>
|
||||||
<div id="main">
|
<div id="main">
|
||||||
@ -55,7 +55,7 @@
|
|||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
<label class="port">
|
<label class="port">
|
||||||
Password
|
Password
|
||||||
<input class="input" name="password">
|
<input class="input" type="password" name="password">
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-xs-12">
|
<div class="col-xs-12">
|
||||||
|
@ -35,7 +35,7 @@ $(function() {
|
|||||||
pop.src = "/audio/pop.ogg";
|
pop.src = "/audio/pop.ogg";
|
||||||
|
|
||||||
$("#play").on("click", function() { pop.play(); });
|
$("#play").on("click", function() { pop.play(); });
|
||||||
$("#footer button").tooltip();
|
$("#footer .icon").tooltip();
|
||||||
|
|
||||||
var favico = new Favico({
|
var favico = new Favico({
|
||||||
animation: "none"
|
animation: "none"
|
||||||
@ -59,6 +59,7 @@ $(function() {
|
|||||||
|
|
||||||
socket.on("auth", function(data) {
|
socket.on("auth", function(data) {
|
||||||
$("body").addClass("signed-out");
|
$("body").addClass("signed-out");
|
||||||
|
$("#sign-in input[name='user']").val($.cookie("user") || "");
|
||||||
sidebar.find(".sign-in")
|
sidebar.find(".sign-in")
|
||||||
.click()
|
.click()
|
||||||
.end()
|
.end()
|
||||||
@ -285,6 +286,7 @@ $(function() {
|
|||||||
var chan = $(target)
|
var chan = $(target)
|
||||||
.css("z-index", top++)
|
.css("z-index", top++)
|
||||||
.addClass("active")
|
.addClass("active")
|
||||||
|
.trigger("show")
|
||||||
.find(".chat")
|
.find(".chat")
|
||||||
.sticky();
|
.sticky();
|
||||||
});
|
});
|
||||||
@ -375,6 +377,13 @@ $(function() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$("#windows").on("show", ".window", function() {
|
||||||
|
var self = $(this);
|
||||||
|
setTimeout(function() {
|
||||||
|
self.find("input").eq(0).focus();
|
||||||
|
}, 0);
|
||||||
|
});
|
||||||
|
|
||||||
$("#sign-in, #connect").on("submit", "form", function(e) {
|
$("#sign-in, #connect").on("submit", "form", function(e) {
|
||||||
e.preventDefault()
|
e.preventDefault()
|
||||||
var event = "auth";
|
var event = "auth";
|
||||||
@ -391,6 +400,9 @@ $(function() {
|
|||||||
values[obj.name] = obj.value;
|
values[obj.name] = obj.value;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (values.user) {
|
||||||
|
$.cookie("user", values.user);
|
||||||
|
}
|
||||||
socket.emit(
|
socket.emit(
|
||||||
event, values
|
event, values
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user