Skip to content

Commit

Permalink
feat: add wallet connect button, version at the bottom (#33)
Browse files Browse the repository at this point in the history
* feat: add bottom line with version and bug report link

* chore: add "rollup-plugin-visualizer"

* refactor: extract topUp function

* feat: add wallet connect button
  • Loading branch information
davidyuk authored Apr 29, 2024
1 parent 2545504 commit 9f9cbf0
Show file tree
Hide file tree
Showing 15 changed files with 473 additions and 51 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,5 @@
!server.ts
!utils.ts
!tsconfig.json
!vite.config.ts
!index.html
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ RUN npm ci

COPY src src
COPY public public
COPY tsconfig.json index.html ./
COPY tsconfig.json vite.config.ts index.html ./
RUN npm run build

FROM node:20-alpine
Expand All @@ -17,5 +17,7 @@ RUN npm ci --omit dev
COPY --from=frontend /app/dist dist
COPY server.ts utils.ts ./
ENV NODE_ENV production
ARG REVISION
ENV REVISION $REVISION

CMD [ "npx", "tsx", "server.ts"]
16 changes: 13 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,28 @@
<title>Faucet Aepp</title>
</head>
<body>
<div>
<main>
<h1>
🚰<br/>
<a href="https://aeternity.com">Æternity Blockchain</a>'s Faucet Aepp
</h1>
<h4>{{ node }}</h4>
<form id="form" data-amount="{{ amount }}" data-explorer-url="{{ explorer_url }}">
<h4>{{ NODE_URL }}</h4>
<form id="form">
<input name="address" placeholder="ak_YOUrPubl1ckeyh4sHh3r3" required>
<button>Top UP</button>
</form>
<div class="connect-wallet">
<span>or</span> <button>Connect Wallet</button>
</div>
<div id="result"></div>
</main>
<div class="bottom-line">
{{ REVISION }} | <a href="https://github.com/aeternity/aepp-faucet-nodejs/issues/new" target="_blank">report a bug</a>
</div>
<script>
window.TOPUP_AMOUNT = '{{ TOPUP_AMOUNT }}'
window.EXPLORER_URL = '{{ EXPLORER_URL }}'
</script>
<script type="module" src="/src/main.ts"></script>
</body>
</html>
Loading

0 comments on commit 9f9cbf0

Please sign in to comment.