Fix WooCommerce integration tab to show copy buttons in small displays

This commit is contained in:
Rene V. Vergara A. 2022-12-25 20:51:04 -05:00
parent 4780c64dcf
commit 8b7172f8ab
2 changed files with 86 additions and 46 deletions

View file

@ -16,7 +16,7 @@ var Buffer = require('buffer/').Buffer;
selector: 'app-invoice', selector: 'app-invoice',
templateUrl: './invoice.component.html', templateUrl: './invoice.component.html',
styleUrls: ['./invoice.component.css'] styleUrls: ['./invoice.component.css']
}); })
export class InvoiceComponent implements OnInit { export class InvoiceComponent implements OnInit {
faCheck = faCheck; faCheck = faCheck;

View file

@ -170,17 +170,31 @@
</div> </div>
</mat-tab> </mat-tab>
<mat-tab label="WooCommerce"> <mat-tab label="WooCommerce">
<div >
<div *ngIf="wooOwner == ''"> <div *ngIf="wooOwner == ''">
<button mat-raised-button color="primary" (click)="generateWooToken()"> <button mat-raised-button color="primary" (click)="generateWooToken()">
Generate Token Generate Token
</button> </button>
</div> </div>
<table *ngIf="wooOwner != ''"> <table *ngIf="wooOwner != ''">
<tbody>
<tr> <tr>
<td class="heading">Owner:</td> <td class="heading" style="width: 100%;">Owner:</td>
</tr> </tr>
<tr> <tr>
<td class="small">{{wooOwner}}</td> <td>
<div>
<textarea disabled
style="border: none;
outline: none;
min-height: 150px;
width: 94%;"
cdkTextareaAutosize
cdkAutosizeMinRows="1"
cdkAutosizeMaxRows="3">{{wooOwner}}
</textarea>
</div>
</td>
<td class="urlCopyBtn"> <td class="urlCopyBtn">
<a (click)='copyWooOwner()' > <a (click)='copyWooOwner()' >
<fa-icon [icon]="faCopy" <fa-icon [icon]="faCopy"
@ -190,10 +204,22 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="heading">Token:</td> <td class="heading" style="width: 60%;">Token:</td>
</tr> </tr>
<tr> <tr>
<td class="small">{{wooToken}}</td> <td>
<div>
<textarea disabled
style="border: none;
outline: none;
min-height: 150px;
width: 94%;"
cdkTextareaAutosize
cdkAutosizeMinRows="1"
cdkAutosizeMaxRows="3">{{wooToken}}
</textarea>
</div>
</td>
<td class="urlCopyBtn"> <td class="urlCopyBtn">
<a (click)='copyWooToken()' > <a (click)='copyWooToken()' >
<fa-icon [icon]="faCopy" <fa-icon [icon]="faCopy"
@ -203,11 +229,24 @@
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="heading">URL:</td> <td class="heading" style="width: 60%;">URL:</td>
</tr> </tr>
<tr> <tr>
<td class="small">{{wooUrl}}</td> <td>
<div>
<textarea disabled
style="border: none;
outline: none;
min-height: 150px;
width: 94%;"
cdkTextareaAutosize
cdkAutosizeMinRows="1"
cdkAutosizeMaxRows="3">{{wooUrl}}
</textarea>
</div>
</td>
</tr> </tr>
</tbody>
</table> </table>
<div class="toolbar" align="center"> <div class="toolbar" align="center">
<button mat-raised-button <button mat-raised-button
@ -216,6 +255,7 @@
</button> </button>
</div> </div>
</div>
</mat-tab> </mat-tab>
</mat-tab-group> </mat-tab-group>
</mat-tab> </mat-tab>