-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7843e5b
commit a8f3625
Showing
7 changed files
with
192 additions
and
13 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
<template> | ||
<Head> | ||
<Title>Activity Points | {{ $config.projectMetadataTitle }}</Title> | ||
<Meta property="og:title" :content="'Activity Points | ' + $config.projectMetadataTitle" /> | ||
</Head> | ||
|
||
<div class="card border scroll-500"> | ||
<div class="card-body"> | ||
<p class="fs-3" @click="$router.back()"> | ||
<i class="bi bi-arrow-left-circle cursor-pointer"></i> | ||
</p> | ||
|
||
<h3 class="mb-3 mt-3">Activity Points</h3> | ||
|
||
<p class="text-break mt-3"> | ||
Your current Activity Points balance: | ||
</p> | ||
|
||
<!-- Input field --> | ||
<div class="row"> | ||
<div class="col-md-5"> | ||
<div class="input-group"> | ||
<input | ||
:value="userStore.getCurentUserActivityPoints" | ||
type="text" | ||
class="form-control" | ||
disabled | ||
> | ||
|
||
<button class="btn btn-primary disabled" type="button" data-bs-toggle="dropdown" aria-expanded="false"> | ||
Activity Points | ||
</button> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<p class="text-break mt-4 mb-3"> | ||
By actively using {{ $config.projectName }} features, you can earn more Activity Points. | ||
</p> | ||
|
||
</div> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { useEthers } from 'vue-dapp'; | ||
import { useUserStore } from '~/store/user'; | ||
import { getActivityPoints } from '~/utils/balanceUtils'; | ||
export default { | ||
name: 'ActivityPoints', | ||
mounted() { | ||
this.fetchActivityPoints(); | ||
}, | ||
methods: { | ||
getActivityPoints, | ||
async fetchActivityPoints() { | ||
if (this.$config.activityPointsAddress && this.address) { | ||
this.toast.info("Refreshing activity points...", { timeout: 2000 }); | ||
const activityPoints = await this.getActivityPoints(this.address); | ||
this.userStore.setCurrentUserActivityPoints(activityPoints); | ||
} | ||
} | ||
}, | ||
setup() { | ||
const { address } = useEthers(); | ||
const userStore = useUserStore(); | ||
return { address, userStore } | ||
}, | ||
} | ||
</script> |
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
a8f3625
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
iggy-social-frontend – ./
iggy-social-frontend.vercel.app
iggy-social-frontend-git-main-punk-domains.vercel.app
iggy-social-frontend-punk-domains.vercel.app
demo2.iggy.social