From 0f02816cd9b60ac2c53a8ff5ddc88793e543bd4e Mon Sep 17 00:00:00 2001 From: Madison Tries Date: Sat, 24 Oct 2015 14:38:22 -0500 Subject: [PATCH] Fixed bug where only ports of 4 character lengths could be entered, make channels an optional field, updated about page on the settings modal. CSS improvements --- less/panel-console.less | 2 +- less/panel-networks.less | 43 +++++++++++++++++++++++++++++----------- less/panel-users.less | 8 ++++---- less/standard.less | 1 + public/js/templates.js | 10 ++++++---- views/client.jade | 16 +++++++-------- 6 files changed, 51 insertions(+), 29 deletions(-) diff --git a/less/panel-console.less b/less/panel-console.less index 721237c..cd3679a 100644 --- a/less/panel-console.less +++ b/less/panel-console.less @@ -50,7 +50,7 @@ width: 100%; line-height: 25px; flex: 0 0 auto; - &:hover { background-color: @white-2; } + &:hover { background-color: @white-3; } } #channel-console output article aside { display: flex; diff --git a/less/panel-networks.less b/less/panel-networks.less index 4f726f6..19120c9 100644 --- a/less/panel-networks.less +++ b/less/panel-networks.less @@ -102,9 +102,19 @@ cursor: pointer; background-color: @darkBlue; } - &:nth-child(odd) { background-color: darken(@darkBlue, 2%); } } -.message-source-list li.channel { margin: 0 0 0 14px; } +.message-source-list li.server { background-color: darken(@darkBlue, 2%); } +.message-source-list li.channel { + margin: 0 0 0 14px; + &:before { + display: block; + position: absolute; + top: 5px; + height: 30px; + border-left: 2px dashed @lightBlue; + content: ""; + } +} .message-source-list li[data-alert]:after { float: right; height: 20px; @@ -119,19 +129,28 @@ border-radius: 4px; content: attr(data-alert); } +.message-source-list li .arrow { + display: none; + position: absolute; + top: 5px; + right: 0; + overflow: hidden; + width: 30px; + height: 30px; +} +.message-source-list li .arrow span { + float: left; + margin-left: 25px; + width: 30px; + height: 30px; + background-color: @white-2; + border-radius: 2px; + transform: rotateZ(45deg); +} .message-source-list li[data-alert=""]:after { display: none; } .message-source-list li.focusedSource { &:hover { background-color: @darkBlue; }; - &:before { - position: absolute; - top: 12px; - right: 0; - height: 0; - border-top: 7px solid transparent; - border-bottom: 7px solid transparent; - border-right: 7px solid @white-2; - content: ""; - } + .arrow { display: block; } } .message-source-list i { padding: 0 14px; diff --git a/less/panel-users.less b/less/panel-users.less index a183cf0..0801a6f 100644 --- a/less/panel-users.less +++ b/less/panel-users.less @@ -42,10 +42,6 @@ cursor: pointer; background-color: lighten(@white-3, 4%); } - &:hover:after { - content: attr(data-rank); - font-family: 'Open Sans', Helvetica, sans-serif; - } } #users ul li p { padding: 0 0 0 20px; @@ -61,6 +57,10 @@ color: @lightBlue; content: attr(data-rank-icon); } + &:hover:after { + content: attr(data-rank); + font-family: 'Open Sans', Helvetica, sans-serif; + } } #users footer { display: none; diff --git a/less/standard.less b/less/standard.less index 3a0efbd..0429cf7 100644 --- a/less/standard.less +++ b/less/standard.less @@ -13,6 +13,7 @@ h6 { a { color: @lightBlue; font: inherit; + text-decoration: none; &:visited { text-decoration: none; } &:hover { text-decoration: underline; } &:active { text-decoration: none; } diff --git a/public/js/templates.js b/public/js/templates.js index 659b99c..dac3388 100644 --- a/public/js/templates.js +++ b/public/js/templates.js @@ -1,9 +1,11 @@ +'use strict'; + var Templates = { messageSource: { - source: '' + source: '' }, userList: { - source: '
  • {{nick}}

  • ' + source: '
  • {{nick}}

  • ' }, message: { source: '

    {{{message}}}

    ' @@ -21,7 +23,7 @@ var Partials = { Handlebars.registerHelper('with', function(context, options) { var content = (function() { var results = []; - for (var key in context) { + for (let key in context) { var value = context[key]; results.push(options.fn({ key: key, @@ -37,7 +39,7 @@ Handlebars.registerHelper('with', function(context, options) { }); // Compile templates and save them back in the template object -for (var index in Templates) { +for (let index in Templates) { Templates[index].compiled = Handlebars.compile(Templates[index].source); } diff --git a/views/client.jade b/views/client.jade index 37df107..e257c27 100644 --- a/views/client.jade +++ b/views/client.jade @@ -3,8 +3,8 @@ html(lang="en") head meta(charset="utf-8") meta(http-equiv="x-ua-compatible", content="ie=edge") - title Maid IRC - meta(name="description", content="Maid IRC") + title Maid-IRC + meta(name="description", content="Maid-IRC") meta(name="viewport", content="width=device-width", initial-scale="1", user-scalable="no") meta(name="mobile-web-app-capable", content="yes") meta(name="theme-color", content="rgb(81,176,255)") @@ -68,8 +68,8 @@ html(lang="en") input#name(type="text", placeholder="Nickname", name="nick", spellcheck="false", autofocus, required) section input#server(type="text", placeholder="Server", name="server", spellcheck="false", required) - input#port(type="number", placeholder="Port", name="port", maxlength="4", max="65535", required) - input#channel(type="text", placeholder="Channel", name="channel", spellcheck="false", required) + input#port(type="number", placeholder="Port", name="port", maxlength="5", max="65535", required) + input#channel(type="text", placeholder="Channel", name="channel", spellcheck="false") footer button.btn#submit(type="submit", name="connect") Connect button.btn.fa.fa-gear(type="button") @@ -95,10 +95,10 @@ html(lang="en") .page#about h1 Maid span IRC - p.version Version #{version} - a(href="https://github.com/Phalanxia/Maid-IRC", target="_blank") GitHub - a(href="https://github.com/Phalanxia/Maid-IRC/issues", target="_blank") Report an issue - a(href="https://raw.githubusercontent.com/Phalanxia/Maid-IRC/master/LICENSE", target="_blank") License + p.version Running version #{version} + a(class="update" href="https://github.com/Phalanxia/Maid-IRC/releases/latest", target="_blank") Check for updates + a(class="update" href="https://github.com/Phalanxia/Maid-IRC/blob/master/LICENSE", target="_blank") License + br include ./includes/licenses.jade // Libraries