1
0
Fork 0
forked from lthn/blockchain

contracts buttons

This commit is contained in:
wildkif 2019-05-02 14:00:35 +03:00
parent 8855ba5c55
commit c69d3ab468
16 changed files with 69 additions and 91 deletions

View file

@ -420,11 +420,11 @@
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"PROPOSAL_CANCEL_BUYER": "The buyer is offering to cancel the contract and return the pledge",
"BUTTON_MAKE_PLEDGE": "Accept (Make pledge)",
"BUTTON_IGNORE": "Ignore",
"BUTTON_NULLIFY": "Item not received (Nullify pledges)",
"BUTTON_RECEIVED": "Item received (Transfer payment and return pledge to seller)",
"BUTTON_CANCEL_BUYER": "Cancel contract (Return pledge)",
"BUTTON_MAKE_PLEDGE": "Accept and make deposit",
"BUTTON_IGNORE": "Ignore and hide offer",
"BUTTON_NULLIFY": "Terminate and burn deposits",
"BUTTON_RECEIVED": "Complete and release deposits",
"BUTTON_CANCEL_BUYER": "Cancel and return deposits",
"BUTTON_NOT_CANCEL": "Do not cancel (Item shipped)",
"BUTTON_CANCEL_SELLER": "Cancel contract (Return pledge)",
"HOUR": "hour",

View file

@ -44,12 +44,6 @@ button {
&.blue-button:not(:disabled) {
&.error-text {
@include themify($themes) {
color: themed(redTextColor);
}
}
@include themify($themes) {
background-color: themed(blueButtonBackgroundColor);
color: themed(alternativeTextColor);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -35,8 +35,7 @@ export class LoginComponent implements OnInit, OnDestroy {
public variablesService: VariablesService,
private modalService: ModalService,
private ngZone: NgZone
) {
}
) {}
ngOnInit() {
this.queryRouting = this.route.queryParams.subscribe(params => {

View file

@ -213,44 +213,42 @@
<div class="purchase-buttons" *ngIf="!newPurchase">
<ng-container *ngIf="!currentContract.is_a && currentContract.state == 1">
<button type="button" class="blue-button" (click)="acceptState();" [disabled]="currentContract.private_detailes.b_pledge.plus(variablesService.default_fee_big).plus(variablesService.default_fee_big).isGreaterThan(variablesService.currentWallet.unlocked_balance)">
<button type="button" class="green-button" (click)="acceptState();" [disabled]="currentContract.private_detailes.b_pledge.plus(variablesService.default_fee_big).plus(variablesService.default_fee_big).isGreaterThan(variablesService.currentWallet.unlocked_balance)">
{{'PURCHASE.BUTTON_MAKE_PLEDGE' | translate}}
</button>
<button type="button" class="turquoise-button" (click)="ignoredContract();">{{'PURCHASE.BUTTON_IGNORE' | translate}}</button>
<button type="button" class="blue-button" (click)="ignoredContract();">{{'PURCHASE.BUTTON_IGNORE' | translate}}</button>
</ng-container>
<ng-container *ngIf="!showNullify && !showTimeSelect && currentContract.is_a && (currentContract.state == 201 || currentContract.state == 2 || currentContract.state == 120 || currentContract.state == 130)">
<button type="button" class="blue-button error-text" (click)="showNullify = true;" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
{{'PURCHASE.BUTTON_NULLIFY' | translate}}
</button>
<button type="button" class="turquoise-button" (click)="dealsDetailsFinish();" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
<button type="button" class="green-button" (click)="dealsDetailsFinish();" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
{{'PURCHASE.BUTTON_RECEIVED' | translate}}
</button>
<button type="button" class="green-button" (click)="showTimeSelect = true;" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
<button type="button" class="turquoise-button" (click)="showNullify = true;" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
{{'PURCHASE.BUTTON_NULLIFY' | translate}}
</button>
<button type="button" class="blue-button" (click)="showTimeSelect = true;" [disabled]="currentContract.cancel_expiration_time == 0 && (currentContract.height == 0 || (variablesService.height_app - currentContract.height) < 10)">
{{'PURCHASE.BUTTON_CANCEL_BUYER' | translate}}
</button>
</ng-container>
<ng-container *ngIf="!currentContract.is_a && currentContract.state == 5">
<button type="button" class="blue-button" (click)="dealsDetailsDontCanceling();">{{'PURCHASE.BUTTON_NOT_CANCEL' | translate}}</button>
<button type="button" class="turquoise-button" (click)="dealsDetailsSellerCancel();">{{'PURCHASE.BUTTON_CANCEL_SELLER' | translate}}</button>
<button type="button" class="turquoise-button" (click)="dealsDetailsDontCanceling();">{{'PURCHASE.BUTTON_NOT_CANCEL' | translate}}</button>
<button type="button" class="blue-button" (click)="dealsDetailsSellerCancel();">{{'PURCHASE.BUTTON_CANCEL_SELLER' | translate}}</button>
</ng-container>
</div>
<div class="nullify-block-row" *ngIf="showNullify">
<div class="input-block">
<div>{{'PURCHASE.NULLIFY_QUESTION' | translate}}</div>
<div class="nullify-block">
<button type="button" class="blue-button" (click)="showNullify = false;">{{ 'PURCHASE.CANCEL' | translate }}</button>
<button type="button" class="blue-button" (click)="productNotGot();">{{ 'PURCHASE.BUTTON_NULLIFY_SHORT' | translate }}</button>
</div>
<div>{{'PURCHASE.NULLIFY_QUESTION' | translate}}</div>
<div class="nullify-block-buttons">
<button type="button" class="blue-button" (click)="showNullify = false;">{{ 'PURCHASE.CANCEL' | translate }}</button>
<button type="button" class="blue-button" (click)="productNotGot();">{{ 'PURCHASE.BUTTON_NULLIFY_SHORT' | translate }}</button>
</div>
</div>
<div class="time-cancel-block-row" *ngIf="showTimeSelect && !newPurchase && currentContract.is_a && (currentContract.state == 201 || currentContract.state == 2 || currentContract.state == 120 || currentContract.state == 130)">
<div>{{ 'PURCHASE.WAITING_TIME_QUESTION' | translate }}</div>
<div class="input-block">
<div>{{ 'PURCHASE.WAITING_TIME_QUESTION' | translate }}</div>
<label for="purchase-timeCancel">{{ 'PURCHASE.WAITING_TIME' | translate }}</label>
<ng-select id="purchase-timeCancel" class="lock-selection-select"
[clearable]="false"
@ -261,10 +259,10 @@
{{title}} {{ 'PURCHASE.HOURS' | translate }}
</ng-option>
</ng-select>
<div class="time-cancel-block">
<button type="button" class="blue-button" (click)="showTimeSelect = false;">{{ 'PURCHASE.CANCEL' | translate }}</button>
<button type="button" class="blue-button" (click)="dealsDetailsCancel();">{{ 'PURCHASE.BUTTON_CANCEL_BUYER' | translate }}</button>
</div>
</div>
<div class="time-cancel-block-buttons">
<button type="button" class="blue-button" (click)="showTimeSelect = false;">{{ 'PURCHASE.CANCEL' | translate }}</button>
<button type="button" class="blue-button" (click)="dealsDetailsCancel();">{{ 'PURCHASE.BUTTON_CANCEL_BUYER' | translate }}</button>
</div>
</div>

View file

@ -101,9 +101,8 @@
.purchase-buttons {
display: flex;
justify-content: space-between;
justify-content: flex-start;
margin: 2.4rem -0.5rem;
width: calc(100% + 1rem);
button {
flex: 0 1 33%;
@ -113,42 +112,44 @@
.nullify-block-row {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.input-block {
.nullify-block-buttons {
display: flex;
align-items: center;
justify-content: center;
margin: 1rem 0;
width: 100%;
.nullify-block {
margin: 1rem 0;
.blue-button {
margin: 0 0.5rem;
}
button {
flex: 0 1 25%;
margin: 0 0.5rem;
}
}
}
.time-cancel-block-row {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
.input-block {
width: 25%;
}
.time-cancel-block-buttons {
display: flex;
align-items: center;
margin-bottom: 0;
justify-content: center;
margin: 1rem 0;
width: 100%;
select {
width: auto;
}
.time-cancel-block {
display: flex;
flex-direction: row;
align-items: flex-start;
margin: 1rem 0;
.blue-button {
margin: 0 0.5rem;
}
button {
flex: 0 1 25%;
margin: 0 0.5rem;
}
}
}

View file

@ -102,13 +102,12 @@ export class PurchaseComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private backend: BackendService,
private variablesService: VariablesService,
public variablesService: VariablesService,
private modalService: ModalService,
private ngZone: NgZone,
private location: Location,
private intToMoneyPipe: IntToMoneyPipe
) {
}
) {}
checkAndChangeHistory() {
if (this.currentContract.state === 201) {

View file

@ -18,9 +18,8 @@ export class ReceiveComponent implements OnInit, OnDestroy {
constructor(
private route: ActivatedRoute,
private backend: BackendService,
private variablesService: VariablesService
) {
}
public variablesService: VariablesService
) {}
ngOnInit() {
this.parentRouting = this.route.parent.params.subscribe(() => {

View file

@ -41,16 +41,13 @@ export class RestoreWalletComponent implements OnInit {
constructor(
private router: Router,
private backend: BackendService,
private variablesService: VariablesService,
public variablesService: VariablesService,
private modalService: ModalService,
private ngZone: NgZone,
private translate: TranslateService
) {
}
ngOnInit() {
}
) {}
ngOnInit() {}
createWallet() {
this.ngZone.run(() => {

View file

@ -25,8 +25,7 @@ export class SeedPhraseComponent implements OnInit, OnDestroy {
public variablesService: VariablesService,
private modalService: ModalService,
private ngZone: NgZone
) {
}
) {}
ngOnInit() {
this.queryRouting = this.route.queryParams.subscribe(params => {

View file

@ -33,11 +33,10 @@ export class WalletDetailsComponent implements OnInit, OnDestroy {
constructor(
private router: Router,
private backend: BackendService,
private variablesService: VariablesService,
public variablesService: VariablesService,
private ngZone: NgZone,
private location: Location
) {
}
) {}
ngOnInit() {
this.showSeed = false;

View file

@ -420,11 +420,11 @@
"BUYER_WAIT": "The buyer is waiting for the item to be delivered",
"PLEDGES_MADE": "Pledges made",
"PROPOSAL_CANCEL_BUYER": "The buyer is offering to cancel the contract and return the pledge",
"BUTTON_MAKE_PLEDGE": "Accept (Make pledge)",
"BUTTON_IGNORE": "Ignore",
"BUTTON_NULLIFY": "Item not received (Nullify pledges)",
"BUTTON_RECEIVED": "Item received (Transfer payment and return pledge to seller)",
"BUTTON_CANCEL_BUYER": "Cancel contract (Return pledge)",
"BUTTON_MAKE_PLEDGE": "Accept and make deposit",
"BUTTON_IGNORE": "Ignore and hide offer",
"BUTTON_NULLIFY": "Terminate and burn deposits",
"BUTTON_RECEIVED": "Complete and release deposits",
"BUTTON_CANCEL_BUYER": "Cancel and return deposits",
"BUTTON_NOT_CANCEL": "Do not cancel (Item shipped)",
"BUTTON_CANCEL_SELLER": "Cancel contract (Return pledge)",
"HOUR": "hour",

View file

@ -44,12 +44,6 @@ button {
&.blue-button:not(:disabled) {
&.error-text {
@include themify($themes) {
color: themed(redTextColor);
}
}
@include themify($themes) {
background-color: themed(blueButtonBackgroundColor);
color: themed(alternativeTextColor);