This repository was archived by the owner on Aug 18, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +37
-6
lines changed Expand file tree Collapse file tree 3 files changed +37
-6
lines changed Original file line number Diff line number Diff line change @@ -50,10 +50,18 @@ <h2 class="card--title">Login / Register</h2>
50
50
< h2 class ="card--title "> Connector types</ h2 >
51
51
</ base-card-title >
52
52
< base-card-body >
53
- < ul class ="typeList ">
54
- < li *ngFor ="let connectorType of connectorTypes "> {{ connectorType }}
55
- < ul >
56
- < li > {{ connectorMetadata.get(connectorType)?.displayName }}</ li >
53
+ < ul >
54
+ < li *ngFor ="let connectorType of connectorTypes ">
55
+ < div *ngIf ="connectorMetadata.get(connectorType)?.found "
56
+ [style.background-image] ="'url(' + connectorMetadata.get(connectorType).icon + ')' "
57
+ class ="connector-image "> </ div >
58
+ {{ connectorMetadata.get(connectorType)?.displayName }} < span class ="type "> ({{ connectorType }})</ span >
59
+ < ul class ="typeList ">
60
+ < li *ngIf ="!connectorMetadata.get(connectorType)?.found "> no metadata found.</ li >
61
+ < li
62
+ *ngIf ="connectorMetadata.get(connectorType)?.found "> {{ connectorMetadata.get(connectorType)?.description }}</ li >
63
+ < li *ngIf ="connectorMetadata.get(connectorType)?.found "> More Information: < a
64
+ [href] ="connectorMetadata.get(connectorType)?.wikiUrl "> Chat Overflow Wiki</ a > </ li >
57
65
</ ul >
58
66
</ li >
59
67
</ ul >
Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ export class BetterREPLComponent extends UpgradableComponent {
42
42
private lastPassword = "" ;
43
43
44
44
private connectorTypes : Array < string > ;
45
- private connectorMetadata : Map < string , ConnectorMetadata > ;
45
+ private connectorMetadata : Map < string , ConnectorMetadata > = new Map ( ) ;
46
46
private requirementTypes : RequirementTypes ;
47
47
private pluginTypes : Array < PluginType > ;
48
48
@@ -133,6 +133,13 @@ export class BetterREPLComponent extends UpgradableComponent {
133
133
let allValues = response [ key ] ;
134
134
for ( let keyValue in allValues ) {
135
135
this . connectorMetadata . set ( keyValue , allValues [ keyValue ] ) ;
136
+
137
+ // Setting a placeholder display name for not found metadata
138
+ if ( ! this . connectorMetadata . get ( keyValue ) . found ) {
139
+ let fakeDisplayName = keyValue . substring ( keyValue . lastIndexOf ( "." ) + 1 ) ;
140
+ fakeDisplayName . replace ( "Connector" , "" ) ;
141
+ this . connectorMetadata . get ( keyValue ) . displayName = fakeDisplayName ;
142
+ }
136
143
}
137
144
}
138
145
} , error => this . logGenericError ( "getConnectorsMetadata" ) ) ;
Original file line number Diff line number Diff line change 26
26
27
27
.typeList {
28
28
margin-left : -20px ;
29
- font-size : 8pt ;
29
+ font-size : 8pt !important ;
30
+ }
31
+
32
+ .typeList a {
33
+ font-size : 8pt !important ;
34
+ }
35
+
36
+ .type {
37
+ font-size : 6pt !important ;
38
+ }
39
+
40
+ .connector-image {
41
+ height : 16px ;
42
+ width : 16px ;
43
+ background-size : contain;
44
+ display : inline-block;
45
+ margin-right : 3px ;
30
46
}
31
47
32
48
# requestTypes > div > div {
You can’t perform that action at this time.
0 commit comments