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
8918433a
Commit
8918433a
authored
Apr 15, 2017
by
Regis Boudinot
Committed by
Phil Hughes
Apr 15, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue Title Vue: convert to .vue - use 'render' with 'createElement' in index
parent
309bab43
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
25 deletions
+24
-25
app/assets/javascripts/issue_show/index.js
app/assets/javascripts/issue_show/index.js
+15
-21
app/assets/javascripts/issue_show/issue_title.vue
app/assets/javascripts/issue_show/issue_title.vue
+6
-3
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-0
config/webpack.config.js
config/webpack.config.js
+1
-0
spec/javascripts/issue_show/issue_title_spec.js
spec/javascripts/issue_show/issue_title_spec.js
+1
-1
No files found.
app/assets/javascripts/issue_show/index.js
View file @
8918433a
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
IssueTitle
from
'
./issue_title
'
;
import
IssueTitle
from
'
./issue_title
.vue
'
;
import
'
../vue_shared/vue_resource_interceptor
'
;
import
'
../vue_shared/vue_resource_interceptor
'
;
const
vueOptions
=
()
=>
({
(()
=>
{
el
:
'
.issue-title-entrypoint
'
,
const
issueTitleData
=
document
.
querySelector
(
'
.issue-title-data
'
).
dataset
;
components
:
{
const
{
initialTitle
,
endpoint
}
=
issueTitleData
;
IssueTitle
,
},
data
()
{
const
issueTitleData
=
document
.
querySelector
(
'
.issue-title-data
'
).
dataset
;
return
{
const
vm
=
new
Vue
({
initialTitle
:
issueTitleData
.
initialTitle
,
el
:
'
.issue-title-entrypoint
'
,
endpoint
:
issueTitleData
.
endpoint
,
render
:
createElement
=>
createElement
(
IssueTitle
,
{
};
props
:
{
},
initialTitle
,
template
:
`
endpoint
,
<IssueTitle
},
:initialTitle="initialTitle"
}),
:endpoint="endpoint"
});
/>
`
,
});
(()
=>
new
Vue
(
vueOptions
()))();
return
vm
;
})();
app/assets/javascripts/issue_show/issue_title.
js
→
app/assets/javascripts/issue_show/issue_title.
vue
View file @
8918433a
<
script
>
import
Visibility
from
'
visibilityjs
'
;
import
Visibility
from
'
visibilityjs
'
;
import
Poll
from
'
./../lib/utils/poll
'
;
import
Poll
from
'
./../lib/utils/poll
'
;
import
Service
from
'
./services/index
'
;
import
Service
from
'
./services/index
'
;
...
@@ -72,7 +73,9 @@ export default {
...
@@ -72,7 +73,9 @@ export default {
created
()
{
created
()
{
this
.
fetch
();
this
.
fetch
();
},
},
template
:
`
<h2 class='title' v-html='title'></h2>
`
,
};
};
</
script
>
<
template
>
<h2
class=
"title"
v-html=
"title"
></h2>
</
template
>
app/views/projects/issues/show.html.haml
View file @
8918433a
...
@@ -79,4 +79,5 @@
...
@@ -79,4 +79,5 @@
=
render
'shared/issuable/sidebar'
,
issuable:
@issue
=
render
'shared/issuable/sidebar'
,
issuable:
@issue
=
page_specific_javascript_bundle_tag
(
'common_vue'
)
=
page_specific_javascript_bundle_tag
(
'issue_show'
)
=
page_specific_javascript_bundle_tag
(
'issue_show'
)
config/webpack.config.js
View file @
8918433a
...
@@ -125,6 +125,7 @@ var config = {
...
@@ -125,6 +125,7 @@ var config = {
'
notebook_viewer
'
,
'
notebook_viewer
'
,
'
pdf_viewer
'
,
'
pdf_viewer
'
,
'
vue_pipelines
'
,
'
vue_pipelines
'
,
'
issue_show
'
,
],
],
minChunks
:
function
(
module
,
count
)
{
minChunks
:
function
(
module
,
count
)
{
return
module
.
resource
&&
(
/vue_shared/
).
test
(
module
.
resource
);
return
module
.
resource
&&
(
/vue_shared/
).
test
(
module
.
resource
);
...
...
spec/javascripts/issue_show/issue_title_spec.js
View file @
8918433a
import
Vue
from
'
vue
'
;
import
Vue
from
'
vue
'
;
import
issueTitle
from
'
~/issue_show/issue_title
'
;
import
issueTitle
from
'
~/issue_show/issue_title
.vue
'
;
describe
(
'
Issue Title
'
,
()
=>
{
describe
(
'
Issue Title
'
,
()
=>
{
let
IssueTitleComponent
;
let
IssueTitleComponent
;
...
...
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