Show subscription page only if profile is local
This commit is contained in:
parent
cb35d88d77
commit
e1e4ae4333
2 changed files with 9 additions and 1 deletions
|
@ -436,6 +436,7 @@ export default class ProfileView extends Vue {
|
|||
Boolean(this.store.instance?.blockchain_features?.subscription) &&
|
||||
this.profile !== null &&
|
||||
getVerifiedEthereumAddress(this.profile) !== null &&
|
||||
this.isLocalUser() &&
|
||||
!this.isCurrentUser()
|
||||
)
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<div id="main" v-if="profile">
|
||||
<div id="main" v-if="profile && isLocalUser()">
|
||||
<div class="content">
|
||||
<component
|
||||
:is="isCurrentUser() ? SubscriptionSetup : Subscription"
|
||||
|
@ -32,6 +32,13 @@ onMounted(async () => {
|
|||
)
|
||||
})
|
||||
|
||||
function isLocalUser(): boolean {
|
||||
if (!profile) {
|
||||
return false
|
||||
}
|
||||
return profile.username === profile.acct
|
||||
}
|
||||
|
||||
function isCurrentUser(): boolean {
|
||||
if (!currentUser || !profile) {
|
||||
return false
|
||||
|
|
Loading…
Reference in a new issue