Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IA2
GMS
Commits
20b474a3
Commit
20b474a3
authored
Mar 15, 2021
by
Sonia Zorba
Browse files
Improved show main page functionality
parent
10812270
Changes
3
Hide whitespace changes
Inline
Side-by-side
gms-ui/src/components/GroupsBreadcrumb.vue
View file @
20b474a3
...
...
@@ -20,7 +20,6 @@
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
client
from
'
api-client
'
;
function
buildItems
(
values
)
{
let
groups
=
[];
...
...
@@ -50,16 +49,7 @@ export default {
}),
methods
:
{
changeBreadcrumb
:
function
(
groupId
)
{
this
.
input
.
selectedGroupId
=
groupId
;
this
.
input
.
searchFilter
=
null
;
if
(
this
.
input
.
tabIndex
===
0
)
{
client
.
fetchGroupsTab
(
this
.
input
)
.
then
(
model
=>
{
this
.
$store
.
commit
(
'
updateGroups
'
,
model
);
});
}
else
{
this
.
$store
.
dispatch
(
'
changeTab
'
,
0
);
}
this
.
$store
.
dispatch
(
'
changeBreadcrumb
'
,
groupId
);
},
openEditGroupModal
:
function
(
group
)
{
group
.
leaf
=
this
.
model
.
leaf
;
...
...
gms-ui/src/components/TopMenu.vue
View file @
20b474a3
...
...
@@ -36,7 +36,11 @@ export default {
}),
methods
:
{
showMainPage
()
{
this
.
$router
.
push
(
'
/
'
,
()
=>
{});
if
(
this
.
$router
.
currentRoute
.
path
===
'
/
'
)
{
this
.
$store
.
dispatch
(
'
changeBreadcrumb
'
,
'
ROOT
'
);
}
else
{
this
.
$router
.
push
(
'
/
'
,
()
=>
{});
}
},
genericSearch
()
{
this
.
$router
.
push
({
path
:
'
/search
'
,
query
:
{
q
:
this
.
input
.
genericSearch
.
filter
}
},
()
=>
{});
...
...
gms-ui/src/store.js
View file @
20b474a3
...
...
@@ -148,6 +148,18 @@ export default new Vuex.Store({
break
;
}
},
changeBreadcrumb
({
state
,
commit
,
dispatch
},
groupId
)
{
state
.
input
.
selectedGroupId
=
groupId
;
state
.
input
.
searchFilter
=
null
;
if
(
state
.
input
.
tabIndex
===
0
)
{
client
.
fetchGroupsTab
(
state
.
input
)
.
then
(
model
=>
{
commit
(
'
updateGroups
'
,
model
);
});
}
else
{
dispatch
(
'
changeTab
'
,
0
);
}
},
updateCurrentGroup
({
dispatch
,
state
},
data
)
{
state
.
model
.
breadcrumbs
[
state
.
model
.
breadcrumbs
.
length
-
1
].
groupName
=
data
.
newGroupName
;
state
.
model
.
leaf
=
data
.
leaf
;
...
...
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