Skip to content

Commit 875f968

Browse files
jackdishmanldmweb
andauthored
UI/onboarding (#280)
* polish onboarding * update Capsule logo * update onboarding prompts * fix detail comments * hide emotions stats if no comments Co-authored-by: ldmweb <[email protected]>
1 parent 7281cd1 commit 875f968

File tree

12 files changed

+107
-44
lines changed

12 files changed

+107
-44
lines changed

src/components/Header.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ import Vue from 'vue'
4444
import { mapMutations } from 'vuex'
4545
import { keyStores } from 'near-api-js'
4646
47-
import CapsuleIcon from '@/components/icons/Capsule.vue'
47+
import CapsuleIcon from '@/components/icons/CapsuleNew.vue'
4848
import Avatar from '@/components/Avatar.vue'
4949
import BrandedButton from '@/components/BrandedButton.vue'
5050
import ProfileIcon from '@/components/icons/Profile.vue'

src/components/Nodes.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="flex items-center bg-gray1 px-3 rounded-lg">
44
<span class="text-sm mr-1 text-gray5">{{ nodes }} peered nodes</span>
55
<CapsuleIcon :shrink="true" />
6-
<span class="flex h-3 w-3">
6+
<span class="flex h-3 w-3 ml-1">
77
<span
88
class="animate-ping absolute inline-flex h-3 w-3 rounded-full opacity-75"
99
:class="nodes > 5 ? `bg-connectGreen` : `bg-connectOrange`"
@@ -18,7 +18,7 @@
1818

1919
<script lang="ts">
2020
import Vue from 'vue'
21-
import CapsuleIcon from '@/components/icons/Capsule.vue'
21+
import CapsuleIcon from '@/components/icons/CapsuleNew.vue'
2222
import ipfs from '@/backend/utilities/ipfs'
2323
2424
export interface IData {

src/components/OnboardingWizard.vue

Lines changed: 58 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,81 @@
33
class="popup fixed w-full h-screen bg-primary top-0 bottom-0 left-0 right-0 z-30 flex justify-center items-start bg-opacity-50"
44
>
55
<div
6-
class="popup shadow-lg rounded-lg bg-gradient-to-r from-lightBGStart to-lightBGStop backdrop-filter backdrop-blur-lg p-5 mt-12"
7-
style="width: 750px"
6+
class="popup shadow-lg rounded-lg bg-gradient-to-r from-lightBGStart to-lightBGStop backdrop-filter backdrop-blur-lg p-6 pt-4 mt-12"
7+
style="width: 650px; backdrop-filter: blur(10px)"
88
>
99
<!-- Header and close icon -->
10-
<div class="flex justify-between items-center pb-10">
11-
<h1 class="text-3xl text-primary font-semibold">Welcome!</h1>
10+
<div class="flex justify-between items-center pb-6">
11+
<h1 class="text-4xl text-primary font-semibold">Welcome!</h1>
1212
<button class="p-1 bg-gray1 rounded-full focus:outline-none" @click="closeWizard"><CloseIcon /></button>
1313
</div>
1414
<!-- Slide 1 -->
15-
<article class="text-center">
16-
<img v-show="step === 0" :src="require(`@/assets/images/onboarding/slide1.gif`)" class="rounded-lg mb-10" />
17-
<img v-show="step === 1" :src="require(`@/assets/images/onboarding/slide2.gif`)" class="rounded-lg mb-10" />
18-
<img v-show="step === 2" :src="require(`@/assets/images/onboarding/slide3.gif`)" class="rounded-lg mb-10" />
19-
<img v-show="step === 3" :src="require(`@/assets/images/onboarding/slide4.gif`)" class="rounded-lg mb-10" />
20-
<img v-show="step === 4" :src="require(`@/assets/images/onboarding/slide5.gif`)" class="rounded-lg mb-10" />
21-
<h6 class="text-xl mb-5 font-semibold">{{ getTitle() }}</h6>
22-
<p class="text-gray7 mb-10">
23-
Welcome to your Capsule, customize it as you want it to be. With quick access to your favorite decentralized
24-
content!
15+
<article class="text-center flex flex-col items-center">
16+
<img
17+
v-show="step === 0"
18+
:src="require(`@/assets/images/onboarding/slide1.gif`)"
19+
class="rounded-lg mb-10 w-5/6 shadow-lg"
20+
/>
21+
<img
22+
v-show="step === 1"
23+
:src="require(`@/assets/images/onboarding/slide2.gif`)"
24+
class="rounded-lg mb-10 w-5/6 shadow-lg"
25+
/>
26+
<img
27+
v-show="step === 2"
28+
:src="require(`@/assets/images/onboarding/slide3.gif`)"
29+
class="rounded-lg mb-10 w-5/6 shadow-lg"
30+
/>
31+
<img
32+
v-show="step === 3"
33+
:src="require(`@/assets/images/onboarding/slide4.gif`)"
34+
class="rounded-lg mb-10 w-5/6 shadow-lg"
35+
/>
36+
<img
37+
v-show="step === 4"
38+
:src="require(`@/assets/images/onboarding/slide5.gif`)"
39+
class="rounded-lg mb-10 w-5/6 shadow-lg"
40+
/>
41+
<h6 class="text-xl mb-5 font-bold">{{ getTitle() }}</h6>
42+
<p class="text-gray5 mb-10 px-10">
43+
{{ getText() }}
2544
</p>
2645
<!-- progress circles -->
2746
<div class="self-center mb-10">
28-
<button class="p-1 bg-primary rounded-full focus:outline-none" @click="setStep(0)"></button>
47+
<button class="p-1 mx-1 bg-primary rounded-full focus:outline-none" @click="setStep(0)"></button>
2948
<button
3049
:class="step > 0 ? `bg-primary` : `bg-gray1`"
31-
class="p-1 rounded-full focus:outline-none"
50+
class="p-1 mx-1 rounded-full focus:outline-none"
3251
@click="setStep(1)"
3352
></button>
3453
<button
3554
:class="step > 1 ? `bg-primary` : `bg-gray1`"
36-
class="p-1 rounded-full focus:outline-none"
55+
class="p-1 mx-1 rounded-full focus:outline-none"
3756
@click="setStep(2)"
3857
></button>
3958
<button
4059
:class="step > 2 ? `bg-primary` : `bg-gray1`"
41-
class="p-1 rounded-full focus:outline-none"
60+
class="p-1 mx-1 rounded-full focus:outline-none"
4261
@click="setStep(3)"
4362
></button>
4463
<button
4564
:class="step > 3 ? `bg-primary` : `bg-gray1`"
46-
class="p-1 rounded-full focus:outline-none"
65+
class="p-1 mx-1 rounded-full focus:outline-none"
4766
@click="setStep(4)"
4867
></button>
4968
</div>
5069
<!-- Next button -->
51-
<div>
70+
<div v-if="step === 4" class="mb-2">
71+
<BrandedButton
72+
:action="
73+
() => {
74+
setStep(step + 1)
75+
}
76+
"
77+
:text="`Let's start! 🚀`"
78+
/>
79+
</div>
80+
<div v-else class="mb-2">
5281
<BrandedButton
5382
:action="
5483
() => {
@@ -97,29 +126,29 @@ export default Vue.extend({
97126
case 0:
98127
return `Customize your homepage`
99128
case 1:
100-
return `Browse Capsule`
129+
return `Discover great content`
101130
case 2:
102-
return `Bookmarks`
131+
return `Save and share bookmarks`
103132
case 3:
104-
return `Create content`
133+
return `Create content easily `
105134
case 4:
106-
return `React easily`
135+
return `Join the conversation `
107136
default:
108137
return `out of scope`
109138
}
110139
},
111140
getText(): string {
112141
switch (this.step) {
113142
case 0:
114-
return `Welcome to your Capsule, customize it as you want it to be. With quick access to your favorite decentralized content!`
143+
return `As your daily entry point to Blogchain, this screen is important. Make it truly your own by picking whichever options you prefer for displaying content, editing tools, widgets, and more.`
115144
case 1:
116-
return `Browse new content on the Discover page with categories search, featured tags and trending topics`
145+
return `On this page, we make it easy for you to find posts by writers who suit your interests well. Browse categories, featured tags, or trending topics to get started.`
117146
case 2:
118-
return `Bookmark your favorite content to read them later and share them to your Capsule network`
147+
return `Sometimes a post or headline catches your attention, but there’s no time to read it now. That’s why Blogchain makes it easy to highlight such content for later and then share with friends if you want.`
119148
case 3:
120-
return `Use the super simple Capsule editor to create new post and share your though on the decentralized network`
149+
return `Have an idea you’d like to share with the world? Blogchain’s simple editing tool will make it easy for you to craft and publish your post.`
121150
case 4:
122-
return `Share your thoughts with advanced reactions in comments to really give you opinion that matter`
151+
return `Agree or disagree with something you’ve read on Blogchain? Use our comment features to talk about it with other readers. You can even include one of our custom reaction illustrations to make your point artfully.`
123152
default:
124153
return `out of scope`
125154
}

src/components/icons/Bin.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
d="M440 64H336l-33.6-44.8A48 48 0 0 0 264 0h-80a48 48 0 0 0-38.4 19.2L112 64H8a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h18.9l33.2 372.3a48 48 0 0 0 47.8 43.7h232.2a48 48 0 0 0 47.8-43.7L421.1 96H440a8 8 0 0 0 8-8V72a8 8 0 0 0-8-8zM171.2 38.4A16.1 16.1 0 0 1 184 32h80a16.1 16.1 0 0 1 12.8 6.4L296 64H152zm184.8 427a15.91 15.91 0 0 1-15.9 14.6H107.9A15.91 15.91 0 0 1 92 465.4L59 96h330z"
55
/>
66
</svg>
7-
</template>
7+
</template>
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<template>
2+
<div>
3+
<svg
4+
xmlns="http://www.w3.org/2000/svg"
5+
width="36"
6+
height="36"
7+
viewBox="0 0 612 612"
8+
fill="#2E556A"
9+
:style="shrink ? `transform: scale(0.7)` : `transform: scale(1)`"
10+
>
11+
<path
12+
d="M621.67,504.54c-1.13,16.64-6.6,30.69-16.84,40.93-41.37,41.37-144.83,5-231.07-81.25s-122.62-189.7-81.25-231.07c10.06-10.06,23.8-15.52,40.07-16.78a1,1,0,0,0,0-2c-54.52-6.54-106.37,8.61-147.88,50.13-83.83,83.82-64.77,238.8,42.58,346.15s262.32,126.41,346.15,42.58c41.79-41.78,57-93.91,50.19-148.75A1,1,0,0,0,621.67,504.54Zm45.06-112.75c-12.36,5.19-30.54,3.47-52.6-5.2-30.58-12-64.27-35.45-94.89-66.06s-54.18-64.43-66.33-95.16c-8.85-22.41-10.66-40.86-5.44-53.37a.72.72,0,0,0-1.13-.81,27.11,27.11,0,0,0-7.58,9.49c-6.6,14.6-5,32.16.37,48.54-39.46-17.34-74-18.88-92.36-.47C319.4,256.12,336.11,319,383.3,381a1,1,0,0,0,1.7-1c-8.12-17.72-9-33.32-.81-41.55,14.48-14.48,51.79-.64,83.34,30.91s45.39,68.86,30.91,83.34c-8.47,8.47-24.75,7.25-43.13-1.54a1,1,0,0,0-1.05,1.69c63.12,49.38,128,67.32,156,39.41,18.41-18.41,16.87-52.91-.47-92.37,16.39,5.33,34,7,48.55.38a27.24,27.24,0,0,0,9.25-7.29A.72.72,0,0,0,666.73,391.79Zm47.13-169.62c-6.09-26.81-18.6-49.8-40.64-66.9-29.52-22.9-63.94-30.9-100.37-32.59h-27a262.42,262.42,0,0,0-47.27,5.49c-17.26,3.5-26.16,7.53-31.79,17.44-3.42,6-4.17,14.61-4,21.89.39,19.8,7,37.89,15.57,55.3,24.22,49.43,60.12,88.84,104.72,120.62,15.22,10.84,31.09,20.62,48.43,27.79,18.41,7.61,43.49,10.38,56.51,3.63,11.21-5.81,15.92-18.76,18-25.31,7.72-24.66,10.95-44.94,11.93-70.81v-26A152.53,152.53,0,0,0,713.86,222.17Z"
13+
transform="translate(-132.48 -122.68)"
14+
/>
15+
</svg>
16+
</div>
17+
</template>
18+
19+
<script lang="ts">
20+
import Vue from 'vue'
21+
22+
export default Vue.extend({
23+
props: {
24+
shrink: {
25+
type: Boolean,
26+
default: false,
27+
},
28+
},
29+
})
30+
</script>

src/components/post/Actions.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
</div>
7777
</div>
7878
<!-- Comment Emoitons -->
79-
<div class="pt-5 border-b pb-2">
79+
<div v-if="getCommentCount(`total`) !== 0" class="pt-5 border-b pb-2">
8080
<h6 class="text-sm pb-4 w-full text-center font-semibold">Comment Emotions</h6>
8181
<!-- Row of faces -->
8282
<div class="flex">

src/components/post/Card.vue

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@
9494
<BookmarkButton :postID="postCID" :hasBookmark="isBookmarked" @clicked="getBookmarkStatus" />
9595
<button
9696
v-if="post.authorID === $store.state.session.id"
97-
class="focus:outline-none ml-2"
97+
class="focus:outline-none ml-2 text-gray5"
9898
@click.stop="toggleDropdownDelete"
9999
>
100100
<More />
@@ -113,12 +113,12 @@
113113
? 'bg-lightBG text-lightPrimaryText border-lightBorder'
114114
: 'bg-darkBG text-darkPrimaryText border-darkBorder'
115115
"
116-
class="absolute flex flex-col rounded-lg w-40 shadow-lg z-10 p-1"
116+
class="absolute flex flex-col rounded-lg w-32 shadow-lg z-10 p-1"
117117
style="top: 70px; right: 10px"
118118
>
119119
<!-- Delete -->
120120
<button class="flex focus:outline-none text-negative" @click="deletePost">
121-
<XIcon class="p-1" />
121+
<BinIcon class="p-1" />
122122
<span class="text-xs self-center text-negative">Delete this post</span>
123123
</button>
124124
</div>
@@ -218,6 +218,7 @@ import XIcon from '@/components/icons/X.vue'
218218
import FriendButton from '@/components/FriendButton.vue'
219219
import RepostIcon from '@/components/icons/Repost.vue'
220220
import StatsIcon from '@/components/icons/Stats.vue'
221+
import BinIcon from '@/components/icons/Bin.vue'
221222
import BrandedButton from '@/components/BrandedButton.vue'
222223
223224
import { RetrievedPost, getRegularPost } from '@/backend/post'
@@ -263,6 +264,7 @@ export default Vue.extend({
263264
TagPill,
264265
More,
265266
XIcon,
267+
BinIcon,
266268
StatsIcon,
267269
FriendButton,
268270
RepostIcon,

src/layouts/editor.vue

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@
2222
class="fixed overflow-y-auto rounded-t-lg shadow-lg mr-5 p-8 z-10 bg-gradient-to-r from-lightBGStart to-lightBGStop border-lightBorder"
2323
@update="updateWordCount"
2424
/>
25-
<div class="fixed bottom-0 z-10 m-5">
26-
Resume writing? <button class="text-primary" @click="showDraftsPopup">Show drafts</button>
25+
<div
26+
class="fixed bottom-0 z-10 m-4 px-5 py-3 bg-gradient-to-r from-lightBGStart to-lightBGStop border-lightBorder rounded-lg shadow-lg test-xs text-gray5"
27+
>
28+
Resume writing? <button class="text-primary ml-2" @click="showDraftsPopup">Show drafts</button>
2729
</div>
2830
<!-- Widgets -->
2931
<aside

src/pages/_id/comments.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
<article v-for="comment in comments" :key="comment._id">
1717
<div class="pb-5">
1818
<Comment :authorID="profile.id" :cid="comment._id" :timestamp="comment.timestamp" />
19-
<p class="text-right">
20-
<nuxt-link :to="`/post/` + comment.parentCID" class="text-primary">View Post</nuxt-link>
19+
<p class="text-right mt-1">
20+
<nuxt-link :to="`/post/` + comment.parentCID" class="text-gray5 text-xs">View Post</nuxt-link>
2121
</p>
2222
</div>
2323
</article>

src/pages/home/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class="h-full focus:outline-none w-full pb-3"
2121
@click="sortFeed('NEW')"
2222
>
23-
New Posts
23+
New
2424
</button>
2525
</div>
2626
<div class="flex items-center">

0 commit comments

Comments
 (0)