diff --git a/assets/javascripts/discourse/templates/components/channel-details.hbs b/assets/javascripts/discourse/templates/components/channel-details.hbs index 204fd02..83412ff 100644 --- a/assets/javascripts/discourse/templates/components/channel-details.hbs +++ b/assets/javascripts/discourse/templates/components/channel-details.hbs @@ -13,9 +13,12 @@ {{# each provider.channel_parameters as |param|}} - {{i18n (concat 'chat_integration.provider.' channel.provider '.param.' param.key '.title')}}: - {{get channel.data param.key}}
- + + {{#if param.hidden}}{{else}} + {{i18n (concat 'chat_integration.provider.' channel.provider '.param.' param.key '.title')}}: + {{get channel.data param.key}} +
+ {{/if}} {{/each}} diff --git a/assets/stylesheets/chat-integration-admin.scss b/assets/stylesheets/chat-integration-admin.scss index 60e45b2..7407cde 100644 --- a/assets/stylesheets/chat-integration-admin.scss +++ b/assets/stylesheets/chat-integration-admin.scss @@ -20,23 +20,26 @@ max-width: 100%; margin-top: 10px; margin-bottom: 10px; - background-color: dark-light-diff($quaternary, $secondary, 70%, -70%); + background-color: $danger-low; padding: 15px; } div.channel-details{ margin: 20px 10px; - border: 1px solid dark-light-diff($primary, $secondary, 90%, -75%); + border: 1px solid $primary-low; div.channel-header{ - background: dark-light-diff($primary, $secondary, 90%, -75%); + background: $primary-low; padding: 10px; overflow:auto; .channel-title{ - font-weight: bold; - font-size: 1.3em; + font-size: 1.3em; + .field-name{ + font-weight: bold; + } + } @@ -67,7 +70,7 @@ } tr.instructions label{ - color: dark-light-choose(scale-color($primary, $lightness: 50%), scale-color($secondary, $lightness: 50%)); + color: $primary-medium; } diff --git a/lib/discourse_chat/provider/discord/discord_provider.rb b/lib/discourse_chat/provider/discord/discord_provider.rb index 499b61e..a91e33e 100644 --- a/lib/discourse_chat/provider/discord/discord_provider.rb +++ b/lib/discourse_chat/provider/discord/discord_provider.rb @@ -5,7 +5,7 @@ module DiscourseChat PROVIDER_ENABLED_SETTING = :chat_integration_discord_enabled CHANNEL_PARAMETERS = [ {key: "name", regex: '^\S+'}, - {key: "webhook_url", regex: '^https:\/\/discordapp\.com\/api\/webhooks\/'} + {key: "webhook_url", regex: '^https:\/\/discordapp\.com\/api\/webhooks\/', hidden: true} ] def self.send_message(url, message) diff --git a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb index 14a9c80..97b6af1 100644 --- a/lib/discourse_chat/provider/hipchat/hipchat_provider.rb +++ b/lib/discourse_chat/provider/hipchat/hipchat_provider.rb @@ -5,7 +5,7 @@ module DiscourseChat PROVIDER_ENABLED_SETTING = :chat_integration_hipchat_enabled CHANNEL_PARAMETERS = [ {key: "name", regex: '^\S+'}, - {key: "webhook_url", regex: 'hipchat\.com'}, + {key: "webhook_url", regex: 'hipchat\.com', hidden:true}, {key: "color", regex: '(yellow|green|red|purple|gray|random)'} ] diff --git a/lib/discourse_chat/provider/matrix/matrix_provider.rb b/lib/discourse_chat/provider/matrix/matrix_provider.rb index feb0304..f4478ee 100644 --- a/lib/discourse_chat/provider/matrix/matrix_provider.rb +++ b/lib/discourse_chat/provider/matrix/matrix_provider.rb @@ -5,7 +5,7 @@ module DiscourseChat PROVIDER_ENABLED_SETTING = :chat_integration_matrix_enabled CHANNEL_PARAMETERS = [ {key: "name", regex: '^\S+'}, - {key: "room_id", regex: '^\!\S+:\S+$'} + {key: "room_id", regex: '^\!\S+:\S+$', hidden:true} ] def self.send_message(room_id, message)