Address page bigger QR button on mobile
This commit is contained in:
		
							parent
							
								
									fb621f9812
								
							
						
					
					
						commit
						5cecd9f8a7
					
				@ -3,9 +3,9 @@
 | 
				
			|||||||
    <h1 i18n="shared.address">Address</h1>
 | 
					    <h1 i18n="shared.address">Address</h1>
 | 
				
			||||||
    <div class="tx-link">
 | 
					    <div class="tx-link">
 | 
				
			||||||
      <app-truncate [text]="addressString" [lastChars]="8" [link]="['/address/' | relativeUrl, addressString]">
 | 
					      <app-truncate [text]="addressString" [lastChars]="8" [link]="['/address/' | relativeUrl, addressString]">
 | 
				
			||||||
        <app-clipboard [text]="addressString"></app-clipboard>
 | 
					        <app-clipboard [text]="addressString" [size]="isMobile ? 'large' : 'normal'"></app-clipboard>
 | 
				
			||||||
        <span style="position: relative; cursor: pointer" (mouseover)="showQR = true" (mouseout)="showQR = false" (click)="showQR = !showQR">
 | 
					        <span style="position: relative; cursor: pointer" (mouseover)="showQR = true" (mouseout)="showQR = false" (pointerdown)="showQR = true">
 | 
				
			||||||
          <fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true"></fa-icon>
 | 
					          <fa-icon [icon]="['fas', 'qrcode']" [fixedWidth]="true" [style.font-size]="isMobile ? '18px' : '12px'"></fa-icon>
 | 
				
			||||||
          <div class="qr-wrapper" [hidden]="!showQR">
 | 
					          <div class="qr-wrapper" [hidden]="!showQR">
 | 
				
			||||||
            <app-qrcode [size]="200" [data]="addressString"></app-qrcode>
 | 
					            <app-qrcode [size]="200" [data]="addressString"></app-qrcode>
 | 
				
			||||||
          </div>
 | 
					          </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,7 +1,7 @@
 | 
				
			|||||||
<ng-template [ngIf]="button" [ngIfElse]="btnLink">
 | 
					<ng-template [ngIf]="button" [ngIfElse]="btnLink">
 | 
				
			||||||
  <button #btn [attr.data-clipboard-text]="text" [class]="class" type="button" [disabled]="text === ''">
 | 
					  <button #btn [attr.data-clipboard-text]="text" [class]="class" type="button" [disabled]="text === ''">
 | 
				
			||||||
    <span #buttonWrapper [attr.data-tlite]="copiedMessage" style="position: relative;top: -2px;left: 1px;">
 | 
					    <span #buttonWrapper [attr.data-tlite]="copiedMessage" style="position: relative;top: -2px;left: 1px;">
 | 
				
			||||||
      <app-svg-images name="clippy" [width]="size === 'small' ? '10' : '13'" viewBox="0 0 1000 1000"></app-svg-images>
 | 
					      <app-svg-images name="clippy" [width]="widths[size]" viewBox="0 0 1000 1000"></app-svg-images>
 | 
				
			||||||
    </span>
 | 
					    </span>
 | 
				
			||||||
  </button>
 | 
					  </button>
 | 
				
			||||||
</ng-template>
 | 
					</ng-template>
 | 
				
			||||||
@ -9,7 +9,7 @@
 | 
				
			|||||||
<ng-template #btnLink>
 | 
					<ng-template #btnLink>
 | 
				
			||||||
  <span #buttonWrapper [attr.data-tlite]="copiedMessage" style="position: relative;">
 | 
					  <span #buttonWrapper [attr.data-tlite]="copiedMessage" style="position: relative;">
 | 
				
			||||||
    <button #btn class="btn btn-sm btn-link pt-0 {{ leftPadding ? 'padding' : '' }}" [attr.data-clipboard-text]="text"> 
 | 
					    <button #btn class="btn btn-sm btn-link pt-0 {{ leftPadding ? 'padding' : '' }}" [attr.data-clipboard-text]="text"> 
 | 
				
			||||||
      <app-svg-images name="clippy" [width]="size === 'small' ? '10' : '13'" viewBox="0 0 1000 1000"></app-svg-images>
 | 
					      <app-svg-images name="clippy" [width]="widths[size]" viewBox="0 0 1000 1000"></app-svg-images>
 | 
				
			||||||
    </button>
 | 
					    </button>
 | 
				
			||||||
  </span>
 | 
					  </span>
 | 
				
			||||||
</ng-template>
 | 
					</ng-template>
 | 
				
			||||||
 | 
				
			|||||||
@ -13,11 +13,17 @@ export class ClipboardComponent implements AfterViewInit {
 | 
				
			|||||||
  @ViewChild('buttonWrapper') buttonWrapper: ElementRef;
 | 
					  @ViewChild('buttonWrapper') buttonWrapper: ElementRef;
 | 
				
			||||||
  @Input() button = false;
 | 
					  @Input() button = false;
 | 
				
			||||||
  @Input() class = 'btn btn-secondary ml-1';
 | 
					  @Input() class = 'btn btn-secondary ml-1';
 | 
				
			||||||
  @Input() size: 'small' | 'normal' = 'normal';
 | 
					  @Input() size: 'small' | 'normal' | 'large' = 'normal';
 | 
				
			||||||
  @Input() text: string;
 | 
					  @Input() text: string;
 | 
				
			||||||
  @Input() leftPadding = true;
 | 
					  @Input() leftPadding = true;
 | 
				
			||||||
  copiedMessage: string = $localize`:@@clipboard.copied-message:Copied!`;
 | 
					  copiedMessage: string = $localize`:@@clipboard.copied-message:Copied!`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  widths = {
 | 
				
			||||||
 | 
					    small: '10',
 | 
				
			||||||
 | 
					    normal: '13',
 | 
				
			||||||
 | 
					    large: '18',
 | 
				
			||||||
 | 
					  };
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  clipboard: any;
 | 
					  clipboard: any;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  constructor() { }
 | 
					  constructor() { }
 | 
				
			||||||
 | 
				
			|||||||
@ -2,7 +2,7 @@
 | 
				
			|||||||
  text-overflow: unset;
 | 
					  text-overflow: unset;
 | 
				
			||||||
  display: flex;
 | 
					  display: flex;
 | 
				
			||||||
  flex-direction: row;
 | 
					  flex-direction: row;
 | 
				
			||||||
  align-items: baseline;
 | 
					  align-items: start;
 | 
				
			||||||
  position: relative;
 | 
					  position: relative;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  .truncate-link {
 | 
					  .truncate-link {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user