new ohlc; beta signin; elaborated order status (not working yet)
This commit is contained in:
35
src/components/BetaSignin.vue
Normal file
35
src/components/BetaSignin.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<slot v-if="s.allowed"/>
|
||||
<v-card v-if="!s.allowed" rounded="0" title="Dexorder Closed Beta">
|
||||
<v-card-item><v-text-field v-model="password" label="Beta Password" class="maxw"/></v-card-item>
|
||||
<v-card-text>
|
||||
Follow our social media for public release updates!
|
||||
</v-card-text>
|
||||
<v-card-item><social/></v-card-item>
|
||||
</v-card>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {useStore} from "@/store/store";
|
||||
import Social from "@/components/Social.vue";
|
||||
import {ref, watchEffect} from "vue";
|
||||
import {hashMessage} from "ethers";
|
||||
|
||||
const s = useStore()
|
||||
|
||||
const password = ref(null)
|
||||
const passHash = '0x3e6e96bd824dd0a5e5361853719ef051e939b91f3fc6fd0f685b4c414c7ba89e'
|
||||
|
||||
watchEffect(()=>{
|
||||
if (!password.value) return
|
||||
const canonical = password.value.replace(/[^a-zA-Z]/g, '').toLowerCase();
|
||||
const hash = hashMessage(canonical);
|
||||
if (hash===passHash)
|
||||
s.allowed = true
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
</style>
|
||||
@@ -1,4 +1,5 @@
|
||||
<template>
|
||||
<beta-signin>
|
||||
<slot v-if="status===Status.OK" v-bind="$props"/>
|
||||
<v-card v-if="status!==Status.OK" rounded="0">
|
||||
<v-card-title>
|
||||
@@ -35,6 +36,7 @@
|
||||
</v-card-actions>
|
||||
|
||||
</v-card>
|
||||
</beta-signin>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
@@ -42,8 +44,8 @@ import {useStore} from "@/store/store";
|
||||
import {computed, ref} from "vue";
|
||||
import {connectWallet, switchChain} from "@/blockchain/wallet.js";
|
||||
import Btn from "@/components/Btn.vue";
|
||||
import CopyButton from "@/components/CopyButton.vue";
|
||||
import Logo from "@/components/Logo.vue";
|
||||
import BetaSignin from "@/components/BetaSignin.vue";
|
||||
|
||||
const s = useStore()
|
||||
const disabled = ref(false)
|
||||
|
||||
Reference in New Issue
Block a user