2018-03-31 16:37:36 -04:00
< my-bridge-config [ bridgeComponent ] = " this " >
< ng-template # bridgeParamsTemplate >
< my-ibox [ isCollapsible ] = " true " >
< h5 class = "my-ibox-title" >
2020-10-23 07:30:20 -04:00
{{'Add an IRC channel' | translate}}
2018-03-31 16:37:36 -04:00
< / h5 >
< div class = "my-ibox-content" >
< div class = "alert alert-info" >
2020-10-23 07:30:20 -04:00
{{'Bridging a channel requires authorization from a channel operator. When entering a channel below, a bot will join the channel to ensure it exists and has operators available.' | translate}}
2018-03-31 16:37:36 -04:00
< / div >
< div * ngIf = "channelStep === 1" >
< label class = "label-block" >
2020-10-23 07:30:20 -04:00
{{'Network' | translate}}
2018-03-31 16:37:36 -04:00
< select class = "form-control form-control-sm" [ ( ngModel ) ] = " networkId " [ disabled ] = " loadingOps " >
< option * ngFor = "let network of getNetworks()" [ ngValue ] = " network . id " >
{{ network.name }}
< / option >
< / select >
< / label >
< label class = "label-block" >
2020-10-23 07:30:20 -04:00
{{'Channel Name' | translate}}
2018-03-31 16:37:36 -04:00
< / label >
< div class = "input-group input-group-sm" >
< div class = "input-group-addon" > #< / div >
2019-07-11 00:17:16 -04:00
< input title = "channel" type = "text" class = "form-control form-control-sm" [ ( ngModel ) ] = " channel "
[disabled]="loadingOps">
2018-03-31 16:37:36 -04:00
< / div >
< div style = "margin-top: 25px" >
2019-07-11 00:17:16 -04:00
< button type = "button" class = "btn btn-sm btn-primary" [ disabled ] = " loadingOps "
(click)="loadOps()">
2020-10-23 07:30:20 -04:00
{{'Next' | translate}}
2018-03-31 16:37:36 -04:00
< / button >
< / div >
< / div >
< div * ngIf = "channelStep === 2" >
< label class = "label-block" >
2020-10-23 07:30:20 -04:00
{{'Operator' | translate}}
< span class = "text-muted " > {{'The person selected here will be asked to approve or deny the bridge request.' | translate}}< / span >
2018-03-31 16:37:36 -04:00
< select class = "form-control form-control-sm" [ ( ngModel ) ] = " op " [ disabled ] = " requestingBridge " >
< option * ngFor = "let op of ops" [ ngValue ] = " op " > {{ op }}< / option >
< / select >
< / label >
< div style = "margin-top: 25px" >
2019-07-11 00:17:16 -04:00
< button type = "button" class = "btn btn-sm btn-primary" [ disabled ] = " requestingBridge "
(click)="requestBridge()">
2020-10-23 07:30:20 -04:00
{{'Request Bridge' | translate}}
2018-03-31 16:37:36 -04:00
< / button >
< / div >
< / div >
< / div >
< / my-ibox >
< my-ibox [ isCollapsible ] = " true " >
< h5 class = "my-ibox-title" >
2020-10-23 07:30:20 -04:00
{{'IRC Networks' | translate}}
2018-03-31 16:37:36 -04:00
< / h5 >
< div class = "my-ibox-content" >
< table class = "table table-striped table-condensed table-bordered" >
< thead >
< tr >
2020-10-23 07:30:20 -04:00
< th > {{'Channel' | translate}}< / th >
< th > {{'Network' | translate}}< / th >
< th class = "actions-col" > {{'Actions' | translate}}< / th >
2018-03-31 16:37:36 -04:00
< / tr >
< / thead >
< tbody >
< tr * ngIf = "getChannels().length === 0" >
2020-10-23 07:30:20 -04:00
< td colspan = "3" > {{'No bridged channels' | translate}}< / td >
2018-03-31 16:37:36 -04:00
< / tr >
< tr * ngFor = "let channel of getChannels()" >
< td >
{{ channel.name }}
< span * ngIf = "channel.pending" class = "text-muted" > (pending)< / span >
< / td >
< td > {{ channel.networkName }}< / td >
< td class = "actions-col" >
< button type = "button" class = "btn btn-sm btn-outline-danger"
[disabled]="isUpdating || channel.pending"
(click)="removeChannel(channel)">
2020-10-23 07:30:20 -04:00
< i class = "far fa-trash-alt" > < / i > {{'Remove' | translate}}
2018-03-31 16:37:36 -04:00
< / button >
< / td >
< / tr >
< / tbody >
< / table >
< / div >
< / my-ibox >
< / ng-template >
2020-10-23 07:30:20 -04:00
< / my-bridge-config >