From 2af62eb1108ca965714fe6542961abda7c175c32 Mon Sep 17 00:00:00 2001 From: Borja Date: Mon, 27 Apr 2015 16:49:16 +0200 Subject: [PATCH 1/2] Add configurable realname and username --- client/assets/css/style.css | 3 ++- client/src/app.js | 10 +++++++- client/src/index.html.tmpl | 18 +++++++++++++++ client/src/models/gateway.js | 8 +++++-- client/src/models/newconnection.js | 4 +++- client/src/translations/en-gb.po | 12 ++++++++++ client/src/translations/es-419.po | 12 ++++++++++ client/src/translations/es.po | 12 ++++++++++ client/src/views/serverselect.js | 37 +++++++++++++++++++++++++++--- config.example.js | 6 ++++- server/client.js | 2 ++ server/irc/connection.js | 4 ++-- server/settingsgenerator.js | 11 +++++---- 13 files changed, 124 insertions(+), 15 deletions(-) diff --git a/client/assets/css/style.css b/client/assets/css/style.css index 55c728228..1c6d82d36 100644 --- a/client/assets/css/style.css +++ b/client/assets/css/style.css @@ -270,7 +270,7 @@ html, body { height:100%; } */ #kiwi .server_select { position:relative; width:320px; margin:0 auto; overflow:hidden; } #kiwi .server_select.initial { margin-top: 3em; } -#kiwi .server_select .more { display: none; } +#kiwi .server_select .more, .advanced { display: none; } #kiwi .server_select button { } #kiwi .server_select input { } #kiwi .server_select label { } @@ -283,6 +283,7 @@ html, body { height:100%; } #kiwi .server_select .basic tr.key { display:none; } #kiwi .server_select.single_server .basic { border:none; } #kiwi .server_select .status { } +#kiwi .server_select .show_advanced { font-size: 0.8em; } /* Channel key icon */ #kiwi .server_select .basic tr.channel td { position: relative; } diff --git a/client/src/app.js b/client/src/app.js index 63b5df375..416c44a9d 100644 --- a/client/src/app.js +++ b/client/src/app.js @@ -287,7 +287,9 @@ _kiwi.global = { port: 6667, ssl: false, channel: '', - channel_key: '' + channel_key: '', + username: '', + realname: '' }; var uricheck; @@ -314,6 +316,12 @@ _kiwi.global = { if (_kiwi.app.server_settings.client.channel_key) defaults.channel_key = _kiwi.app.server_settings.client.channel_key; + + if (_kiwi.app.server_settings.client.username) + defaults.username = _kiwi.app.server_settings.client.username; + + if (_kiwi.app.server_settings.client.realname) + defaults.realname = _kiwi.app.server_settings.client.realname; } diff --git a/client/src/index.html.tmpl b/client/src/index.html.tmpl index b32ce5221..0fdff08ee 100644 --- a/client/src/index.html.tmpl +++ b/client/src/index.html.tmpl @@ -225,6 +225,24 @@ + + + <%= advanced %> + +
+ + + + + + + + + + + +
+