ellipsis for long op_return messages in tx preview
This commit is contained in:
		
							parent
							
								
									56e00d7ea9
								
							
						
					
					
						commit
						5198cc51dc
					
				@ -41,24 +41,20 @@
 | 
				
			|||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
    <div class="overlaid">
 | 
					    <div class="overlaid">
 | 
				
			||||||
      <ng-container [ngSwitch]="extraData">
 | 
					      <ng-container [ngSwitch]="extraData">
 | 
				
			||||||
        <table class="opreturns" *ngSwitchCase="'coinbase'">
 | 
					        <div class="opreturns" *ngSwitchCase="'coinbase'">
 | 
				
			||||||
          <tbody>
 | 
					            <div class="opreturn-row">
 | 
				
			||||||
            <tr>
 | 
					              <span class="label">Coinbase</span>
 | 
				
			||||||
              <td class="label">Coinbase</td>
 | 
					              <span class="message">{{ tx.vin[0].scriptsig | hex2ascii }}</span>
 | 
				
			||||||
              <td class="message">{{ tx.vin[0].scriptsig | hex2ascii }}</td>
 | 
					            </div>
 | 
				
			||||||
            </tr>
 | 
					        </div>
 | 
				
			||||||
          </tbody>
 | 
					        <div class="opreturns" *ngSwitchCase="'opreturn'">
 | 
				
			||||||
        </table>
 | 
					 | 
				
			||||||
        <table class="opreturns" *ngSwitchCase="'opreturn'">
 | 
					 | 
				
			||||||
          <tbody>
 | 
					 | 
				
			||||||
            <ng-container *ngFor="let vout of opReturns.slice(0,3)">
 | 
					            <ng-container *ngFor="let vout of opReturns.slice(0,3)">
 | 
				
			||||||
              <tr>
 | 
					              <div class="opreturn-row">
 | 
				
			||||||
                <td class="label">OP_RETURN</td>
 | 
					                <span class="label">OP_RETURN</span>
 | 
				
			||||||
                <td *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="message">{{ vout.scriptpubkey_asm | hex2ascii }}</td>
 | 
					                <span *ngIf="vout.scriptpubkey_asm !== 'OP_RETURN'" class="message">{{ vout.scriptpubkey_asm | hex2ascii }}</span>
 | 
				
			||||||
              </tr>
 | 
					              </div>
 | 
				
			||||||
            </ng-container>
 | 
					            </ng-container>
 | 
				
			||||||
          </tbody>
 | 
					        </div>
 | 
				
			||||||
        </table>
 | 
					 | 
				
			||||||
      </ng-container>
 | 
					      </ng-container>
 | 
				
			||||||
    </div>
 | 
					    </div>
 | 
				
			||||||
  </div>
 | 
					  </div>
 | 
				
			||||||
 | 
				
			|||||||
@ -92,26 +92,37 @@
 | 
				
			|||||||
    max-width: 90%;
 | 
					    max-width: 90%;
 | 
				
			||||||
    margin: auto;
 | 
					    margin: auto;
 | 
				
			||||||
    overflow: hidden;
 | 
					    overflow: hidden;
 | 
				
			||||||
 | 
					    display: flex;
 | 
				
			||||||
 | 
					    flex-direction: row;
 | 
				
			||||||
 | 
					    justify-content: center;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    .opreturns {
 | 
					    .opreturns {
 | 
				
			||||||
 | 
					      display: inline-block;
 | 
				
			||||||
      width: auto;
 | 
					      width: auto;
 | 
				
			||||||
 | 
					      max-width: 100%;
 | 
				
			||||||
      margin: auto;
 | 
					      margin: auto;
 | 
				
			||||||
      table-layout: auto;
 | 
					      table-layout: auto;
 | 
				
			||||||
      background: #2d3348af;
 | 
					      background: #2d3348af;
 | 
				
			||||||
      border-top-left-radius: 5px;
 | 
					      border-top-left-radius: 5px;
 | 
				
			||||||
      border-top-right-radius: 5px;
 | 
					      border-top-right-radius: 5px;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      td {
 | 
					      .opreturn-row {
 | 
				
			||||||
        padding: 10px 10px;
 | 
					        width: 100%;
 | 
				
			||||||
 | 
					        display: flex;
 | 
				
			||||||
 | 
					        flex-direction: row;
 | 
				
			||||||
 | 
					        justify-content: flex-start;
 | 
				
			||||||
 | 
					        padding: 0 10px;
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        &.message {
 | 
					      .label {
 | 
				
			||||||
          overflow: hidden;
 | 
					        margin-right: 1em;
 | 
				
			||||||
          display: inline-block;
 | 
					      }
 | 
				
			||||||
          vertical-align: bottom;
 | 
					
 | 
				
			||||||
          text-overflow: ellipsis;
 | 
					      .message {
 | 
				
			||||||
          white-space: nowrap;
 | 
					        flex-shrink: 1;
 | 
				
			||||||
          text-align: left;
 | 
					        white-space: nowrap;
 | 
				
			||||||
        }
 | 
					        overflow: hidden;
 | 
				
			||||||
 | 
					        text-overflow: ellipsis;
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user