tangled
alpha
login
or
join now
vt3e.cat
/
bbell
7
fork
atom
wip bsky client for the web & android
bbell.vt3e.cat
7
fork
atom
overview
issues
pulls
pipelines
feat(profile): ok google make it responsive thanks google (me)
vt3e.cat
1 week ago
e1fc8b27
858c2db8
verified
This commit was signed with the committer's
known signature
.
vt3e.cat
SSH Key Fingerprint:
SHA256:MaVgF6bXxDdD131G4rXizPh+sttp3IVsdPrj48HV0X0=
+54
-33
1 changed file
expand all
collapse all
unified
split
src
views
Profile
ProfileView.vue
+54
-33
src/views/Profile/ProfileView.vue
···
17
17
import { useAuthStore } from '@/stores/auth'
18
18
import { usePostStore } from '@/stores/posts'
19
19
import { useToastStore } from '@/stores/toast'
20
20
+
import { useEnvironmentStore } from '@/stores/environment'
20
21
21
22
import BackButton from '@/components/Navigation/BackButton.vue'
22
23
import PageLayout from '@/components/Navigation/PageLayout.vue'
···
35
36
const auth = useAuthStore()
36
37
const postStore = usePostStore()
37
38
const toast = useToastStore()
39
39
+
const env = useEnvironmentStore()
38
40
39
41
const profile = ref<AppBskyActorDefs.ProfileViewDetailed | null>(null)
40
42
const feed = ref<AppBskyFeedDefs.FeedViewPost[]>([])
···
380
382
</div>
381
383
</template>
382
384
383
383
-
<div class="profile-container" v-if="profile">
385
385
+
<div :class="{ mobile: env.isMobile, 'profile-container': true }" v-if="profile">
384
386
<div class="banner">
385
387
<img
386
388
v-if="profile?.banner"
···
407
409
/>
408
410
</div>
409
411
<div class="identity-row">
410
410
-
<div class="identity-row__names">
412
412
+
<div class="identity-row__names" v-if="!env.isMobile">
411
413
<span class="header-name">{{ profile?.displayName || profile.handle }}</span>
412
414
<a v-if="handleLink" :href="handleLink" target="_blank" class="header-handle"
413
415
>@{{ formatUrl(profile.handle) }}</a
414
416
>
415
417
<span class="header-handle" v-else>@{{ profile?.handle }}</span>
416
418
</div>
419
419
+
<div v-else></div>
420
420
+
417
421
<div class="identity-row__actions">
418
422
<Button v-if="isSelf" variant="secondary" size="md" pill>Edit</Button>
419
423
<Button
···
473
477
</div>
474
478
</div>
475
479
<div class="profile">
480
480
+
<div class="identity-row__names mobile" v-if="env.isMobile">
481
481
+
<span class="header-name">{{ profile?.displayName || profile.handle }}</span>
482
482
+
<a v-if="handleLink" :href="handleLink" target="_blank" class="header-handle"
483
483
+
>@{{ formatUrl(profile.handle) }}</a
484
484
+
>
485
485
+
<span class="header-handle" v-else>@{{ profile?.handle }}</span>
486
486
+
</div>
487
487
+
476
488
<div class="stats">
477
489
<div class="stat alt" v-if="profile.pronouns">
478
490
<span class="stat-count">{{ profile.pronouns }}</span>
···
638
650
padding-bottom: 0;
639
651
display: flex;
640
652
flex-direction: row;
641
641
-
gap: 1rem;
653
653
+
gap: 0.75rem;
642
654
643
655
margin-top: calc((var(--avatar-size) / 2 + 0.75rem) * -1);
644
656
···
671
683
gap: 0.5rem;
672
684
min-width: 0;
673
685
674
674
-
&__names {
675
675
-
flex: 1 1 0%;
676
676
-
min-width: 0;
677
677
-
686
686
+
&__actions {
687
687
+
flex: 0 0 auto;
678
688
display: flex;
679
679
-
flex-direction: column;
689
689
+
gap: 0.25rem;
690
690
+
}
691
691
+
}
692
692
+
}
680
693
681
681
-
span {
682
682
-
display: block;
683
683
-
white-space: nowrap;
684
684
-
overflow: hidden;
685
685
-
text-overflow: ellipsis;
686
686
-
min-width: 0;
687
687
-
}
694
694
+
.identity-row__names {
695
695
+
flex: 1 1 0%;
696
696
+
min-width: 0;
697
697
+
698
698
+
display: flex;
699
699
+
flex-direction: column;
700
700
+
701
701
+
span {
702
702
+
display: block;
703
703
+
white-space: nowrap;
704
704
+
overflow: hidden;
705
705
+
text-overflow: ellipsis;
706
706
+
min-width: 0;
707
707
+
}
688
708
689
689
-
.header-name {
690
690
-
font-weight: 700;
691
691
-
font-size: 1.25rem;
692
692
-
}
693
693
-
.header-handle {
694
694
-
font-size: 0.9rem;
695
695
-
color: hsl(var(--subtext0));
696
696
-
text-decoration: none;
709
709
+
.header-name {
710
710
+
font-weight: 900;
711
711
+
font-size: 1.25rem;
712
712
+
}
713
713
+
.header-handle {
714
714
+
font-size: 0.9rem;
715
715
+
color: hsl(var(--subtext0));
716
716
+
text-decoration: none;
697
717
698
698
-
display: flex;
699
699
-
align-items: center;
700
700
-
gap: 0.25rem;
701
701
-
}
702
702
-
}
718
718
+
display: flex;
719
719
+
align-items: center;
720
720
+
gap: 0.25rem;
721
721
+
}
703
722
704
704
-
&__actions {
705
705
-
flex: 0 0 auto;
706
706
-
display: flex;
707
707
-
gap: 0.5rem;
708
708
-
}
723
723
+
&:not(.mobile) {
709
724
}
710
725
}
711
726
···
720
735
flex-direction: row;
721
736
gap: 0.25rem;
722
737
margin-top: 0.75rem;
738
738
+
overflow-x: auto;
739
739
+
border-radius: 1rem;
723
740
724
741
.stat {
725
742
display: flex;
···
729
746
padding: 0 0.5rem;
730
747
border-radius: 1rem;
731
748
color: hsl(var(--subtext1));
749
749
+
750
750
+
span {
751
751
+
white-space: nowrap;
752
752
+
}
732
753
733
754
.stat-count {
734
755
font-weight: 900;