Allow fields to be hidden from channel list (still visible in edit modal).
This commit is contained in:
parent
a5d62bd44d
commit
2275793f6c
|
@ -13,9 +13,12 @@
|
|||
|
||||
|
||||
{{# each provider.channel_parameters as |param|}}
|
||||
<b>{{i18n (concat 'chat_integration.provider.' channel.provider '.param.' param.key '.title')}}:</b>
|
||||
{{get channel.data param.key}} <br/>
|
||||
|
||||
|
||||
{{#if param.hidden}}{{else}}
|
||||
<span class='field-name'>{{i18n (concat 'chat_integration.provider.' channel.provider '.param.' param.key '.title')}}:</span>
|
||||
<span class='field-value'>{{get channel.data param.key}}</span>
|
||||
<br/>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
|
||||
</span>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)'}
|
||||
]
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue