From 4831379d131505f7ebc109edc142e63182c44275 Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Fri, 13 Aug 2021 16:56:27 +0200
Subject: [PATCH 1/4] Allow prop for EventBanner to be null
Signed-off-by: Thomas Citharel
---
js/src/components/Event/EventBanner.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/components/Event/EventBanner.vue b/js/src/components/Event/EventBanner.vue
index f2d429ab2..5e653725d 100644
--- a/js/src/components/Event/EventBanner.vue
+++ b/js/src/components/Event/EventBanner.vue
@@ -15,7 +15,7 @@ import LazyImageWrapper from "../Image/LazyImageWrapper.vue";
},
})
export default class EventBanner extends Vue {
- @Prop({ required: true, default: null, type: Object as PropType })
+ @Prop({ default: null, type: Object as PropType })
picture!: IMedia | null;
}
From d71e76d6921c4d630e1ec2f53964e664f44962d4 Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Fri, 13 Aug 2021 16:56:51 +0200
Subject: [PATCH 2/4] Fix some queries being called even when not logged-in
Signed-off-by: Thomas Citharel
---
js/src/components/NavBar.vue | 2 +-
js/src/views/Event/Event.vue | 1 +
js/src/views/Home.vue | 4 +++-
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue
index 44a892aef..834de6654 100644
--- a/js/src/components/NavBar.vue
+++ b/js/src/components/NavBar.vue
@@ -216,7 +216,7 @@ import RouteName from "../router/name";
loggedUser: {
query: USER_SETTINGS,
skip() {
- return this.currentUser.isLoggedIn === false;
+ return !this.currentUser || this.currentUser.isLoggedIn === false;
},
},
},
diff --git a/js/src/views/Event/Event.vue b/js/src/views/Event/Event.vue
index 31e4fe785..5ac44b715 100755
--- a/js/src/views/Event/Event.vue
+++ b/js/src/views/Event/Event.vue
@@ -592,6 +592,7 @@ import { eventMetaDataList } from "../../services/EventMetadata";
},
skip() {
return (
+ !this.currentActor.id ||
!this.event?.attributedTo ||
!this.event?.attributedTo?.preferredUsername
);
diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue
index fe2110ff9..3aca6994d 100644
--- a/js/src/views/Home.vue
+++ b/js/src/views/Home.vue
@@ -372,7 +372,9 @@ import Subtitle from "../components/Utils/Subtitle.vue";
currentUser: CURRENT_USER_CLIENT,
loggedUser: {
query: USER_SETTINGS,
- fetchPolicy: "no-cache",
+ skip() {
+ return !this.currentUser || this.currentUser.isLoggedIn === false;
+ },
error() {
return null;
},
From e781fd5b495e956191d2c2a390af1179bb352e2e Mon Sep 17 00:00:00 2001
From: Thomas Citharel
Date: Fri, 13 Aug 2021 17:00:21 +0200
Subject: [PATCH 3/4] Fix search on 404 page
Signed-off-by: Thomas Citharel
---
js/src/views/PageNotFound.vue | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/views/PageNotFound.vue b/js/src/views/PageNotFound.vue
index dc0412ad7..27fab110b 100644
--- a/js/src/views/PageNotFound.vue
+++ b/js/src/views/PageNotFound.vue
@@ -38,7 +38,7 @@
}}
-