diff --git a/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.html b/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.html index 69a4683..6fe6165 100644 --- a/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.html +++ b/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.html @@ -1,50 +1,41 @@ - -
- {{'Bridge to Jira' | translate}} -
-
- + +
+
+

{{'This room is bridged to' | translate}} {{bridgedProjectUrlUnsafe}}

+
-
-
-

{{'This room is bridged to' | translate}} {{bridgedProjectUrlUnsafe}}

- -
-
-

- {{'In order to bridge to Jira, you\'ll need to authorize the bridge to access your organization(s). Please click the button below to do so.' | translate}} -

- - {{'Sign in with Jira' | translate}} - -
-
- - - -
+
+

+ {{'In order to bridge to Jira, you\'ll need to authorize the bridge to access your organization(s). Please click the button below to do so.' | translate}} +

+ + {{'Sign in with Jira' | translate}} +
- +
+ + + +
+
diff --git a/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.ts b/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.ts index a83c4e8..42a8012 100644 --- a/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.ts +++ b/web/app/configs/bridge/hookshot-jira/hookshot-jira.bridge.component.ts @@ -30,10 +30,10 @@ export class HookshotJiraBridgeConfigComponent extends BridgeComponent ({key: i.name, value: `${i.name} (${i.url})`})); + } + + public get projectOptions(): {key: string, value: string}[] { + return this.projects.map(p => ({key: p.key, value: `${p.key} (${p.name})`})); + } + public ngOnInit() { super.ngOnInit(); @@ -52,7 +60,7 @@ export class HookshotJiraBridgeConfigComponent extends BridgeComponent { this.authUrl = null; this.instances = r; - this.instance = this.instances[0]; + this.instance = this.instances[0].name; this.loadProjects(); if (this.timerId) { @@ -78,9 +86,9 @@ export class HookshotJiraBridgeConfigComponent extends BridgeComponent { + this.hookshot.getProjects(this.instance).then(projects => { this.projects = projects; - this.project = this.projects[0]; + this.project = this.projects[0].key; if (this.isBridged) { this.bridgedProjectUrlUnsafe = this.bridge.config.connections[0].config.url; @@ -120,8 +128,9 @@ export class HookshotJiraBridgeConfigComponent extends BridgeComponent { + this.hookshot.bridgeRoom(this.roomId, this.instance, this.project).then(conn => { this.bridge.config.connections.push(conn); + this.loadProjects(); this.isBusy = false; this.translate.get('Bridge requested').subscribe((res: string) => { this.toaster.pop("success", res); diff --git a/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.html b/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.html index 95f8a74..86dab2a 100644 --- a/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.html +++ b/web/app/configs/bridge/hookshot-webhook/hookshot-webhook.bridge.component.html @@ -1,54 +1,29 @@ - -
- {{'Add a new webhook' | translate}} -
-
- -
- -
+

{{'New webhook' | translate}}

+
+ + +
+

{{'Webhooks' | translate}}

+

{{'No webhooks configured for this room.' | translate}}

+ +
+ {{hook.config.name || ('No name' | translate)}} + URL: {{ hook.config.url }} +
+
- - -
- Webhooks -
-
- - - - - - - - - - - - - - - - - - - -
NameURL{{'Actions' | translate}}
{{'No webhooks' | translate}}
{{ hook.config.name }}{{'No name' | translate}}{{ hook.config.url }} - -
-
-
+
diff --git a/web/app/configs/bridge/irc/irc.bridge.component.html b/web/app/configs/bridge/irc/irc.bridge.component.html index 2d400c4..c76162f 100644 --- a/web/app/configs/bridge/irc/irc.bridge.component.html +++ b/web/app/configs/bridge/irc/irc.bridge.component.html @@ -1,90 +1,54 @@ - -
- {{'Add an IRC channel' | translate}} -
-
-
- {{'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}} -
+

{{'Add IRC channel' | translate}}

+
+ {{'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}} +
+
+ + + +
-
- - -
-
#
- -
-
- -
-
+
+

{{'The person selected here will be asked to approve or deny the bridge request.' | translate}}

+ + +
-
- -
- -
-
+

{{'Bridged channels' | translate}}

+

{{'No channels are bridged to this room.' | translate}}

+
+ {{channel.name + ' on ' + channel.networkName + (channel.pending ? ' (pending)' : '')}} +
+
- - -
- {{'IRC Networks' | translate}} -
-
- - - - - - - - - - - - - - - - - - -
{{'Channel' | translate}}{{'Network' | translate}}{{'Actions' | translate}}
{{'No bridged channels' | translate}}
- {{ channel.name }} - (pending) - {{ channel.networkName }} - -
-
-
+
diff --git a/web/app/configs/bridge/irc/irc.bridge.component.ts b/web/app/configs/bridge/irc/irc.bridge.component.ts index 913dc0f..abe25f3 100644 --- a/web/app/configs/bridge/irc/irc.bridge.component.ts +++ b/web/app/configs/bridge/irc/irc.bridge.component.ts @@ -41,17 +41,17 @@ export class IrcBridgeConfigComponent extends BridgeComponent { } private resetForm() { - this.networkId = this.getNetworks()[0].id; + this.networkId = this.getNetworks()[0].key; this.channel = ""; this.ops = []; this.channelStep = 1; } - public getNetworks(): { id: string, name: string }[] { + public getNetworks(): { key: string, value: string }[] { const ids = Object.keys(this.bridge.config.availableNetworks); if (!this.networkId) setTimeout(() => this.networkId = ids[0], 0); return ids.map(i => { - return {id: i, name: this.bridge.config.availableNetworks[i].name}; + return {key: i, value: this.bridge.config.availableNetworks[i].name}; }); } diff --git a/web/app/configs/bridge/slack/slack.bridge.component.html b/web/app/configs/bridge/slack/slack.bridge.component.html index 41ebdf0..3382d85 100644 --- a/web/app/configs/bridge/slack/slack.bridge.component.html +++ b/web/app/configs/bridge/slack/slack.bridge.component.html @@ -1,57 +1,48 @@ - -
- {{'Bridge to Slack' | translate}} -
-
- + +
+
+

{{'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}}

+
-
-
- {{'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}} -
- -
-
- This room is bridged to "{{ bridge.config.link.channelName }}" on Slack. - -
-
-

- {{'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}} -

- - sign in with slack - -
-
- - - -
+
+

{{'This room is bridged to ' | translate}}"{{ bridge.config.link.channelName }}"{{' on Slack.' | translate}}

+
- +
+

+ {{'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}} +

+ + sign in with slack + +
+
+ + + +
+
+ diff --git a/web/app/configs/bridge/slack/slack.bridge.component.ts b/web/app/configs/bridge/slack/slack.bridge.component.ts index 746d6ea..d18a53a 100644 --- a/web/app/configs/bridge/slack/slack.bridge.component.ts +++ b/web/app/configs/bridge/slack/slack.bridge.component.ts @@ -33,6 +33,14 @@ export class SlackBridgeConfigComponent extends BridgeComponent imp this.translate = translate; } + public get teamOptions(): {key: string, value: string}[] { + return this.teams.map(t => ({key: t.id, value: t.name})); + } + + public get channelOptions(): {key: string, value: string}[] { + return this.channels.map(t => ({key: t.id, value: t.name})); + } + public ngOnInit() { super.ngOnInit(); diff --git a/web/app/configs/bridge/telegram/telegram.bridge.component.html b/web/app/configs/bridge/telegram/telegram.bridge.component.html index 51c94f4..5e3272e 100644 --- a/web/app/configs/bridge/telegram/telegram.bridge.component.html +++ b/web/app/configs/bridge/telegram/telegram.bridge.component.html @@ -1,34 +1,29 @@ - -
- {{'Bridge to Telegram' | translate}} -
-
-
- {{'This room is bridged to on Telegram' | translate}} "{{ chatName }}" ({{ chatId }}) {{'on Telegram' | translate}}. -
- -
- - {{'You do not have the necessary permissions in this room to unbridge the channel.' | translate}} - -
-
- - -
+
+ {{'This room is bridged to on Telegram' | translate}} "{{ chatName }}" ({{ chatId }}) {{'on Telegram' | translate}}. +
+
- + + {{'You do not have the necessary permissions in this room to unbridge the channel.' | translate}} + +
+
+

{{'After inviting' | translate}} @{{ botUsername }} {{'to your Telegram chat, run the command' | translate}} /id {{'in the Telegram room to get the chat ID.' | translate}}

+ + + +
diff --git a/web/app/configs/bridge/telegram/telegram.bridge.component.ts b/web/app/configs/bridge/telegram/telegram.bridge.component.ts index 4ed01af..8b6e223 100644 --- a/web/app/configs/bridge/telegram/telegram.bridge.component.ts +++ b/web/app/configs/bridge/telegram/telegram.bridge.component.ts @@ -58,19 +58,19 @@ export class TelegramBridgeConfigComponent extends BridgeComponent - -
- {{'Add a new webhook' | translate}} -
-
- -
- -
+

{{'New webhook' | translate}}

+
+ + +
+

{{'Webhooks' | translate}}

+

{{'No webhooks configured for this room.' | translate}}

+ +
+ {{hook.label || ('No name' | translate)}} + URL: {{ hook.url }} +
+
- - -
- Webhooks -
-
- - - - - - - - - - - - - - - - - - - - - -
Name{{'Type' | translate}}URL{{'Actions' | translate}}
{{'No webhooks' | translate}}
{{ hook.label }}{{'No name' | translate}}{{ hook.type }}{{ hook.url }} - -
-
-
+