forked from AkkomaGang/akkoma-fe
#417: refresh tab on user profile only
This commit is contained in:
parent
10711f9045
commit
3d30ad1dda
2 changed files with 5 additions and 3 deletions
|
@ -4,7 +4,7 @@ import './tab_switcher.scss'
|
||||||
|
|
||||||
export default Vue.component('tab-switcher', {
|
export default Vue.component('tab-switcher', {
|
||||||
name: 'TabSwitcher',
|
name: 'TabSwitcher',
|
||||||
props: ['renderOnlyFocused'],
|
props: ['refresh', 'renderOnlyFocused'],
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
active: this.$slots.default.findIndex(_ => _.tag)
|
active: this.$slots.default.findIndex(_ => _.tag)
|
||||||
|
@ -12,7 +12,9 @@ export default Vue.component('tab-switcher', {
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
$route () {
|
$route () {
|
||||||
this.activateTab(0)
|
if (this.refresh) {
|
||||||
|
this.active = 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
:switcher="true"
|
:switcher="true"
|
||||||
:selected="timeline.viewing"
|
:selected="timeline.viewing"
|
||||||
/>
|
/>
|
||||||
<tab-switcher :renderOnlyFocused="true">
|
<tab-switcher :refresh="true" :renderOnlyFocused="true">
|
||||||
<Timeline
|
<Timeline
|
||||||
:label="$t('user_card.statuses')"
|
:label="$t('user_card.statuses')"
|
||||||
:disabled="!user.statuses_count"
|
:disabled="!user.statuses_count"
|
||||||
|
|
Loading…
Reference in a new issue