Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Frontend/add disable option #2255

Merged
merged 2 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions frontend/.env.production
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ VITE_CONFIG_URL=config.production.json
VITE_FAUCET_ENABLED=false
VITE_WALLET_CONNECT_PROJECT_ID=b0909ba73ce9e30c4decb50a963c9b2a
VITE_REQUEST_EXPIRY_SECONDS=86400
VITE_BRIDGING_DISABLED=true
12 changes: 9 additions & 3 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
<div
class="app-content flex min-h-screen w-full flex-col bg-gradient-to-b from-black to-teal font-sans text-white antialiased"
>
<Banner></Banner>
<div class="container mx-auto max-w-5xl">
<a href="https://beamerbridge.com" target="_blank">
<img class="mt-6 ml-6 w-[10rem] md:w-[15rem]" src="@/assets/images/logo.svg" alt="logo"
/></a>
</div>
<div class="pt-2 md:pt-2">
<div v-if="configurationLoaded">
<div v-if="configurationLoaded && !disabled">
<router-view v-if="!isBlacklistedWallet" class="z-10" />
<div
v-else
Expand All @@ -18,6 +17,12 @@
Your address is on the blocked list.
</div>
</div>
<div
v-else-if="disabled"
class="flex h-[90vh] w-full flex-col items-center justify-center px-4 text-center text-4xl text-red"
>
Bridging is currently paused.
</div>
<div
v-else-if="configurationError"
class="flex h-[90vh] w-full flex-col items-center justify-center px-4 text-center text-4xl text-red"
Expand Down Expand Up @@ -50,7 +55,6 @@ import { onMounted } from 'vue';

import type { Transfer } from '@/actions/transfers';
import Footer from '@/components/Footer.vue';
import Banner from '@/components/layout/Banner.vue';
import Spinner from '@/components/Spinner.vue';
import { useContinueInterruptedTransfers } from '@/composables/useContinueInterruptedTransfers';
import useLoadConfiguration from '@/composables/useLoadConfiguration';
Expand All @@ -62,6 +66,8 @@ import MatomoConsentPopup from './components/MatomoConsentPopup.vue';
import { useClaimCountListeners } from './composables/useClaimCountListeners';
import { useTransferNotifications } from './composables/useTransferNotifications';

const disabled = import.meta.env.VITE_BRIDGING_DISABLED === 'true';

const { setConfiguration } = useConfiguration();
const { loadConfiguration, configurationLoaded, configurationError } =
useLoadConfiguration(setConfiguration);
Expand Down