share: prevent init screen on shares (fix #562)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/743/head
Varun Patil 2023-06-26 14:53:32 -07:00
parent 2fda196cbf
commit e6597844f7
3 changed files with 10 additions and 4 deletions

View File

@ -76,7 +76,10 @@ class PublicAlbumController extends Controller
if ($uid === $album['user'] || $this->albumsQuery->userIsCollaborator($uid, $albumId)) {
$idStr = $album['user'].'/'.$album['name'];
$url = $this->urlGenerator->linkToRoute('memories.Page.albums', ['id' => $idStr]);
$url = $this->urlGenerator->linkToRoute('memories.Page.albums', [
'id' => $idStr, // id of album
'noinit' => 1, // prevent showing first-start page
]);
return new RedirectResponse($url);
}

View File

@ -209,7 +209,10 @@ class PublicController extends AuthPublicShareController
$relPath = substr($relPath, \strlen($foldersPath));
// Redirect to the local path
$url = $this->urlGenerator->linkToRouteAbsolute('memories.Page.folder', ['path' => $relPath]);
$url = $this->urlGenerator->linkToRouteAbsolute('memories.Page.folder', [
'path' => $relPath, // path to folder
'noinit' => 1, // prevent showing first-start page
]);
// Cannot send a redirect response here because the return
// type is a template response for the base class

View File

@ -184,8 +184,8 @@ export default defineComponent({
isFirstStart(): boolean {
return (
this.config.timeline_path === 'EMPTY' &&
this.$route.name !== 'folder-share' &&
this.$route.name !== 'album-share'
!this.routeIsPublic &&
!this.$route.query.noinit
);
},