Skip to content

Commit

Permalink
Merge pull request #2545 from dusk-network/feature-2544-wallet-mainte…
Browse files Browse the repository at this point in the history
…nance-page

Add maintenance page with env flag to enable
  • Loading branch information
kieranhall authored Oct 1, 2024
2 parents daea2be + dc7ee00 commit eac4ed5
Show file tree
Hide file tree
Showing 4 changed files with 62 additions and 0 deletions.
1 change: 1 addition & 0 deletions web-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ VITE_LOCAL_NODE="https://localhost:5173/rusk/"
VITE_MAINNET_NODE=""
VITE_MIGRATE_CONTRACT=""
VITE_MINIMUM_ALLOWED_STAKE=1000
VITE_MODE_MAINTENANCE=false
VITE_RKYV_TREE_LEAF_SIZE=632
VITE_STAKE_CONTRACT="0200000000000000000000000000000000000000000000000000000000000000"
VITE_TESTNET_NODE="https://nodes.dusk.network/"
Expand Down
6 changes: 6 additions & 0 deletions web-wallet/src/hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('@sveltejs/kit').Reroute} */
export function reroute() {
return import.meta.env.VITE_MODE_MAINTENANCE === "true"
? `${import.meta.env.VITE_BASE_PATH}/maintenance`
: undefined;
}
54 changes: 54 additions & 0 deletions web-wallet/src/routes/maintenance/+page.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<svelte:options immutable={true} />

<script>
import { mdiWrenchClock } from "@mdi/js";
import { AnchorButton } from "$lib/dusk/components";
import { IconHeadingCard } from "$lib/containers/Cards";
</script>

<section class="maintenance">
<h2 class="h1">
Unleash <mark>RWA</mark> and<br />
Decentralized <mark>Finance</mark>
</h2>
<div class="maintenance">
<IconHeadingCard
tag="article"
gap="medium"
heading="Wallet maintenance"
icons={[mdiWrenchClock]}
>
<p>
Dusk web-wallet is undergoing some essential maintenance and will return
soon. Need an alternative? Rusk wallet is our terminal wallet
application.
</p>
</IconHeadingCard>
</div>
<footer class="maintenance-footer">
<AnchorButton
href="https://github.com/dusk-network/rusk/blob/master/rusk-wallet/src/bin/README.md"
variant="tertiary"
text="Rusk Wallet"
/>
</footer>
</section>

<style lang="postcss">
.maintenance,
.maintenance-footer {
display: flex;
flex-direction: column;
}
.maintenance {
height: 100%;
overflow-y: auto;
gap: var(--large-gap);
}
.maintenance-footer {
gap: var(--default-gap);
}
</style>
1 change: 1 addition & 0 deletions web-wallet/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ export default defineConfig(({ mode }) => {
LOCAL_PROVER_NODE: env.VITE_LOCAL_PROVER_NODE,
MAINNET_NODE: env.VITE_MAINNET_NODE,
MAINNET_PROVER_NODE: env.VITE_MAINNET_PROVER_NODE,
MODE_MAINTENANCE: env.VITE_MODE_MAINTENANCE,
RKYV_TREE_LEAF_SIZE: env.VITE_RKYV_TREE_LEAF_SIZE,
STAKE_CONTRACT: env.VITE_STAKE_CONTRACT,
TESTNET_NODE: env.VITE_TESTNET_NODE,
Expand Down

0 comments on commit eac4ed5

Please sign in to comment.