From 6c2bf54bde43f6cdf14430067bf43b3899c4a384 Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sat, 25 May 2019 00:32:22 -0600 Subject: [PATCH] Update Post and Profile components --- resources/assets/js/components/PostComponent.vue | 10 ++++++++++ resources/assets/js/components/Profile.vue | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/resources/assets/js/components/PostComponent.vue b/resources/assets/js/components/PostComponent.vue index fc7b8b986..aa5e0bb84 100644 --- a/resources/assets/js/components/PostComponent.vue +++ b/resources/assets/js/components/PostComponent.vue @@ -490,6 +490,16 @@ export default { } }, + beforeMount() { + let u = new URLSearchParams(window.location.search); + if(u.has('ui') && u.get('ui') == 'moment' && this.profileLayout != 'moment') { + this.profileLayout = 'moment'; + } + if(u.has('ui') && u.get('ui') == 'metro' && this.profileLayout != 'metro') { + this.profileLayout = 'metro'; + } + }, + mounted() { this.fetchRelationships(); }, diff --git a/resources/assets/js/components/Profile.vue b/resources/assets/js/components/Profile.vue index 1f397f66a..e33724b36 100644 --- a/resources/assets/js/components/Profile.vue +++ b/resources/assets/js/components/Profile.vue @@ -546,6 +546,13 @@ export default { $('nav.navbar').hide(); $('body').prepend('
' + this.profileUsername + '
'); } + let u = new URLSearchParams(window.location.search); + if(u.has('ui') && u.get('ui') == 'moment' && this.profileLayout != 'moment') { + this.profileLayout = 'moment'; + } + if(u.has('ui') && u.get('ui') == 'metro' && this.profileLayout != 'metro') { + this.profileLayout = 'metro'; + } }, mounted() {