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

feat: teams page tweaks #5054

Merged
merged 4 commits into from
Nov 1, 2023
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
24 changes: 20 additions & 4 deletions src/pages/LendingTeams/TeamLeaderboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
Member Count:
</template>
</h4>
<kv-tabs class="tw-px-1" @tab-changed="handleTabChanged">
<kv-tabs
class="tw-px-1"
:class="{ 'members-tabs' : showMembersText, 'tw-pb-2' : showMembersText && isLoading }"
@tab-changed="handleTabChanged"
>
<template #tabNav>
<kv-tab
for-panel="thisMonth"
Expand All @@ -35,6 +39,9 @@
</kv-tab>
</template>
<template #tabPanels>
<p v-if="showMembersText" class="tw-text-small tw-my-0.5">
Only members who have lent at least once are counted
</p>
<kv-tab-panel
v-for="timeFrame in ['thisMonth', 'lastMonth', 'allTime']"
:id="timeFrame"
Expand Down Expand Up @@ -72,7 +79,7 @@
tw-overflow-hidden tw-whitespace-nowrap"
>
<div
class="tw-flex tw-flex-nowrap tw-flex-none tw-w-full"
class="tw-flex tw-flex-col tw-flex-nowrap tw-flex-none tw-w-full"
>
<div class="tw-flex-1 tw-overflow-hidden tw-text-ellipsis tw-text-base">
<router-link
Expand All @@ -87,10 +94,10 @@
</div>
<div class="tw-flex-none tw-ml-1">
<template v-if="!isNewMembers">
{{ numeral(leaderboardTeam.value).format('$0,0a') }}
{{ numeral(leaderboardTeam.value).format('$0,0') }}
</template>
<template v-else>
{{ numeral(leaderboardTeam.value).format('0,0a') }}
{{ numeral(leaderboardTeam.value).format('0,0') }}
</template>
</div>
</div>
Expand Down Expand Up @@ -176,6 +183,9 @@ export default {
if (this.isNewMembers) {
return 'Total Amount of Members the Team has';
} return 'Total Amount the Team has lent';
},
showMembersText() {
return this.isNewMembers && [0, 1].includes(this.selectedTabIndex);
}
},
methods: {
Expand Down Expand Up @@ -207,3 +217,9 @@ export default {
},
};
</script>

<style scoped lang="postcss">
.members-tabs >>> div {
@apply tw-mb-0;
}
</style>
1 change: 1 addition & 0 deletions src/pages/LendingTeams/TeamListing.vue
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@
>
<p
class="tw-text-small tw-text-primary tw-flex-1"
v-if="team.loanBecause"
>
We loan because: {{ shortLoanBecause(team.loanBecause) }}
</p>
Expand Down
Loading