Skip to content

Commit

Permalink
frontend: add disable bridging option
Browse files Browse the repository at this point in the history
  • Loading branch information
compojoom committed Oct 27, 2023
1 parent 44289be commit 0fe1eec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
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
11 changes: 9 additions & 2 deletions frontend/src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
/></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 @@ -17,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 @@ -49,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 @@ -61,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

0 comments on commit 0fe1eec

Please sign in to comment.