Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Hau Vo
pleroma-fe
Commits
5a0bb29f
Commit
5a0bb29f
authored
Mar 03, 2019
by
Dave LiPuma
Browse files
#417: reset tab from the outside
parent
3d30ad1d
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/components/tab_switcher/tab_switcher.js
View file @
5a0bb29f
...
@@ -4,19 +4,12 @@ import './tab_switcher.scss'
...
@@ -4,19 +4,12 @@ import './tab_switcher.scss'
export
default
Vue
.
component
(
'
tab-switcher
'
,
{
export
default
Vue
.
component
(
'
tab-switcher
'
,
{
name
:
'
TabSwitcher
'
,
name
:
'
TabSwitcher
'
,
props
:
[
'
refresh
'
,
'
renderOnlyFocused
'
],
props
:
[
'
renderOnlyFocused
'
],
data
()
{
data
()
{
return
{
return
{
active
:
this
.
$slots
.
default
.
findIndex
(
_
=>
_
.
tag
)
active
:
this
.
$slots
.
default
.
findIndex
(
_
=>
_
.
tag
)
}
}
},
},
watch
:
{
$route
()
{
if
(
this
.
refresh
)
{
this
.
active
=
0
}
}
},
methods
:
{
methods
:
{
activateTab
(
index
)
{
activateTab
(
index
)
{
return
()
=>
{
return
()
=>
{
...
...
src/components/user_profile/user_profile.js
View file @
5a0bb29f
...
@@ -141,6 +141,9 @@ const UserProfile = {
...
@@ -141,6 +141,9 @@ const UserProfile = {
}
}
this
.
cleanUp
()
this
.
cleanUp
()
this
.
startUp
()
this
.
startUp
()
},
$route
()
{
this
.
$refs
.
tabSwitcher
.
activateTab
(
0
)()
}
}
},
},
components
:
{
components
:
{
...
...
src/components/user_profile/user_profile.vue
View file @
5a0bb29f
...
@@ -6,7 +6,7 @@
...
@@ -6,7 +6,7 @@
:switcher=
"true"
:switcher=
"true"
:selected=
"timeline.viewing"
:selected=
"timeline.viewing"
/>
/>
<tab-switcher
:refresh=
"true"
:renderOnlyFocused=
"true"
>
<tab-switcher
:renderOnlyFocused=
"true"
ref=
"tabSwitcher"
>
<Timeline
<Timeline
:label=
"$t('user_card.statuses')"
:label=
"$t('user_card.statuses')"
:disabled=
"!user.statuses_count"
:disabled=
"!user.statuses_count"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment