Skip to content

Commit

Permalink
referral modal
Browse files Browse the repository at this point in the history
  • Loading branch information
tempe-techie committed Dec 29, 2023
1 parent b75fdc5 commit 1a069b7
Show file tree
Hide file tree
Showing 7 changed files with 68 additions and 10 deletions.
1 change: 1 addition & 0 deletions components/navbars/NavbarDesktop.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
<div class="dropdown-menu dropdown-menu-end">
<NuxtLink class="dropdown-item cursor-pointer" to="/profile">Profile</NuxtLink>
<span class="dropdown-item cursor-pointer" data-bs-toggle="modal" data-bs-target="#chatSettingsModal">Settings</span>
<span class="dropdown-item cursor-pointer" data-bs-toggle="modal" data-bs-target="#referralModal">Share referral link</span>
<span class="dropdown-item cursor-pointer" @click="disconnectWallet">Disconnect</span>
</div>
</li>
Expand Down
6 changes: 6 additions & 0 deletions components/profile/PunkProfile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
<i class="bi bi-gear-fill"></i> Other settings
</span>

<span
class="dropdown-item cursor-pointer"
data-bs-toggle="modal" data-bs-target="#referralModal"
>
<i class="bi bi-person-plus-fill"></i> Share referral link
</span>

</div>
</div>
Expand Down
32 changes: 32 additions & 0 deletions components/referrals/ReferralModal.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="modal fade" id="referralModal" tabindex="-1" aria-labelledby="referralModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h1 class="modal-title fs-5" id="referralModalLabel">Share referral link</h1>
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</div>
<div class="modal-body">
<p>Share your referral link and earn referral fees!</p>

<ShareReferralLink />
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
</template>

<script>
import ShareReferralLink from '~/components/referrals/ShareReferralLink.vue';
export default {
name: "ReferralModal",
components: {
ShareReferralLink
}
}
</script>
21 changes: 21 additions & 0 deletions components/referrals/ReferralWidget.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<template>
<div class="card m-2 bg-light">
<div class="card-header bg-light">Your referral link</div>
<div class="card-body sidebar-card-body">
<p>Share your referral link and earn referral fees!</p>
<ShareReferralLink />
</div>
</div>
</template>

<script>
import ShareReferralLink from '~/components/referrals/ShareReferralLink.vue';
export default {
name: "ReferralWidget",
components: {
ShareReferralLink
}
}
</script>
File renamed without changes.
12 changes: 3 additions & 9 deletions components/sidebars/SidebarRight.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,7 @@
<NameMintWidget />

<!-- Referrals -->
<div class="card m-2 bg-light">
<div class="card-header bg-light">Your referral link</div>
<div class="card-body sidebar-card-body">
<p>Share your referral link and earn referral fees!</p>
<ShareReferralLink />
</div>
</div>
<ReferralWidget />

<!-- Playlist -->
<div class="card m-2 bg-light" v-if="$config.showFeatures.spotify">
Expand Down Expand Up @@ -60,7 +54,7 @@ import MintedPostsWidget from '~/components/minted-posts/MintedPostsWidget.vue';
import NameMintWidget from '~/components/names/NameMintWidget.vue';
import SimpleSwapWidget from '~/components/swap/SimpleSwapWidget.vue';
import KeysListWidget from '~/components/keys/KeysListWidget.vue';
import ShareReferralLink from '~/components/ShareReferralLink.vue';
import ReferralWidget from '~/components/referrals/ReferralWidget.vue';
export default {
name: "SidebarRight",
Expand All @@ -70,7 +64,7 @@ export default {
KeysListWidget,
MintedPostsWidget,
NameMintWidget,
ShareReferralLink,
ReferralWidget,
SimpleSwapWidget
},
Expand Down
6 changes: 5 additions & 1 deletion layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,8 @@

<ChatSettingsModal />

<ReferralModal />

</div>

<!-- Do not delete: ugly hack to make "global" work with Vite -->
Expand All @@ -135,16 +137,17 @@ import { useNotificationsStore } from '~/store/notifications';
import { useSidebarStore } from '~/store/sidebars';
import { useSiteStore } from '~/store/site';
import { useUserStore } from '~/store/user';
import { getRpcs } from "~/utils/rpcUtils";
import NavbarDesktop from "~/components/navbars/NavbarDesktop.vue";
import NavbarMobile from "~/components/navbars/NavbarMobile.vue";
import SidebarLeft from "~/components/sidebars/SidebarLeft.vue";
import SidebarRight from "~/components/sidebars/SidebarRight.vue";
import ChatSettingsModal from "~/components/ChatSettingsModal.vue";
import { getActivityPoints } from '~/utils/balanceUtils';
import { getDomainHolder, getDomainName } from '~/utils/domainUtils';
import { getRpcs } from "~/utils/rpcUtils";
import { storeReferrer, storeUsername } from '~/utils/storageUtils';
import VerifyAccountOwnership from '~/components/VerifyAccountOwnership.vue';
import ReferralModal from '~/components/referrals/ReferralModal.vue';
export default {
data() {
Expand All @@ -162,6 +165,7 @@ export default {
ChatSettingsModal,
NavbarDesktop,
NavbarMobile,
ReferralModal,
SidebarLeft,
SidebarRight,
VerifyAccountOwnership
Expand Down

0 comments on commit 1a069b7

Please sign in to comment.