mirror of https://github.com/FreeTubeApp/FreeTube
Landing page logic fix (#4378)
* Push fix * Fix bug * Prevent subscribe dropdown from opening on SubscribedChannels route
This commit is contained in:
parent
d8d6196dfe
commit
16050c79d9
|
@ -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 })
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
},
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
:channel-id="channel.id"
|
||||
:channel-name="channel.name"
|
||||
:channel-thumbnail="channel.thumbnail"
|
||||
:open-dropdown-on-subscribe="false"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue