Skip to content

Commit

Permalink
Noissue. Update Donation sections
Browse files Browse the repository at this point in the history
  • Loading branch information
const8ine committed Feb 5, 2025
1 parent 330fb63 commit 3c94cb8
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 51 deletions.
23 changes: 11 additions & 12 deletions src/app/components/footer/footer.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -80,20 +80,19 @@ <h4>{{ "footer_title_data" | translate }}</h4>
<h4>{{ "footer_title_community" | translate }}</h4>
<ul class="footer__links">
<li>
<h6>{{ 'footer_donation_text' | translate }}</h6>
<div class="footer__donation-field">
<input type="text" readonly [value]="donationWallet">
<button
(click)="copyLink()">
<span class="fa far fa-copy"></span>
</button>
</div>
</li>
<li *ngIf="translate.currentLang === 'ru'">
<a [routerLink]="'/news'"
<a href="https://github.com/open-genes/.github/wiki/Contributing-guide"
routerLinkActive="current"
target="_blank"
>
{{ 'header_menu_news' | translate }}</a>
{{ 'about_page_contribute_title' | translate }}&nbsp;<span class="fa far fa-external-link"></span></a>
</li>
<li>
<a
[routerLink]="'about/articles/donate-us'"
class="btn btn--fill btn--purple"
target="_blank"
>{{ 'about_page_donation_button' | translate }}
</a>
</li>
</ul>
</div>
Expand Down
12 changes: 1 addition & 11 deletions src/app/components/footer/footer.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ footer.wrapper {
margin-top: 1em;
}

a {
a:not(.btn) {
transition: color .15s linear;

&:link,
Expand All @@ -100,14 +100,4 @@ footer.wrapper {
color: $color-gray-halfing;
}
}

&__donation-field {
margin-top: 10px;
@include copy-field(30px, $color-gray, $color-white, $color-gray-very-light);
}

&__language {
margin: -10px;
color: $color-black;
}
}
16 changes: 1 addition & 15 deletions src/app/components/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Component, ElementRef, Input, ViewChild } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { Component, Input } from '@angular/core';
import { TranslateService } from '@ngx-translate/core';

@Component({
Expand All @@ -9,21 +8,8 @@ import { TranslateService } from '@ngx-translate/core';
})
export class FooterComponent {
@Input() appData: { build: string; version: string };
@ViewChild('walletAddressCopied') walletAddressCopied: ElementRef;
public donationWallet = '0x863E5Cd3F747bB3e0DB223E50184965355A10682';

constructor(
public translate: TranslateService,
protected _snackBar: MatSnackBar
) {}
// TODO: DRY
public copyLink(): void {
void navigator.clipboard.writeText(this.donationWallet).then(() => {
this._snackBar.open(this.walletAddressCopied.nativeElement.textContent, '', {
horizontalPosition: 'center',
verticalPosition: 'top',
duration: 600,
});
});
}
}
6 changes: 0 additions & 6 deletions src/app/components/header/header.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,6 @@
</nav>

<nav class="header__right">
<a
href="https://donate.stripe.com/00geYbeig6Hn53y6oC"
class="btn btn--fill btn--purple header__donation-button"
target="_blank"
><span class="fa far fa-heart"></span>&nbsp;{{ 'about_page_donation_button' | translate }}
</a>
<app-burger-menu></app-burger-menu>
</nav>
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/app/components/header/styles/_general.scss
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,5 @@
position: relative;
width: 55px;
}

.header__donation-button {
border-radius: 5px;
}
}
}
2 changes: 1 addition & 1 deletion src/app/pages/help/wp-articles/wp-articles.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export class WpArticlesComponent implements OnInit, OnDestroy {
public showMoreButtonVisible = false;
private unsubscribe$ = new Subject();
// Slugs of articles which are required on a website but should be hidden in a main list
private hiddenArticles = ['cookies-policy'];
private hiddenArticles = ['cookies-policy', 'donate-us'];

constructor(private wpApiService: WordpressApiService, private cdRef: ChangeDetectorRef) {}

Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@
"filters_modal_title_group3": "Evolution",
"filters_modal_show": "Show field in list",
"filters_reset": "Reset",
"footer_donation_text": "Back our non-commercial projects (ETH)",
"footer_donation_copied": "Copied! Thank you \uD83D\uDC9C",
"footer_title_about": "About Open Genes",
"footer_title_data": "Data",
Expand Down
1 change: 0 additions & 1 deletion src/assets/i18n/ru.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@
"filters_modal_title_group3": "Эволюция",
"filters_modal_show": "Показать поле в списке",
"filters_reset": "Сбросить",
"footer_donation_text": "Поддержите наши некоммерческие проекты (ETH)",
"footer_donation_copied": "Скопировано! Спасибо \uD83D\uDC9C",
"footer_title_about": "Об Open Genes",
"footer_title_data": "Данные",
Expand Down

0 comments on commit 3c94cb8

Please sign in to comment.