Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
b88c1959
Commit
b88c1959
authored
Sep 14, 2020
by
peterhegman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move `Vuex.Store` call out of module
Also add `namespaced: true` to module
parent
b87d9c0f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
10 deletions
+11
-10
app/assets/javascripts/groups/members/index.js
app/assets/javascripts/groups/members/index.js
+7
-5
app/assets/javascripts/vuex_shared/modules/members/index.js
app/assets/javascripts/vuex_shared/modules/members/index.js
+4
-5
No files found.
app/assets/javascripts/groups/members/index.js
View file @
b88c1959
import
Vue
from
'
vue
'
;
import
Vuex
from
'
vuex
'
;
import
App
from
'
./components/app.vue
'
;
import
{
createStore
}
from
'
~/vuex_shared/modules/members
'
;
import
membersModule
from
'
~/vuex_shared/modules/members
'
;
import
{
convertObjectPropsToCamelCase
}
from
'
~/lib/utils/common_utils
'
;
export
default
el
=>
{
...
...
@@ -13,10 +13,12 @@ export default el => {
const
{
members
,
groupId
,
currentUserId
}
=
el
.
dataset
;
const
store
=
createStore
({
members
:
convertObjectPropsToCamelCase
(
JSON
.
parse
(
members
),
{
deep
:
true
}),
sourceId
:
parseInt
(
groupId
,
10
),
currentUserId
:
currentUserId
?
parseInt
(
currentUserId
,
10
)
:
null
,
const
store
=
new
Vuex
.
Store
({
...
membersModule
({
members
:
convertObjectPropsToCamelCase
(
JSON
.
parse
(
members
),
{
deep
:
true
}),
sourceId
:
parseInt
(
groupId
,
10
),
currentUserId
:
currentUserId
?
parseInt
(
currentUserId
,
10
)
:
null
,
}),
});
return
new
Vue
({
...
...
app/assets/javascripts/vuex_shared/modules/members/index.js
View file @
b88c1959
import
Vuex
from
'
vuex
'
;
import
createState
from
'
./state
'
;
export
const
createStore
=
initialState
=>
n
ew
Vuex
.
Store
({
state
:
createState
(
initialState
),
});
export
default
initialState
=>
({
n
amespaced
:
true
,
state
:
createState
(
initialState
),
});
Write
Preview
Markdown
is supported
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