Skip to content

Commit

Permalink
Merge pull request #2503 from aura-nw/baseline/main_20231011
Browse files Browse the repository at this point in the history
Baseline/main 20231011
  • Loading branch information
nhphuc2411 authored Oct 11, 2023
2 parents 4b9dfc3 + 931b853 commit e05460b
Show file tree
Hide file tree
Showing 10 changed files with 71 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MatTableDataSource } from '@angular/material/table';
import { Subject } from 'rxjs';
import { debounceTime, takeUntil } from 'rxjs/operators';
import { PAGE_EVENT } from 'src/app/core/constants/common.constant';
import { MAX_LENGTH_SEARCH_TOKEN } from 'src/app/core/constants/token.constant';
import { TableTemplate } from 'src/app/core/models/common.model';
import { CommonService } from 'src/app/core/services/common.service';
import { NameTagService } from 'src/app/core/services/name-tag.service';
Expand All @@ -14,8 +15,6 @@ import { Globals } from 'src/app/global/global';
import { PaginatorComponent } from 'src/app/shared/components/paginator/paginator.component';
import { PopupCommonComponent } from 'src/app/shared/components/popup-common/popup-common.component';
import { PopupNameTagComponent } from '../popup-name-tag/popup-name-tag.component';
import { MAX_LENGTH_SEARCH_TOKEN } from 'src/app/core/constants/token.constant';
import { Router } from '@angular/router';

@Component({
selector: 'app-private-name-tag',
Expand All @@ -36,7 +35,6 @@ export class PrivateNameTagComponent implements OnInit, OnDestroy {
];
displayedColumns: string[] = this.templates.map((dta) => dta.matColumnDef);
countFav = 0;
modalReference: any;
pageData: PageEvent = {
length: PAGE_EVENT.LENGTH,
pageSize: 10,
Expand All @@ -47,7 +45,6 @@ export class PrivateNameTagComponent implements OnInit, OnDestroy {
destroy$ = new Subject();
dataSource: MatTableDataSource<any> = new MatTableDataSource<any>([]);
dataSourceMobile = [];
dataTable = [];
maxLengthSearch = MAX_LENGTH_SEARCH_TOKEN;

constructor(
Expand All @@ -56,7 +53,6 @@ export class PrivateNameTagComponent implements OnInit, OnDestroy {
private dialog: MatDialog,
private toastr: NgxToastrService,
private global: Globals,
private router: Router,
) {}

ngOnInit(): void {
Expand Down Expand Up @@ -98,7 +94,7 @@ export class PrivateNameTagComponent implements OnInit, OnDestroy {
getListPrivateName() {
this.textSearch = this.textSearch?.trim();
const payload = {
limit: 100,
limit: 10,
keyword: this.textSearch || '',
offset: this.pageData.pageIndex * this.pageData.pageSize,
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@
{
label: 'Voter',
class: !commonService.checkDisplayTooltip(data.voter)
? 'name-tag-label mb-0 text--primary'
: 'mb-0 text--primary',
? commonService.checkPrivate(data.voter)
? 'name-tag private-name-tag mb-0 text--primary'
: 'name-tag text--primary mb-0'
: 'text--primary',
info: !data?.voter
? '-'
: !commonService.checkDisplayTooltip(data.voter)
Expand Down Expand Up @@ -203,7 +205,11 @@
[content]="[
{
label: 'Depositor',
class: !commonService.checkDisplayTooltip(data.depositors) ? 'name-tag-label mb-0' : 'mb-0',
class: !commonService.checkDisplayTooltip(data.voter)
? commonService.checkPrivate(data.voter)
? 'name-tag private-name-tag mb-0 text--primary'
: 'name-tag text--primary mb-0'
: 'text--primary',
info: !data?.depositors
? '-'
: !commonService.checkDisplayTooltip(data.depositors)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
@media (min-width: 1199.98px) {
flex: 0 1 100%;
overflow-x: auto;
//display: flex;
//align-items: center;
justify-content: flex-end;
border-top: none;
border-left: 1px solid var(--aura-gray-9);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -433,15 +433,21 @@
<ng-container *ngFor="let item of transactionDetail?.messages[0]?.outputs; let i = index">
<div class="d-flex justify-content-between mx-4 my-5">
<div class="txt-label">From</div>
<a
class="text--primary txt-address"
[routerLink]="['/account', transactionDetail?.messages[0]?.inputs[0]?.address]">
{{ transactionDetail?.messages[0]?.inputs[0]?.address }}
</a>
<div class="txt-address">
<app-name-tag
[url]="isContractAddress(transactionDetail?.messages[0]?.inputs[0]?.address) ? 'contracts' : 'account'"
[value]="transactionDetail?.messages[0]?.inputs[0]?.address"
[fullText]="true"
[fullTextMob]="true"></app-name-tag>
</div>
<div class="txt-label">To</div>
<a class="text--primary txt-address" [routerLink]="['/account', item?.address]">
{{ item?.address }}
</a>
<div class="txt-address">
<app-name-tag
[url]="isContractAddress(item?.address) ? 'contracts' : 'account'"
[fullText]="true"
[fullTextMob]="true"
[value]="item?.address"></app-name-tag>
</div>
<div class="txt-amount">
<i class="ph-currency-circle-dollar mx-auto h3 mr-2 mb-0 text--white"></i>
<div class="ml-2">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}
.body-multisend {
max-height: 440px;
overflow-y: scroll;
overflow-y: auto;
.txt-label {
min-width: 75px;
}
Expand All @@ -99,7 +99,12 @@
}

@media (max-width: 1366px) {
overflow-y: scroll;
overflow-y: auto;
}
.box-name-tag {
&:after {
border-right: 15px solid var(--aura-gray-10) !important;
}
}
}

Expand Down Expand Up @@ -194,4 +199,4 @@ mat-expansion-panel:last-child .mat-expansion-panel-content .content-log {
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { CommonService } from 'src/app/core/services/common.service';
import { ProposalService } from 'src/app/core/services/proposal.service';
import { TransactionService } from 'src/app/core/services/transaction.service';
import { balanceOf } from 'src/app/core/utils/common/parsing';
import { isContract } from 'src/app/core/utils/common/validation';
import { DATEFORMAT } from '../../../../core/constants/common.constant';
import { PROPOSAL_VOTE } from '../../../../core/constants/proposal.constant';
import { TYPE_TRANSACTION } from '../../../../core/constants/transaction.constant';
Expand Down Expand Up @@ -991,4 +992,11 @@ export class TransactionMessagesComponent implements OnInit {
changeShowData(idx) {
this.isDisplay[idx] = !this.isDisplay[idx];
}

isContractAddress(address) {
if (isContract(address)) {
return true;
}
return false;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
border-radius: 8px;
padding: var(--spacer-2);
@media (min-width: 991.98px) {
padding: var(--spacer-6);
padding: var(--spacer-5);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,25 @@ <h3 class="mb-0 fw-700 text--gray-light-2">ABTs ({{ totalABT || 0 }})</h3>
</app-tooltip-customize>
</a>
</div>
<div class="soulbound-list mt-4 mt-lg-0 d-flex align-items-center">
<div class="soulbound-list mt-lg-0 d-flex align-items-center" [class.mt-0]="isSBTValidator" [class.mt-4]="!isSBTValidator">
<ng-container *ngIf="soulboundList && soulboundList?.length > 0; else noNFT">
<div
id="nft-cards"
class="row row-cols-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 g-2 g-md-3 g-lg-4 g-xl-5 w-100 flex-nowrap flex-grow-1 pb-2 {{
isAccountDetail ? 'AccountDetail' : null
class="{{
!isSBTValidator
? 'AccountDetail row row-cols-2 row-cols-md-3 row-cols-lg-4 row-cols-xl-5 g-2 g-md-3 g-lg-4 g-xl-5 w-100 flex-nowrap flex-grow-1 pb-2'
: 'sbt-validator'
}}">
<div *ngFor="let token of soulboundList; let last = last; let i = index" [class.sbt-card-contain]="sbtPage">
<div class="soulbound__item" *ngIf="token.picked">
<div class="nft-cards__item-border">
<div *ngFor="let token of soulboundList; let last = last; let i = index" [class.sbt-card-contain]="sbtPage" [class.mr-0]="last">
<div class="soulbound__item" [class.sbt-validator]="isSBTValidator" *ngIf="token.picked">
<div class="nft-cards__item-border" [class.mr-0]="last">
<div class="nft-cards__item">
<app-nft-card
nftId="{{ 'nft#' + i }}"
[nftLink]="'/tokens/token-abt/' + token.contract_address + '/' + encodeData(token.token_id)"
[nftItem]="token"
[nftType]="getTypeFile(token)"></app-nft-card>
<div class="nft-cards__label">
<div class="nft-cards__label" [class.sbt-validator]="isSBTValidator">
<span class="text-gradient">CW-4973</span>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,19 @@
width: 100%;
flex-grow: 1;
overflow-x: auto;
.sbt-validator {
display: flex;
>div {
min-width: 110px;
margin-right: 5px;
@media (min-width: 912px) {
margin-right: 30px;
}
}
&__label {
display: none;
}
}
&::-webkit-scrollbar {
height: 0;
}
Expand All @@ -29,6 +42,10 @@
flex-wrap: wrap;
flex-basis: 20%;
min-width: 180px;
&.sbt-validator {
min-width: auto;
max-width: 110px;
}
}
&:not(:last-child) {
margin-right: var(--spacer-2);
Expand All @@ -37,7 +54,6 @@
}
}
&:hover {
background: rgba(54, 56, 67, 0.5);
border-radius: 8px;
.btn-preview {
opacity: 1;
Expand Down
3 changes: 3 additions & 0 deletions src/assets/scss/aura-theme/cards.scss
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,9 @@
font-size: 1.4rem;
}
}
&.sbt-validator {
display: none !important;
}
}
.token-id {
overflow: hidden;
Expand Down

0 comments on commit e05460b

Please sign in to comment.