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) &&
|
Boolean(this.store.instance?.blockchain_features?.subscription) &&
|
||||||
this.profile !== null &&
|
this.profile !== null &&
|
||||||
getVerifiedEthereumAddress(this.profile) !== null &&
|
getVerifiedEthereumAddress(this.profile) !== null &&
|
||||||
|
this.isLocalUser() &&
|
||||||
!this.isCurrentUser()
|
!this.isCurrentUser()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<template>
|
<template>
|
||||||
<div id="main" v-if="profile">
|
<div id="main" v-if="profile && isLocalUser()">
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<component
|
<component
|
||||||
:is="isCurrentUser() ? SubscriptionSetup : Subscription"
|
: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 {
|
function isCurrentUser(): boolean {
|
||||||
if (!currentUser || !profile) {
|
if (!currentUser || !profile) {
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue