Landing page logic fix (#4378)

* Push fix

* Fix bug

* Prevent subscribe dropdown from opening on SubscribedChannels route
This commit is contained in:
Jason 2023-11-24 22:15:47 +00:00 committed by GitHub
parent d8d6196dfe
commit 16050c79d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 3 deletions

View File

@ -183,8 +183,8 @@ export default defineComponent({
})
this.$router.onReady(() => {
if (this.$router.currentRoute.path !== this.landingPage && this.landingPage !== '/subscriptions') {
this.$router.push({ path: this.landingPage })
if (this.$router.currentRoute.path === '/' && this.landingPage !== '/subscriptions') {
this.$router.replace({ path: this.landingPage })
}
})
})

View File

@ -29,6 +29,10 @@ export default defineComponent({
type: Boolean,
default: false
},
openDropdownOnSubscribe: {
type: Boolean,
default: true
},
subscriptionCountText: {
default: '',
type: String,
@ -152,7 +156,7 @@ export default defineComponent({
}
}
if (this.isProfileDropdownEnabled && !this.isProfileDropdownOpen) {
if (this.isProfileDropdownEnabled && this.openDropdownOnSubscribe && !this.isProfileDropdownOpen) {
this.toggleProfileDropdown()
}
},

View File

@ -56,6 +56,7 @@
:channel-id="channel.id"
:channel-name="channel.name"
:channel-thumbnail="channel.thumbnail"
:open-dropdown-on-subscribe="false"
/>
</div>
</div>