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,11 +14,11 @@ | ||
14 | /// limitations under the License. | 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 | @Component({ | 23 | @Component({ |
24 | selector: 'tb-edge-tabs', | 24 | selector: 'tb-edge-tabs', |
@@ -79,6 +79,23 @@ | @@ -79,6 +79,23 @@ | ||
79 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> | 79 | <mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
80 | <span translate>edge.copy-id</span> | 80 | <span translate>edge.copy-id</span> |
81 | </button> | 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 | </div> | 99 | </div> |
83 | </div> | 100 | </div> |
84 | <div class="mat-padding" fxLayout="column"> | 101 | <div class="mat-padding" fxLayout="column"> |
@@ -147,14 +164,6 @@ | @@ -147,14 +164,6 @@ | ||
147 | <input matInput formControlName="routingKey"> | 164 | <input matInput formControlName="routingKey"> |
148 | </mat-form-field> | 165 | </mat-form-field> |
149 | </fieldset> | 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 | </div> | 167 | </div> |
159 | <div fxLayout="row"> | 168 | <div fxLayout="row"> |
160 | <fieldset fxFlex disabled> | 169 | <fieldset fxFlex disabled> |
@@ -163,14 +172,6 @@ | @@ -163,14 +172,6 @@ | ||
163 | <input matInput formControlName="secret"> | 172 | <input matInput formControlName="secret"> |
164 | </mat-form-field> | 173 | </mat-form-field> |
165 | </fieldset> | 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 | </div> | 175 | </div> |
175 | </form> | 176 | </form> |
176 | </div> | 177 | </div> |
@@ -983,10 +983,10 @@ | @@ -983,10 +983,10 @@ | ||
983 | "rulechains": "Edge Rule Chains", | 983 | "rulechains": "Edge Rule Chains", |
984 | "rulechain": "Edge Rule Chain", | 984 | "rulechain": "Edge Rule Chain", |
985 | "edge-key": "Edge key", | 985 | "edge-key": "Edge key", |
986 | - "copy-edge-key": "Copy edge key", | 986 | + "copy-edge-key": "Copy Edge key", |
987 | "edge-key-copied-message": "Edge key has been copied to clipboard", | 987 | "edge-key-copied-message": "Edge key has been copied to clipboard", |
988 | "edge-secret": "Edge secret", | 988 | "edge-secret": "Edge secret", |
989 | - "copy-edge-secret": "Copy edge secret", | 989 | + "copy-edge-secret": "Copy Edge secret", |
990 | "edge-secret-copied-message": "Edge secret has been copied to clipboard", | 990 | "edge-secret-copied-message": "Edge secret has been copied to clipboard", |
991 | "manage-edge-assets": "Manage edge assets", | 991 | "manage-edge-assets": "Manage edge assets", |
992 | "manage-edge-devices": "Manage edge devices", | 992 | "manage-edge-devices": "Manage edge devices", |