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
|
@ -109,11 +109,13 @@ class NavigationController extends Controller {
|
||||||
$data = [
|
$data = [
|
||||||
'serverData' => [
|
'serverData' => [
|
||||||
'public' => false,
|
'public' => false,
|
||||||
|
'firstrun' => false,
|
||||||
]
|
]
|
||||||
];
|
];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->actorService->createActor($this->userId, $this->userId);
|
$this->actorService->createActor($this->userId, $this->userId);
|
||||||
|
$data['serverData']['firstrun'] = true;
|
||||||
} catch (AccountAlreadyExistsException $e) {
|
} catch (AccountAlreadyExistsException $e) {
|
||||||
// we do nothing
|
// we do nothing
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,14 +1,16 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="social__wrapper">
|
<div class="social__wrapper">
|
||||||
<div class="social__container">
|
<div class="social__container">
|
||||||
<div v-if="!infoHidden" class="social__welcome">
|
<transition name="slide-fade">
|
||||||
<a class="close icon-close" href="#" @click="hideInfo()"><span class="hidden-visually">Close</span></a>
|
<div v-if="showInfo" class="social__welcome">
|
||||||
<h2>🎉 {{ t('social', 'Nextcloud becomes part of the federated social networks!') }}</h2>
|
<a class="close icon-close" href="#" @click="hideInfo()"><span class="hidden-visually">Close</span></a>
|
||||||
<p>
|
<h2>🎉 {{ t('social', 'Nextcloud becomes part of the federated social networks!') }}</h2>
|
||||||
{{ t('social', 'We automatically created a social account for you. Your social ID is the same as your federated cloud ID:') }}
|
<p>
|
||||||
<span class="social-id">{{ socialId }}</span>
|
{{ t('social', 'We automatically created a social account for you. Your social ID is the same as your federated cloud ID:') }}
|
||||||
</p>
|
<span class="social-id">{{ socialId }}</span>
|
||||||
</div>
|
</p>
|
||||||
|
</div>
|
||||||
|
</transition>
|
||||||
<div class="social__timeline">
|
<div class="social__timeline">
|
||||||
<div class="new-post" data-id="">
|
<div class="new-post" data-id="">
|
||||||
<div class="new-post-author">
|
<div class="new-post-author">
|
||||||
|
@ -136,6 +138,19 @@
|
||||||
position: relative;
|
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>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -173,6 +188,9 @@ export default {
|
||||||
timeline: function() {
|
timeline: function() {
|
||||||
return this.$store.getters.getTimeline
|
return this.$store.getters.getTimeline
|
||||||
},
|
},
|
||||||
|
showInfo() {
|
||||||
|
return this.$store.getters.getServerData.firstrun && !this.infoHidden
|
||||||
|
},
|
||||||
menu: function() {
|
menu: function() {
|
||||||
let defaultCategories = [
|
let defaultCategories = [
|
||||||
{
|
{
|
||||||
|
|
Ładowanie…
Reference in New Issue