kopia lustrzana https://github.com/nextcloud/social
Add animation and hide info after first run
Signed-off-by: Julius Härtl <jus@bitgrid.net>pull/17/head
rodzic
eed877e857
commit
a2433b8fef
lib/Controller
src/views
|
@ -109,11 +109,13 @@ class NavigationController extends Controller {
|
|||
$data = [
|
||||
'serverData' => [
|
||||
'public' => false,
|
||||
'firstrun' => false,
|
||||
]
|
||||
];
|
||||
|
||||
try {
|
||||
$this->actorService->createActor($this->userId, $this->userId);
|
||||
$data['serverData']['firstrun'] = true;
|
||||
} catch (AccountAlreadyExistsException $e) {
|
||||
// we do nothing
|
||||
}
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
<template>
|
||||
<div class="social__wrapper">
|
||||
<div class="social__container">
|
||||
<div v-if="!infoHidden" class="social__welcome">
|
||||
<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:') }}
|
||||
<span class="social-id">{{ socialId }}</span>
|
||||
</p>
|
||||
</div>
|
||||
<transition name="slide-fade">
|
||||
<div v-if="showInfo" class="social__welcome">
|
||||
<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:') }}
|
||||
<span class="social-id">{{ socialId }}</span>
|
||||
</p>
|
||||
</div>
|
||||
</transition>
|
||||
<div class="social__timeline">
|
||||
<div class="new-post" data-id="">
|
||||
<div class="new-post-author">
|
||||
|
@ -136,6 +138,19 @@
|
|||
position: relative;
|
||||
}
|
||||
|
||||
.slide-fade-leave-active {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: all .5s ease-out;
|
||||
max-height: 200px;
|
||||
}
|
||||
.slide-fade-leave-to {
|
||||
max-height: 0;
|
||||
opacity: 0;
|
||||
padding-top: 0;
|
||||
padding-bottom: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
<script>
|
||||
|
@ -173,6 +188,9 @@ export default {
|
|||
timeline: function() {
|
||||
return this.$store.getters.getTimeline
|
||||
},
|
||||
showInfo() {
|
||||
return this.$store.getters.getServerData.firstrun && !this.infoHidden
|
||||
},
|
||||
menu: function() {
|
||||
let defaultCategories = [
|
||||
{
|
||||
|
|
Ładowanie…
Reference in New Issue