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

test commit #20

Merged
merged 11 commits into from
May 8, 2024
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
47 changes: 27 additions & 20 deletions components/CheckWalletTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<section id="steps">
<div class="block steps">
<div class="container">
<div class="grid grid-rows-3 grid-flow-col gap-4">
<div class="grid gap-4">
<div class="text-4xl mt-10">Shield PAS tokens to Incognitee</div>
<div class="text-lg">
<template
Expand All @@ -15,29 +15,38 @@
Shielding your tokens means that you send them from Paseo to
Incognitee where you can then transfer them privately

<div class="mt-4">
<UButton class="btn btn_gradient" @click="shield"
>Shield PAS to Incognitee</UButton
>
<div>
<NuxtLink
target="blank"
class="mb-5 mt-8 btn btn_gradient"
@click="shield"
>Shield PAS to Incognitee
</NuxtLink>
<div>{{ txStatus }}</div>
</div>
</template>

<template v-else>
You don’t have enough Paseo PAS on your account. Copy your address
<span style="word-break: break-word; overflow-wrap: break-word">
<code>{{ accountStore.getAddress }}</code>
</span>
and follow the link below to obtain some PAS for free from the
Paseo faucet.
<div class="mt-3 mb-8">
<button class="button" @click="copyToClipboard">
Copy My Address
</button>
</div>
<div class="mt-4">
<NuxtLink
to="https://faucet.polkadot.io/paseo"
target="blank"
class="btn btn_gradient"
>Get free PAS tokens
</NuxtLink>

<div class="container mx-auto mt-10">
<div class="flex space-x-4 justify-center mt-10">
<a class="button btn" @click="copyToClipboard">
Copy My Address
</a>
<a
href="https://faucet.polkadot.io/paseo"
target="_blank"
class="btn btn_gradient"
>
Get free PAS tokens
</a>
</div>
</div>
</template>
</div>
Expand All @@ -50,10 +59,8 @@
<script setup lang="ts">
import { useAccount } from "@/store/account.ts";
import { useIncognitee } from "@/store/incognitee.ts";
import { onMounted, ref, watch } from "vue";
import { ref } from "vue";
import { ApiPromise, WsProvider } from "@polkadot/api";
import { Keyring } from "@polkadot/keyring";
import { hexToU8a } from "@polkadot/util";

const existential_deposit = 10000000000;
const txStatus = ref("");
Expand Down
12 changes: 6 additions & 6 deletions components/CreateWalletTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
on Paseo and Incognitee.
</div>
<div>
<UButton class="btn btn_gradient" @click="createWallet"
>Create a Wallet</UButton
>
<a class="btn btn_gradient" @click="createWallet">
Create a Wallet
</a>
</div>
</div>
</div>
Expand All @@ -21,16 +21,16 @@
</template>

<script setup lang="ts">
import { useAccount } from "@/store/account.ts";
import { Keyring } from "@polkadot/keyring";
import { hexToU8a, u8aToHex } from "@polkadot/util";
import {
cryptoWaitReady,
mnemonicGenerate,
mnemonicToMiniSecret,
} from "@polkadot/util-crypto";
import { u8aToHex, hexToU8a } from "@polkadot/util";
import { useAccount } from "@/store/account.ts";
import { defineComponent, onMounted } from "vue";
import { useRouter } from "vue-router";
import { onMounted, ref, defineComponent } from "vue";

const router = useRouter();
const accountStore = useAccount();
Expand Down
4 changes: 2 additions & 2 deletions components/Header/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ import Menu from "@/components/Header/Menu.vue";
import Logo from "@/components/Logo";
import Socials from "@/components/Socials";
import { breakpoints } from "@/configs/app.config";
import { useWindowScroll, useWindowSize, useInterval } from "@vueuse/core";
import { onMounted, ref, watch } from "vue";
import { useAccount } from "@/store/account.ts";
import { useIncognitee } from "@/store/incognitee.ts";
import { ApiPromise, WsProvider } from "@polkadot/api";
import { useInterval, useWindowScroll, useWindowSize } from "@vueuse/core";
import { onMounted, ref, watch } from "vue";

const pollCounter = useInterval(2000);

Expand Down
76 changes: 44 additions & 32 deletions components/InviteFriendTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,7 @@
<div class="container">
<div class="">
<div class="text-4xl mt-10 mb-10">Invite a friend</div>
<div v-if="accountStore.incogniteeBalance <= min_incognitee_balance">
<i
><b
>You don't have enough balance on Incognitee to invite someone.
Please go back to step 2</b
></i
>
</div>

<div class="text-lg">
By clicking the ”Invite Friend” button, you perform a private
transfer of 10% of your available PAS from your Incognitee wallet to
Expand All @@ -24,40 +17,56 @@
<template
v-if="accountStore.incogniteeBalance > min_incognitee_balance"
>
<UButton class="btn btn_gradient" @click="inviteFriend"
>Invite Friend
<UButton class="btn btn_gradient" @click="inviteFriend">
Invite Friend
</UButton>
<div>{{ topStatus }}</div>
<div class="mt-4">{{ topStatus }}</div>
<template v-if="inviteUrl">
<div class="mt-10 mb-3">
<p class="text-sm text-green-700">
{{ inviteUrl }}
</p>
</div>
<div class="flex space-x-4 mt-10">
<a class="btn btn_gradient" @click="copyToClipboard">
Copy Link
</a>
</div>
</template>
</template>
<template v-else>
<NuxtLink to="" target="blank" class="btn btn_border"
>balance too low: go back to step 2
</NuxtLink>
<template
v-if="accountStore.incogniteeBalance <= min_incognitee_balance"
>
<div class="border-l-4 border-yellow-400 bg-yellow-50 p-4">
<div class="flex">
<div class="flex-shrink-0">
<ExclamationTriangleIcon
class="h-5 w-5 text-yellow-400"
aria-hidden="true"
/>
</div>
<div class="ml-3">
<p class="text-sm text-yellow-700">
You don't have enough balance on Incognitee to invite
someone. Please go back to step 2.
{{ " " }}
</p>
</div>
</div>
</div>
</template>
</div>
<div class="mt-10 mb-3">
<input
ref="urlToShareWithFriend"
type="text"
class="dynamic-width border-2 border-gray-200 p-2"
style="color: black"
:value="inviteUrl"
readonly
/>
</div>
<div class="mt-3 mb-8">
<button class="button" @click="copyToClipboard">Copy</button>
</div>
</div>
</div>
</div>
</section>
</template>

<script setup lang="ts">
import { ExclamationTriangleIcon } from "@heroicons/vue/20/solid";
import { Keyring } from "@polkadot/keyring";
import { mnemonicGenerate, mnemonicToMiniSecret } from "@polkadot/util-crypto";
import { formatBalance, u8aToHex } from "@polkadot/util";
import { mnemonicGenerate, mnemonicToMiniSecret } from "@polkadot/util-crypto";
import { ref } from "vue";

import { useAccount } from "@/store/account.ts";
Expand All @@ -67,9 +76,7 @@ const accountStore = useAccount();
const incogniteeStore = useIncognitee();
const topStatus = ref("");

const inviteUrl = ref(
'click "invite friend" to generate a new wallet for them',
);
const inviteUrl = ref("");

const min_incognitee_balance = 0.02 * 10 ** 10;

Expand Down Expand Up @@ -156,4 +163,9 @@ const inviteFriend = () => {
border-color: #24ad7c;
height: 55px;
}

.text-sm.text-green-700 {
word-wrap: break-word;
overflow-wrap: break-word;
}
</style>
99 changes: 55 additions & 44 deletions components/PublishonxTab.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,45 @@
<div class="text-4xl mt-10 mb-10">Tell the World - or Stay Anon</div>
<div class="text-lg">
<div v-if="accountStore.incogniteeBalance == 0">
<i
><b
>You have no balance on Incognitee. Please go back to step 2
to collect more points</b
></i
>
<div class="border-l-4 border-yellow-400 bg-yellow-50 p-4">
<div class="flex">
<div class="flex-shrink-0">
<ExclamationTriangleIcon
class="h-5 w-5 text-yellow-400"
aria-hidden="true"
/>
</div>
<div class="ml-3">
<p class="text-sm text-yellow-700">
You have no balance on Incognitee. Please go back to step
2 to collect more points
{{ " " }}
</p>
</div>
</div>
</div>
</div>
<div v-if="accountStore.paseoBalance == 0">
<i
><b
>You have no balance on Paseo. Please go back to step 2 to
collect more points</b
></i
>
<div v-else-if="accountStore.paseoBalance == 0">
<div class="border-l-4 border-yellow-400 bg-yellow-50 p-4">
<div class="flex">
<div class="flex-shrink-0">
<ExclamationTriangleIcon
class="h-5 w-5 text-yellow-400"
aria-hidden="true"
/>
</div>
<div class="ml-3">
<p class="text-sm text-yellow-700">
You have no balance on Paseo. Please go back to step 2 to
collect more points
{{ " " }}
</p>
</div>
</div>
</div>
</div>
</div>
<div class="text-lg">
<div class="text-lg mt-4">
To be eligible for our prices, please either tweet or send us a
message over SimpleX. Tell the world about your successful test
using the button below. Make sure to include hashtag #incognitee and
Expand Down Expand Up @@ -55,17 +77,17 @@
>post a note on nostr
</NuxtLink>
<div class="mt-5">
<textarea readonly class="template-textarea">
I have successfully tested #incognitee private token transfers on https://try.incognitee.io by @integritee with my account {{
accountStore.getAddress
}}</textarea
>
<p class="text-sm text-green-700">
I have successfully tested #incognitee private token
transfers on https://try.incognitee.io by @integritee with
my account {{ accountStore.getAddress }}
</p>
</div>
</template>
<template v-else>
<NuxtLink to="" target="blank" class="btn btn_border"
>No account with a balance yet</NuxtLink
>
<NuxtLink to="" target="blank" class="btn btn_border">
No account with a balance yet
</NuxtLink>
</template>
</div>

Expand All @@ -82,18 +104,16 @@ I have successfully tested #incognitee private token transfers on https://try.in
>send us a simpleX message
</NuxtLink>
<div class="mt-5">
<textarea readonly class="template-textarea">
Dear Integritee team. I have participated in the incognitee beta campaign with account {{
accountStore.getAddress
}}
</textarea
>
<p class="text-sm text-green-700">
Dear Integritee team. I have participated in the incognitee
beta campaign with account {{ accountStore.getAddress }}
</p>
</div>
</template>
<template v-else>
<NuxtLink to="" target="blank" class="btn btn_border"
>No account with a balance yet</NuxtLink
>
<NuxtLink to="" target="blank" class="btn btn_border">
No account with a balance yet
</NuxtLink>
</template>
</div>
<div class="mt-5">
Expand All @@ -109,6 +129,7 @@ Dear Integritee team. I have participated in the incognitee beta campaign with a
<script setup lang="ts">
import { ref, onMounted, watch } from "vue";
import { useAccount } from "@/store/account.ts";
import { ExclamationTriangleIcon } from "@heroicons/vue/20/solid";

const accountStore = useAccount();

Expand Down Expand Up @@ -138,18 +159,8 @@ watch(accountStore, updateLinks);
onMounted(updateLinks);
</script>
<style scoped>
.template-textarea {
width: 100%;
height: 80px;
padding: 10px;
border-left: 10px solid #ccc;
border-top: none;
border-right: none;
border-bottom: none;
background-color: transparent;
font-style: italic;
font-size: 1em;
line-height: 1.6;
resize: none;
.text-sm.text-green-700 {
word-wrap: break-word;
overflow-wrap: break-word;
}
</style>
Loading
Loading