2018-10-25 00:49:29 -04:00
< my-bridge-config [ bridgeComponent ] = " this " >
< ng-template # bridgeParamsTemplate >
< my-ibox [ isCollapsible ] = " false " >
< h5 class = "my-ibox-title" >
2020-10-23 07:30:20 -04:00
{{'Bridge to Slack' | translate}}
2018-10-25 00:49:29 -04:00
< / h5 >
< div class = "my-ibox-content" * ngIf = "loadingTeams" >
< my-spinner > < / my-spinner >
< / div >
< div class = "my-ibox-content" * ngIf = "!loadingTeams" >
< div * ngIf = "isBridged && bridge.config.link.isWebhook" >
2020-10-23 07:30:20 -04:00
{{'This room is bridged to Slack using webhooks. Webhook bridging is legacy and doesn\'t support as rich bridging as the new approach. It is recommended to re-create the bridge with the new process.' | translate}}
2019-07-11 00:17:16 -04:00
< br / >
2018-10-25 00:49:29 -04:00
< button type = "button" class = "btn btn-sm btn-danger" [ disabled ] = " isBusy " ( click ) = " unbridgeRoom ( ) " >
2020-10-23 07:30:20 -04:00
{{'Unbridge' | translate}}
2018-10-25 00:49:29 -04:00
< / button >
< / div >
< div * ngIf = "isBridged && !bridge.config.link.isWebhook" >
This room is bridged to "{{ bridge.config.link.channelName }}" on Slack.
< button type = "button" class = "btn btn-sm btn-danger" [ disabled ] = " isBusy " ( click ) = " unbridgeRoom ( ) " >
2020-10-23 07:30:20 -04:00
{{'Unbridge' | translate}}
2018-10-25 00:49:29 -04:00
< / button >
< / div >
< div * ngIf = "!isBridged && needsAuth" >
< p >
2020-10-23 07:30:20 -04:00
{{'In order to bridge Slack channels, you\'ll need to authorize the bridge to access your teams and channels. Please click the button below to do so.' | translate}}
2018-10-25 00:49:29 -04:00
< / p >
< a [ href ] = " authUrl " rel = "noopener" target = "_blank" >
2019-07-11 00:17:16 -04:00
< img src = "/img/slack_auth_button.png" class = "slack-auth-button" alt = "sign in with slack" / >
2018-10-25 00:49:29 -04:00
< / a >
< / div >
< div * ngIf = "!isBridged && !needsAuth" >
< label class = "label-block" >
2020-10-23 07:30:20 -04:00
{{'Team' | translate}}
2018-10-25 00:49:29 -04:00
< select class = "form-control form-control-sm" [ ( ngModel ) ] = " teamId "
(change)="loadChannels()" [disabled]="isBusy">
< option * ngFor = "let team of teams" [ ngValue ] = " team . id " >
{{ team.name }}
< / option >
< / select >
< / label >
< label class = "label-block" >
2020-10-23 07:30:20 -04:00
{{'Channel' | translate}}
2018-10-25 00:49:29 -04:00
< select class = "form-control form-control-sm" [ ( ngModel ) ] = " channelId " [ disabled ] = " isBusy " >
< option * ngFor = "let channel of channels" [ ngValue ] = " channel . id " >
{{ channel.name }}
< / option >
< / select >
< / label >
< button type = "button" class = "btn btn-sm btn-primary" [ disabled ] = " isBusy " ( click ) = " bridgeRoom ( ) " >
Bridge
< / button >
< / div >
< / div >
< / my-ibox >
< / ng-template >
2020-10-23 07:30:20 -04:00
< / my-bridge-config >