Commit 2309193d83956ce170e00775a0841855c8ae6075
1 parent
8f93cc75
added buttons Copy Edge Key and Secret instead of old icon buttons
Showing
3 changed files
with
24 additions
and
23 deletions
... | ... | @@ -14,11 +14,11 @@ |
14 | 14 | /// limitations under the License. |
15 | 15 | /// |
16 | 16 | |
17 | -import {Component} from '@angular/core'; | |
18 | -import {Store} from "@ngrx/store"; | |
19 | -import {AppState} from "@core/core.state"; | |
20 | -import {EdgeInfo} from "@shared/models/edge.models"; | |
21 | -import {EntityTabsComponent} from "@home/components/entity/entity-tabs.component"; | |
17 | +import { Component } from '@angular/core'; | |
18 | +import { Store } from "@ngrx/store"; | |
19 | +import { AppState } from "@core/core.state"; | |
20 | +import { EdgeInfo } from "@shared/models/edge.models"; | |
21 | +import { EntityTabsComponent } from "@home/components/entity/entity-tabs.component"; | |
22 | 22 | |
23 | 23 | @Component({ |
24 | 24 | selector: 'tb-edge-tabs', | ... | ... |
... | ... | @@ -79,6 +79,23 @@ |
79 | 79 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
80 | 80 | <span translate>edge.copy-id</span> |
81 | 81 | </button> |
82 | + <button mat-raised-button | |
83 | + ngxClipboard | |
84 | + (cbOnSuccess)="onEdgeSecretCopied($event)" | |
85 | + [cbContent]="entity?.id?.id" | |
86 | + [fxShow]="!isEdit"> | |
87 | + <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | |
88 | + <span translate>edge.copy-edge-secret</span> | |
89 | + </button> | |
90 | + <button mat-raised-button | |
91 | + ngxClipboard | |
92 | + (cbOnSuccess)="onEdgeKeyCopied($event)" | |
93 | + [cbContent]="entity?.id?.id" | |
94 | + [fxShow]="!isEdit"> | |
95 | + <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | |
96 | + <span translate>edge.copy-edge-key</span> | |
97 | + </button> | |
98 | + | |
82 | 99 | </div> |
83 | 100 | </div> |
84 | 101 | <div class="mat-padding" fxLayout="column"> |
... | ... | @@ -147,14 +164,6 @@ |
147 | 164 | <input matInput formControlName="routingKey"> |
148 | 165 | </mat-form-field> |
149 | 166 | </fieldset> |
150 | - <button mat-button mat-icon-button | |
151 | - style="margin-top: 14px" | |
152 | - ngxClipboard | |
153 | - (cbOnSuccess)="onEdgeKeyCopied($event)" | |
154 | - [cbContent]="entity?.routingKey" | |
155 | - [fxShow]="!isEdit"> | |
156 | - <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | |
157 | - </button> | |
158 | 167 | </div> |
159 | 168 | <div fxLayout="row"> |
160 | 169 | <fieldset fxFlex disabled> |
... | ... | @@ -163,14 +172,6 @@ |
163 | 172 | <input matInput formControlName="secret"> |
164 | 173 | </mat-form-field> |
165 | 174 | </fieldset> |
166 | - <button mat-button mat-icon-button | |
167 | - style="margin-top: 14px" | |
168 | - ngxClipboard | |
169 | - (cbOnSuccess)="onEdgeSecretCopied($event)" | |
170 | - [cbContent]="entity?.secret" | |
171 | - [fxShow]="!isEdit"> | |
172 | - <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | |
173 | - </button> | |
174 | 175 | </div> |
175 | 176 | </form> |
176 | 177 | </div> | ... | ... |
... | ... | @@ -983,10 +983,10 @@ |
983 | 983 | "rulechains": "Edge Rule Chains", |
984 | 984 | "rulechain": "Edge Rule Chain", |
985 | 985 | "edge-key": "Edge key", |
986 | - "copy-edge-key": "Copy edge key", | |
986 | + "copy-edge-key": "Copy Edge key", | |
987 | 987 | "edge-key-copied-message": "Edge key has been copied to clipboard", |
988 | 988 | "edge-secret": "Edge secret", |
989 | - "copy-edge-secret": "Copy edge secret", | |
989 | + "copy-edge-secret": "Copy Edge secret", | |
990 | 990 | "edge-secret-copied-message": "Edge secret has been copied to clipboard", |
991 | 991 | "manage-edge-assets": "Manage edge assets", |
992 | 992 | "manage-edge-devices": "Manage edge devices", | ... | ... |