Skip to content

Commit

Permalink
Merge pull request #1 from zurnov/Feature-Change-Donate-page
Browse files Browse the repository at this point in the history
Change the ETH wallet with btc lighthing
  • Loading branch information
danielzlatanov authored Nov 11, 2024
2 parents dc519f9 + ed7cafc commit 527cbdc
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 38 deletions.
68 changes: 33 additions & 35 deletions src/app/core/donate/donate.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ <h3 class="font-bold text-2xl mb-4 ml-0 text-center md:text-start md:ml-2">
>
<div class="flex-1 md:mr-6 flex flex-col">
<div class="flex-1">
<h4 class="text-gray-300 uppercase text-sm mb-4">Bitcoin (BTC)</h4>
<h4 class="text-gray-300 uppercase text-sm mb-4">Bitcoin</h4>
<div class="border border-gray-700 rounded-lg p-4 mb-4 bg-gray-800">
<p class="text-white mb-2">Address</p>
<p class="text-gray-400 mb-2 break-all">{{ btcAddress }}</p>
Expand All @@ -49,7 +49,7 @@ <h4 class="text-gray-300 uppercase text-sm mb-4">Bitcoin (BTC)</h4>
</button>
</div>
</div>
<p class="text-gray-400 mt-6 md:mt-10">
<p class="text-gray-400 mt-6 md:mt-10 hidden md:block">
Scan the QR code to donate directly.
</p>
</div>
Expand All @@ -63,43 +63,41 @@ <h4 class="text-gray-300 uppercase text-sm mb-4">Bitcoin (BTC)</h4>
</div>

<div
class="space-y-6 md:space-y-0 md:flex md:items-start md:justify-between border border-gray-700 rounded-3xl p-6 mt-6"
>
<div class="flex-1 md:mr-6 flex flex-col">
<div class="flex-1">
<h4 class="text-gray-300 uppercase text-sm mb-4">Ethereum (ETH)</h4>
<div class="border border-gray-700 rounded-lg p-4 mb-4 bg-gray-800">
<p class="text-white mb-2">Address</p>
<p class="text-gray-400 mb-2 break-all">{{ ethAddress }}</p>
<button
(click)="copyAddress(ethAddress, 'eth')"
class="flex items-center text-gray-400 hover:text-white"
class="space-y-6 md:space-y-0 md:flex md:items-center md:justify-between border border-gray-700 rounded-3xl p-6 mt-6"
>
<div class="flex-1 md:mr-6 flex flex-col">
<div class="flex-1">
<h4 class="text-gray-300 uppercase text-sm mb-4">Bitcoin Lightning ⚡</h4>
<div class="border border-gray-700 rounded-lg p-4 mb-4 bg-gray-800">
<p class="text-white mb-2">Address</p>
<p class="text-gray-400 mb-2 break-all">{{ lighthingAddress }}</p>
<button
(click)="copyAddress(lighthingAddress, 'lighthing')"
class="flex items-center text-gray-400 hover:text-white"
>
<img src="/assets/copy.svg" class="w-5 h-5" alt="Copy" />
<span
class="ml-2 transition-all duration-300"
[ngClass]="{
'text-green-400': copiedAddress === 'lighthing',
'text-gray-300': copiedAddress !== 'lighthing'
}"
>
<img src="/assets/copy.svg" class="w-5 h-5" alt="Copy" />
<span
class="ml-2 transition-all duration-300"
[ngClass]="{
'text-green-400': copiedAddress === 'eth',
'text-gray-300': copiedAddress !== 'eth'
}"
>
{{ copiedAddress === "eth" ? "Copied!" : "Copy" }}
</span>
</button>
</div>
{{ copiedAddress === "lighthing" ? "Copied!" : "Copy" }}
</span>
</button>
</div>
<p class="text-gray-400 mt-6 md:mt-10">
Scan the QR code to donate directly.
</p>
</div>
<div class="flex-shrink-0 md:w-1/4">
<img
src="/assets/trust-ETH.png"
alt="ETH QR Code"
class="w-full h-auto rounded-lg"
/>
</div>
</div>
<div class="flex-shrink-0 md:w-1/4 h-70 flex items-center justify-center">
<img
src="/assets/BTC-Lighthing.png"
alt="BTC-L QR Code"
class="w-full h-auto rounded-lg md:mt-5 lg:mt-0"
/>
</div>
</div>


<h3
class="font-bold text-2xl mb-4 ml-0 text-center md:text-start md:ml-2 mt-6"
Expand Down
6 changes: 3 additions & 3 deletions src/app/core/donate/donate.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ import { LoadingService } from 'src/app/shared/services/loading.service';
})
export class DonateComponent {
btcAddress = 'bc1q409g2sesns7069w2vqz8mjfdtzwqk4r47snrxk';
ethAddress = '0xD3C22260D052eaFab37E571eA0B9cdf57EA55a4C';
lighthingAddress = 'lnurl1dp68gurn8ghj7ampd3kx2ar0veekzar0wd5xjtnrdakj7tnhv4kxctttdehhwm30d3h82unvwqhh2um9v3kh2um9w4knqvc7842z9';

copiedAddress: 'btc' | 'eth' | null = null;
copiedAddress: 'btc' | 'lighthing' | null = null;

constructor(
private loadingService: LoadingService,
Expand All @@ -24,7 +24,7 @@ export class DonateComponent {
}, 100);
}

copyAddress(address: string, type: 'btc' | 'eth') {
copyAddress(address: string, type: 'btc' | 'lighthing') {
this.cbService.copy(address);
this.copiedAddress = type;

Expand Down
Binary file added src/assets/BTC-Lighthing.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/btc-L-alt-hq.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/assets/trust-ETH.png
Binary file not shown.

0 comments on commit 527cbdc

Please sign in to comment.