Add Atom feed link to profile menu
This commit is contained in:
parent
85cd892827
commit
609d7b0ae8
1 changed files with 16 additions and 1 deletions
|
@ -15,7 +15,6 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
v-if="!isLocalUser() || canConnectWallet() || canConfigureSubscription() || canSubscribe() || canHideReposts() || canShowReposts() || canHideReplies() || canShowReplies()"
|
|
||||||
class="dropdown-menu-wrapper"
|
class="dropdown-menu-wrapper"
|
||||||
v-click-away="hideProfileMenu"
|
v-click-away="hideProfileMenu"
|
||||||
>
|
>
|
||||||
|
@ -33,6 +32,14 @@
|
||||||
>
|
>
|
||||||
Open profile page
|
Open profile page
|
||||||
</a>
|
</a>
|
||||||
|
</li>
|
||||||
|
<li v-if="isLocalUser()">
|
||||||
|
<a
|
||||||
|
:href="feedUrl"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
Atom feed
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li v-if="canConnectWallet()">
|
<li v-if="canConnectWallet()">
|
||||||
<a
|
<a
|
||||||
|
@ -160,6 +167,7 @@ import Avatar from "@/components/Avatar.vue"
|
||||||
import PostList from "@/components/PostList.vue"
|
import PostList from "@/components/PostList.vue"
|
||||||
import ProfileListItem from "@/components/ProfileListItem.vue"
|
import ProfileListItem from "@/components/ProfileListItem.vue"
|
||||||
import Sidebar from "@/components/Sidebar.vue"
|
import Sidebar from "@/components/Sidebar.vue"
|
||||||
|
import { BACKEND_URL } from "@/constants"
|
||||||
import { useInstanceInfo } from "@/store/instance"
|
import { useInstanceInfo } from "@/store/instance"
|
||||||
import { useCurrentUser } from "@/store/user"
|
import { useCurrentUser } from "@/store/user"
|
||||||
import { getWallet } from "@/utils/ethereum"
|
import { getWallet } from "@/utils/ethereum"
|
||||||
|
@ -343,6 +351,13 @@ export default class ProfileView extends Vue {
|
||||||
return this.profile.username === this.profile.acct
|
return this.profile.username === this.profile.acct
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get feedUrl(): string {
|
||||||
|
if (!this.profile || !this.isLocalUser()) {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
return `${BACKEND_URL}/feeds/${this.profile.username}`
|
||||||
|
}
|
||||||
|
|
||||||
canConnectWallet(): boolean {
|
canConnectWallet(): boolean {
|
||||||
return Boolean(this.store.instance?.blockchain_contract_address) && !this.walletConnected
|
return Boolean(this.store.instance?.blockchain_contract_address) && !this.walletConnected
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue