Merge pull request #141 from nextcloud-gmbh/enhancement/127/suggest-follow

Suggest to follow Nextcloud on mastodon on first use
alpha1
Julius Härtl 2018-12-05 13:18:17 +01:00 zatwierdzone przez GitHub
commit 7afb4e5a7e
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 30 dodań i 3 usunięć

Wyświetl plik

@ -5,9 +5,14 @@
<a class="close icon-close" href="#" @click="hideInfo()"><span class="hidden-visually">Close</span></a>
<h2>🎉 {{ t('social', 'Nextcloud becomes part of the federated social networks!') }}</h2>
<p>
{{ t('social', 'We automatically created a social account for you. Your social ID is the same as your federated cloud ID:') }}
{{ t('social', 'We automatically created a Social account for you. Your Social ID is the same as your federated cloud ID:') }}
<span class="social-id">{{ socialId }}</span>
</p>
<div ng-show="followingNextcloud" class="follow-nextcloud">
<p>{{ t('social', 'Since you are new to Social, start by following the official Nextcloud account so you don\'t miss any news') }}</p>
<input :value="t('social', 'Follow Nextcloud on mastodon.xyz')" type="button" class="primary"
@click="followNextcloud">
</div>
</div>
</transition>
<composer />
@ -44,6 +49,15 @@
font-weight: bold;
}
.social__welcome .follow-nextcloud {
overflow: hidden;
margin-top: 20px;
}
.social__welcome .follow-nextcloud input[type=button] {
float: right;
}
.social__timeline {
max-width: 600px;
margin: 15px auto;
@ -78,6 +92,7 @@ import InfiniteLoading from 'vue-infinite-loading'
import TimelineEntry from './../components/TimelineEntry'
import Composer from './../components/Composer'
import CurrentUserMixin from './../mixins/currentUserMixin'
import follow from './../mixins/follow'
import EmptyContent from './../components/EmptyContent'
import TimelineList from './../components/TimelineList'
@ -93,10 +108,17 @@ export default {
EmptyContent,
TimelineList
},
mixins: [CurrentUserMixin],
mixins: [
CurrentUserMixin,
follow
],
data: function() {
return {
infoHidden: false
infoHidden: false,
followingNextcloud: false,
item: {
account: 'nextcloud@mastodon.xyz'
}
}
},
computed: {
@ -116,6 +138,11 @@ export default {
methods: {
hideInfo() {
this.infoHidden = true
},
followNextcloud() {
this.follow().then(() => {
this.followingNextcloud = true
})
}
}
}