forked from jsnbuchanan/crowd-funder-for-time-pwa
add "+" to numbers if hit limit (>50), fix linting
This commit is contained in:
@@ -210,7 +210,7 @@
|
||||
class="block text-center text-6xl"
|
||||
data-testId="newDirectOffersActivityNumber"
|
||||
>
|
||||
{{ numNewOffersToUser }}
|
||||
{{ numNewOffersToUser }}{{ newOffersToUserHitLimit ? "+" : "" }}
|
||||
</span>
|
||||
<p>new offer{{ numNewOffersToUser === 1 ? "" : "s" }} to you</p>
|
||||
</div>
|
||||
@@ -222,7 +222,8 @@
|
||||
class="block text-center text-6xl"
|
||||
data-testId="newOffersToUserProjectsActivityNumber"
|
||||
>
|
||||
{{ numNewOffersToUserProjects }}
|
||||
{{ numNewOffersToUserProjects
|
||||
}}{{ newOffersToUserProjectsHitLimit ? "+" : "" }}
|
||||
</span>
|
||||
<p>
|
||||
new offer{{ numNewOffersToUserProjects === 1 ? "" : "s" }} to your
|
||||
@@ -461,6 +462,8 @@ export default class HomeView extends Vue {
|
||||
isRegistered = false;
|
||||
lastAckedOfferToUserJwtId?: string; // the last JWT ID for offer-to-user that they've acknowledged seeing
|
||||
lastAckedOfferToUserProjectsJwtId?: string; // the last JWT ID for offers-to-user's-projects that they've acknowledged seeing
|
||||
newOffersToUserHitLimit: boolean = false;
|
||||
newOffersToUserProjectsHitLimit: boolean = false;
|
||||
numNewOffersToUser: number = 0; // number of new offers-to-user
|
||||
numNewOffersToUserProjects: number = 0; // number of new offers-to-user's-projects
|
||||
searchBoxes: Array<{
|
||||
@@ -529,25 +532,25 @@ export default class HomeView extends Vue {
|
||||
this.updateAllFeed();
|
||||
|
||||
if (this.activeDid) {
|
||||
this.numNewOffersToUser = (
|
||||
await getNewOffersToUser(
|
||||
this.axios,
|
||||
this.apiServer,
|
||||
this.activeDid,
|
||||
this.lastAckedOfferToUserJwtId,
|
||||
)
|
||||
).length;
|
||||
const offersToUserData = await getNewOffersToUser(
|
||||
this.axios,
|
||||
this.apiServer,
|
||||
this.activeDid,
|
||||
this.lastAckedOfferToUserJwtId,
|
||||
);
|
||||
this.numNewOffersToUser = offersToUserData.data.length;
|
||||
this.newOffersToUserHitLimit = offersToUserData.hitLimit;
|
||||
}
|
||||
|
||||
if (this.activeDid) {
|
||||
this.numNewOffersToUserProjects = (
|
||||
await getNewOffersToUserProjects(
|
||||
this.axios,
|
||||
this.apiServer,
|
||||
this.activeDid,
|
||||
this.lastAckedOfferToUserProjectsJwtId,
|
||||
)
|
||||
).length;
|
||||
const offersToUserProjects = await getNewOffersToUserProjects(
|
||||
this.axios,
|
||||
this.apiServer,
|
||||
this.activeDid,
|
||||
this.lastAckedOfferToUserProjectsJwtId,
|
||||
);
|
||||
this.numNewOffersToUserProjects = offersToUserProjects.data.length;
|
||||
this.newOffersToUserProjectsHitLimit = offersToUserProjects.hitLimit;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
|
||||
Reference in New Issue
Block a user