forked from AkkomaGang/akkoma-fe
Merge branch 'remote-follow-button' into 'develop'
Add remote follow button to local user profiles. See merge request pleroma/pleroma-fe!198
This commit is contained in:
commit
97854eec58
3 changed files with 27 additions and 1 deletions
|
@ -22,6 +22,11 @@ export default {
|
||||||
isOtherUser () {
|
isOtherUser () {
|
||||||
return this.user.id !== this.$store.state.users.currentUser.id
|
return this.user.id !== this.$store.state.users.currentUser.id
|
||||||
},
|
},
|
||||||
|
subscribeUrl () {
|
||||||
|
// eslint-disable-next-line no-undef
|
||||||
|
const serverUrl = new URL(this.user.statusnet_profile_url)
|
||||||
|
return `${serverUrl.protocol}//${serverUrl.host}/main/ostatus`
|
||||||
|
},
|
||||||
loggedIn () {
|
loggedIn () {
|
||||||
return this.$store.state.users.currentUser
|
return this.$store.state.users.currentUser
|
||||||
},
|
},
|
||||||
|
|
|
@ -46,6 +46,15 @@
|
||||||
</button>
|
</button>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="remote-follow" v-if='!loggedIn && user.is_local'>
|
||||||
|
<form method="POST" :action='subscribeUrl'>
|
||||||
|
<input type="hidden" name="nickname" :value="user.screen_name">
|
||||||
|
<input type="hidden" name="profile" value="">
|
||||||
|
<button click="submit" class="remote-button base05 base02-background">
|
||||||
|
{{ $t('user_card.remote_follow') }}
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
<div class='block' v-if='isOtherUser && loggedIn'>
|
<div class='block' v-if='isOtherUser && loggedIn'>
|
||||||
<span v-if='user.statusnet_blocking'>
|
<span v-if='user.statusnet_blocking'>
|
||||||
<button @click="unblockUser" class="base04 base00-background pressed">
|
<button @click="unblockUser" class="base04 base00-background pressed">
|
||||||
|
@ -182,6 +191,11 @@
|
||||||
min-height: 28px;
|
min-height: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.remote-follow {
|
||||||
|
max-width: 220px;
|
||||||
|
min-height: 28px;
|
||||||
|
}
|
||||||
|
|
||||||
.follow {
|
.follow {
|
||||||
max-width: 220px;
|
max-width: 220px;
|
||||||
min-height: 28px;
|
min-height: 28px;
|
||||||
|
@ -191,6 +205,12 @@
|
||||||
width: 92%;
|
width: 92%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.remote-button {
|
||||||
|
height: 28px !important;
|
||||||
|
width: 92%;
|
||||||
|
}
|
||||||
|
|
||||||
.pressed {
|
.pressed {
|
||||||
border-bottom-color: rgba(255, 255, 255, 0.2);
|
border-bottom-color: rgba(255, 255, 255, 0.2);
|
||||||
border-top-color: rgba(0, 0, 0, 0.2);
|
border-top-color: rgba(0, 0, 0, 0.2);
|
||||||
|
|
|
@ -208,7 +208,8 @@ const en = {
|
||||||
muted: 'Muted',
|
muted: 'Muted',
|
||||||
followers: 'Followers',
|
followers: 'Followers',
|
||||||
followees: 'Following',
|
followees: 'Following',
|
||||||
per_day: 'per day'
|
per_day: 'per day',
|
||||||
|
remote_follow: 'Remote follow'
|
||||||
},
|
},
|
||||||
timeline: {
|
timeline: {
|
||||||
show_new: 'Show new',
|
show_new: 'Show new',
|
||||||
|
|
Loading…
Reference in a new issue