Added messages show/hide toggles
This commit is contained in:
parent
38397248c6
commit
4ef468bd32
File diff suppressed because one or more lines are too long
|
@ -509,6 +509,13 @@ button {
|
|||
#chat .highlight .from {
|
||||
color: #f00;
|
||||
}
|
||||
#chat.hide-join .join span,
|
||||
#chat.hide-nick .nick span,
|
||||
#chat.hide-part .part span,
|
||||
#chat.hide-mode .mode span,
|
||||
#chat.hide-quit .quit span {
|
||||
display: none !important;
|
||||
}
|
||||
#chat .notice .type {
|
||||
display: none;
|
||||
}
|
||||
|
|
|
@ -123,6 +123,39 @@
|
|||
<div class="col-sm-12">
|
||||
<h1 class="title">Settings</h1>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<h2>Messages</h2>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="join">
|
||||
Show joins
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="nick">
|
||||
Show nick changes
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="part">
|
||||
Show parts
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="mode">
|
||||
Show mode
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<label class="opt">
|
||||
<input type="checkbox" name="quit">
|
||||
Show quits
|
||||
</label>
|
||||
</div>
|
||||
<div class="col-sm-12">
|
||||
<h2>Sound</h2>
|
||||
</div>
|
||||
|
|
|
@ -238,7 +238,14 @@ $(function() {
|
|||
$.cookie.json = true;
|
||||
|
||||
var settings = $("#settings");
|
||||
var options = $.extend({notification: true}, $.cookie("settings"));
|
||||
var options = $.extend({
|
||||
join: true,
|
||||
mode: true,
|
||||
nick: true,
|
||||
notification: true,
|
||||
part: true,
|
||||
quit: true,
|
||||
}, $.cookie("settings"));
|
||||
|
||||
for (var i in options) {
|
||||
if (options[i]) {
|
||||
|
@ -248,10 +255,20 @@ $(function() {
|
|||
|
||||
settings.on("change", "input", function() {
|
||||
var self = $(this);
|
||||
options[self.attr("name")] = self.prop("checked");
|
||||
var name = self.attr("name");
|
||||
options[name] = self.prop("checked");
|
||||
$.cookie("settings", options);
|
||||
if ([
|
||||
"join",
|
||||
"nick",
|
||||
"part",
|
||||
"mode",
|
||||
"quit",
|
||||
].indexOf(name) !== -1) {
|
||||
console.log("toggle " + name);
|
||||
chat.toggleClass("hide-" + name, !self.prop("checked"));
|
||||
}
|
||||
}).find("input")
|
||||
.eq(0)
|
||||
.trigger("change");
|
||||
|
||||
var viewport = $("#viewport");
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "shout",
|
||||
"description": "A web IRC client",
|
||||
"version": "0.21.4",
|
||||
"version": "0.22.0",
|
||||
"author": "Mattias Erming",
|
||||
"preferGlobal": true,
|
||||
"bin": {
|
||||
|
|
Loading…
Reference in New Issue