Skip to content

Commit d262012

Browse files
raducristianpopahuijingsidvishnoi
authored
feat: Web Monetization playground (#466)
* Web Monetization Playground * Update site title and description * Fix stylings * Remove unused fonts * change styling on playground page and add to footer * change action button border color * Move to `/play`; do not validate wallet address in the playground * Remove log * Apply suggestions from code review Co-authored-by: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> * Use class instead of attr * Fix image size * Add notice if browser does not support WM * Improve Web Monetization detection * use details instead of toolitp; format code Co-authored-by: Sid Vishnoi <sidvishnoi@users.noreply.github.com> --------- Co-authored-by: Chen Hui Jing <1461498+huijing@users.noreply.github.com> Co-authored-by: Sid Vishnoi <8426945+sidvishnoi@users.noreply.github.com> Co-authored-by: Sid Vishnoi <sidvishnoi@users.noreply.github.com>
1 parent c2ad548 commit d262012

4 files changed

Lines changed: 621 additions & 0 deletions

File tree

Lines changed: 1 addition & 0 deletions
Loading

src/components/pages/Footer.astro

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<div class="contentWrapperLg">
55
<div class="linkWrapper">
66
<ul>
7+
<li><a href="/play">Web Monetization Playground</a></li>
78
<li><a href="/link-tag">Link Element Generator</a></li>
89
<li><a href="/prob-revshare">Probabilistic Revshare Generator</a></li>
910
</ul>

src/env.d.ts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,20 @@
11
/// <reference path="../.astro/types.d.ts" />
22
/// <reference types="astro/client" />
3+
4+
declare global {
5+
interface MonetizationEvent extends Event {
6+
readonly paymentPointer: string
7+
readonly incomingPayment: string
8+
readonly amountSent: PaymentCurrencyAmount
9+
}
10+
11+
interface ElementEventMap {
12+
monetization: MonetizationEvent
13+
}
14+
15+
interface Window {
16+
MonetizationEvent: MonetizationEvent
17+
}
18+
}
19+
20+
export {}

0 commit comments

Comments
 (0)