|
1 | 1 | <template>
|
2 |
| - <main style="backdrop-filter: blur(10px)" class="bg-white bg-opacity-75 w-1/2 h-screen"> |
3 |
| - <CapsuleIcon class="pt-5 pl-10" /> |
4 |
| - <section class="flex justify-center items-center"> |
5 |
| - <div class="flex flex-col items-center w-full"> |
| 2 | + <main |
| 3 | + style="backdrop-filter: blur(10px)" |
| 4 | + class="bg-gradient-to-r from-lightBGStart to-lightBGStop w-3/5 h-screen overflow-y-scroll flex-col justify-between" |
| 5 | + > |
| 6 | + <CapsuleIcon class="pt-6 pl-10" /> |
| 7 | + <section class="flex justify-center items-center" style="height: 86%"> |
| 8 | + <div class="flex flex-col items-center w-full p-14 -mt-5"> |
6 | 9 | <!-- Step 1: Choose Login / register -->
|
7 |
| - <article v-show="!userInfo" class="w-1/2"> |
8 |
| - <h1 class="mb-10 text-2xl text-primary font-bold text-center">Sign in or sign up using...</h1> |
| 10 | + <article v-show="!userInfo && !isLoading" class="w-1/2"> |
| 11 | + <h1 class="font-semibold text-primary mb-10" style="font-size: 2.6rem">Signup</h1> |
9 | 12 | <button
|
10 |
| - class="w-full rounded-lg w-1/2 bg-gray2 mb-4 py-2 flex justify-center items-center" |
| 13 | + class="w-full rounded-lg w-1/2 bg-gray2 mb-4 py-2 flex justify-center items-center focus:outline-none" |
11 | 14 | @click="() => torusLogin('discord')"
|
12 | 15 | >
|
13 |
| - <DiscordIcon style="width: 32px; height: 32px" /> |
14 |
| - <h6 class="text-xl ml-2">Discord</h6> |
| 16 | + <DiscordIcon style="width: 28px; height: 28px" /> |
| 17 | + <h6 class="font-semibold text-gray7 text-sm ml-4">Sign up with Discord</h6> |
15 | 18 | </button>
|
16 | 19 | <button
|
17 |
| - class="w-full rounded-lg w-1/2 bg-gray2 mb-4 py-2 flex justify-center items-center" |
| 20 | + class="w-full rounded-lg w-1/2 bg-gray2 py-2 flex justify-center items-center focus:outline-none" |
18 | 21 | @click="() => torusLogin('google')"
|
19 | 22 | >
|
20 |
| - <GoogleIcon style="width: 32px; height: 32px" /> |
21 |
| - <h6 class="text-xl ml-2">Google</h6> |
| 23 | + <GoogleIcon style="width: 28px; height: 28px" /> |
| 24 | + <h6 class="font-semibold text-gray7 text-sm ml-4">Sign up with Google</h6> |
22 | 25 | </button>
|
23 |
| - <div class="w-full flex justify-center items-center mb-4"> |
24 |
| - <span class="border border-black flex-grow" style="height: 1px"></span> |
25 |
| - <p class="px-4">OR</p> |
26 |
| - <span class="border border-black flex-grow" style="height: 1px"></span> |
| 26 | + <div class="w-full flex justify-center items-center my-6"> |
| 27 | + <span class="border border-gray5 flex-grow rounded-lg" style="height: 1px"></span> |
| 28 | + <p class="px-4 text-gray5 text-xs">OR</p> |
| 29 | + <span class="border border-gray5 flex-grow rounded-lg" style="height: 1px"></span> |
27 | 30 | </div>
|
28 |
| - <button class="w-full rounded-lg w-1/2 bg-gray2 mb-4 py-2 flex justify-center items-center"> |
29 |
| - <NearIcon style="width: 28px; height: 28px" /> |
30 |
| - <h6 class="text-xl ml-2">Signup with NEAR</h6> |
| 31 | + <button |
| 32 | + class="w-full rounded-lg w-1/2 bg-gray2 mb-4 py-3 flex justify-center items-center focus:outline-none" |
| 33 | + > |
| 34 | + <NearIcon style="width: 22px; height: 22px" /> |
| 35 | + <h6 class="font-semibold text-gray7 text-sm ml-4">Signup with NEAR</h6> |
31 | 36 | </button>
|
32 | 37 | </article>
|
33 | 38 | <!-- Step 2: Sign up -->
|
|
41 | 46 | Verify you’re a human with your phone number so that Capsule can fund your wallet. This is the last
|
42 | 47 | step needed to create your Capsule account.
|
43 | 48 | </p>
|
44 |
| - <label for="id" class="font-semibold text-sm text-gray-600 pb-1 block">Phone Number</label> |
| 49 | + <label for="id" class="font-semibold text-sm text-gray5 pb-1 block">Phone Number</label> |
45 | 50 | <input
|
46 | 51 | id="phoneNumber"
|
47 | 52 | v-model="phoneNumber"
|
48 | 53 | type="tel"
|
49 |
| - placeholder="Enter your phone number" |
| 54 | + placeholder="+33" |
50 | 55 | class="
|
51 |
| - border |
52 | 56 | rounded-lg
|
53 | 57 | px-3
|
54 | 58 | py-2
|
|
59 | 63 | focus:outline-none focus:border-primary
|
60 | 64 | text-primary
|
61 | 65 | font-sans
|
62 |
| - bg-gray1 |
| 66 | + bg-gray2 |
63 | 67 | "
|
64 | 68 | />
|
65 | 69 | <div class="w-full flex justify-end">
|
66 | 70 | <BrandedButton :text="`Send Code`" :action="sendOTP" />
|
67 | 71 | </div>
|
68 |
| - <p class="text-gray7 text-sm mt-5"> |
| 72 | + <p class="text-gray7 text-sm mt-10 text-center"> |
69 | 73 | Already have a funded wallet? <button class="text-primary font-bold">Connect to NEAR</button>
|
70 | 74 | </p>
|
71 | 75 | </div>
|
72 | 76 | <div v-else>
|
73 | 77 | <!-- Enter SMS code to complete verify -->
|
74 |
| - <label for="id" class="font-semibold text-sm text-gray-600 pb-1 block">One-time Password</label> |
| 78 | + <label for="id" class="font-semibold text-sm text-gray5 pb-1 block">One-time Password</label> |
75 | 79 | <input
|
76 | 80 | id="phoneNumber"
|
77 | 81 | v-model="otp"
|
78 | 82 | type="text"
|
79 | 83 | placeholder=""
|
80 | 84 | class="
|
81 |
| - border |
82 | 85 | rounded-lg
|
83 | 86 | px-3
|
84 | 87 | py-2
|
|
89 | 92 | focus:outline-none focus:border-primary
|
90 | 93 | text-primary
|
91 | 94 | font-sans
|
| 95 | + bg-gray2 |
92 | 96 | "
|
93 | 97 | />
|
94 | 98 | <BrandedButton :text="`Verify`" class="w-full" :action="validateOTP" />
|
95 | 99 | </div>
|
96 | 100 | </article>
|
97 | 101 | <article v-else>
|
98 | 102 | <!-- Step 3: Choose an ID -->
|
99 |
| - <label for="id" class="font-semibold text-sm text-gray-600 pb-1 block">ID</label> |
| 103 | + <label for="id" class="font-semibold text-sm text-gray5 pb-1 block">ID</label> |
100 | 104 | <input
|
101 | 105 | id="id"
|
102 | 106 | v-model="id"
|
103 | 107 | type="text"
|
104 | 108 | placeholder=""
|
105 | 109 | class="
|
106 |
| - border |
107 | 110 | rounded-lg
|
108 | 111 | px-3
|
109 | 112 | py-2
|
|
114 | 117 | focus:outline-none focus:border-primary
|
115 | 118 | text-primary
|
116 | 119 | font-sans
|
| 120 | + bg-gray2 |
117 | 121 | "
|
118 | 122 | />
|
119 | 123 | <BrandedButton :text="`Sign Up`" :action="verify" class="w-full" />
|
|
130 | 134 | </div>
|
131 | 135 | </article>
|
132 | 136 | <article v-show="isLoading" class="w-3/4 flex justify-center">
|
133 |
| - <div class="loader m-5 p-10 rounded-lg"></div> |
| 137 | + <div class="loader m-5 rounded-lg"></div> |
134 | 138 | </article>
|
135 | 139 | </div>
|
136 | 140 | </section>
|
| 141 | + <p class="px-4 text-gray5 text-sm pl-10">© 2021 Capsule.Social</p> |
137 | 142 | </main>
|
138 | 143 | </template>
|
139 | 144 |
|
@@ -230,8 +235,8 @@ export default Vue.extend({
|
230 | 235 | this.isLoading = false
|
231 | 236 | },
|
232 | 237 | async torusLogin(type: TorusVerifiers) {
|
| 238 | + this.isLoading = true |
233 | 239 | try {
|
234 |
| - this.isLoading = true |
235 | 240 | this.userInfo = await this.torus.triggerLogin(torusVerifiers[type])
|
236 | 241 |
|
237 | 242 | this.accountId = getAccountIdFromPrivateKey(this.userInfo.privateKey)
|
@@ -310,7 +315,7 @@ export default Vue.extend({
|
310 | 315 | this.changeAvatar(account.avatar)
|
311 | 316 | this.changeBio(account.bio)
|
312 | 317 | this.changeLocation(account.location)
|
313 |
| - this.$router.push(`/settings`) |
| 318 | + this.$router.push(`/home`) |
314 | 319 | } catch (err: any) {
|
315 | 320 | alert(err.message)
|
316 | 321 | }
|
|
0 commit comments