From b62f086ffe6a7171f147442cd36e78bb181cd467 Mon Sep 17 00:00:00 2001 From: Cory Chaplin Date: Mon, 31 Mar 2014 21:16:17 +0200 Subject: [PATCH] Text theme fixes --- client/assets/text_themes/default.json | 16 ---------------- client/src/models/network.js | 6 +----- client/src/views/texttheme.js | 16 ++++++++++++++++ config.example.js | 1 + 4 files changed, 18 insertions(+), 21 deletions(-) diff --git a/client/assets/text_themes/default.json b/client/assets/text_themes/default.json index 4df00ac..44dc8db 100644 --- a/client/assets/text_themes/default.json +++ b/client/assets/text_themes/default.json @@ -1,19 +1,3 @@ -/** - * TEXT THEMES SYNTAX - * - * %N: nickname - * %C[digit]: color - * %C: channel - * %J: ident - * %H: host - * %R: realname - * %B: bold - * %I: italic - * %U: underline - * %O: cancel styles - * %T: translated text - **/ - { "client_models_channel_join": "== %N %T", "client_models_channel_part": "== %N %T", diff --git a/client/src/models/network.js b/client/src/models/network.js index 23987bf..dcb2780 100644 --- a/client/src/models/network.js +++ b/client/src/models/network.js @@ -168,11 +168,6 @@ // Trim any whitespace off the name channel_name = channel_name.trim(); - // If not a valid channel name, display a warning - if (!that.isChannelName(channel_name)) { - that.panels.server.addMsg('', styleText('client_models_network_channel_invalid_name', {'%T': translateText('client_models_network_channel_invalid_name'), '%C': channel_name})); - _kiwi.app.message.text(channel_name + ' ' + _kiwi.global.i18n.translate('client_models_network_channel_invalid_name').fetch(), {timeout: 5000}); - return; // Add channel_prefix in front of the first channel if missing if (that.get('channel_prefix').indexOf(channel_name[0]) === -1) { // Could be many prefixes but '#' is highly likely the required one @@ -191,6 +186,7 @@ that.gateway.join(channel_name, channel_key); }); + return panels; }, diff --git a/client/src/views/texttheme.js b/client/src/views/texttheme.js index ec56cf1..c85f1c2 100644 --- a/client/src/views/texttheme.js +++ b/client/src/views/texttheme.js @@ -1,3 +1,19 @@ +/** + * TEXT THEMES SYNTAX + * + * %N: nickname + * %C[digit]: color + * %C: channel + * %J: ident + * %H: host + * %R: realname + * %B: bold + * %I: italic + * %U: underline + * %O: cancel styles + * %T: translated text + **/ + _kiwi.view.TextTheme = _kiwi.view.Panel.extend({ initialize: function(text_theme) { this.text_theme = text_theme; diff --git a/config.example.js b/config.example.js index 1314152..96efa1c 100644 --- a/config.example.js +++ b/config.example.js @@ -178,6 +178,7 @@ conf.client = { nick: 'kiwi_?', settings: { theme: 'relaxed', + text_theme: 'default', channel_list_style: 'tabs', scrollback: 250, show_joins_parts: true, -- 2.25.1