-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Friends): combine friends routes (#801)
- Loading branch information
Matt Wisniewski
committed
Dec 27, 2021
1 parent
0b7116f
commit 97df405
Showing
6 changed files
with
65 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,57 @@ | ||
<div id="friends-list" v-scroll-lock="true" class="hidden-scroll"> | ||
<UiScroll verticalScroll enableWrap scrollbarVisibility="scroll"> | ||
<FriendsNav :setRoute="setRoute" :route="route" /> | ||
<div v-if="$data.route === 'active'"> | ||
<div v-if="dataState.friends !== DataStateType.Loading"> | ||
<div v-for="entry in Object.entries(alphaSortedFriends)"> | ||
<span class="alpha-divider">{{entry[0].toUpperCase()}}</span> | ||
<div v-for="friend in entry[1]"> | ||
<FriendsFriend :friend="friend" :key="friend.address" /> | ||
<!--<FriendsNav :setRoute="setRoute" :route="route" />--> | ||
<div class="columns"> | ||
<div class="column is-half-desktop"> | ||
<!-- Friends Add --> | ||
<FriendsAdd /> | ||
<!-- Friend Requests --> | ||
<div v-if="friends.incomingRequests.length" class="padded_divider"> | ||
<TypographyHorizontalRuleText plaintext :value="$t('friends.requests')" /> | ||
</div> | ||
<FriendsFriend | ||
v-for="friend in friends.incomingRequests" | ||
:friend="{ | ||
name: friend.userInfo.name, | ||
address: friend.from, | ||
state: 'offline', | ||
status: friend.userInfo.status, | ||
request: friend | ||
}" | ||
:key="friend.from" | ||
request | ||
/> | ||
</div> | ||
<div class="column is-half-desktop"> | ||
<!-- Friends List --> | ||
<div v-if="Object.entries(alphaSortedFriends).length && $device.isMobile" class="padded_divider"> | ||
<TypographyHorizontalRuleText plaintext :value="$t('friends.all')" /> | ||
</div> | ||
<div v-if="dataState.friends !== DataStateType.Loading"> | ||
<div v-for="entry in Object.entries(alphaSortedFriends)"> | ||
<span class="alpha-divider">{{entry[0].toUpperCase()}}</span> | ||
<FriendsFriend v-for="friend in entry[1]" :friend="friend" :key="friend.address" /> | ||
</div> | ||
<div | ||
class="loading-container" | ||
v-if="dataState.friends === DataStateType.Updating" | ||
> | ||
<UiLoadersUpdating /> | ||
</div> | ||
</div> | ||
<div | ||
class="loading-container" | ||
v-if="dataState.friends === DataStateType.Updating" | ||
> | ||
<UiLoadersUpdating /> | ||
<div v-else> | ||
<UiLoadersFriend :count="5" /> | ||
</div> | ||
<div v-if="Object.entries($mock.blocked).length" class="padded_divider"> | ||
<TypographyHorizontalRuleText plaintext :value="$t('friends.blocked')" /> | ||
</div> | ||
<FriendsFriend | ||
v-for="friend in $mock.blocked" | ||
:friend="friend" | ||
:key="friend.address" | ||
blocked | ||
/> | ||
</div> | ||
<div v-else> | ||
<UiLoadersFriend :count="5" /> | ||
</div> | ||
</div> | ||
<div v-if="$data.route === 'requests'"> | ||
<FriendsFriend | ||
v-for="friend in friends.incomingRequests" | ||
:friend="{ | ||
name: friend.userInfo.name, | ||
address: friend.from, | ||
state: 'offline', | ||
status: friend.userInfo.status, | ||
request: friend | ||
}" | ||
:key="friend.from" | ||
request | ||
/> | ||
</div> | ||
<div v-if="$data.route === 'blocked'"> | ||
<FriendsFriend | ||
v-for="friend in $mock.blocked" | ||
:friend="friend" | ||
:key="friend.address" | ||
blocked | ||
/> | ||
</div> | ||
<div v-if="$data.route === 'add'"> | ||
<FriendsAdd /> | ||
</div> | ||
</UiScroll> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters