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
a88be4cc
Commit
a88be4cc
authored
Nov 03, 2020
by
derek-knox
Committed by
Chad Woolley
Nov 09, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply review feedback
- Add ISSUABLE_TYPE const - Add projectSplit computed
parent
8ac6382e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
4 deletions
+8
-4
app/assets/javascripts/static_site_editor/components/edit_meta_modal.vue
...scripts/static_site_editor/components/edit_meta_modal.vue
+2
-2
app/assets/javascripts/static_site_editor/constants.js
app/assets/javascripts/static_site_editor/constants.js
+1
-0
app/assets/javascripts/static_site_editor/pages/home.vue
app/assets/javascripts/static_site_editor/pages/home.vue
+5
-2
No files found.
app/assets/javascripts/static_site_editor/components/edit_meta_modal.vue
View file @
a88be4cc
...
@@ -6,7 +6,7 @@ import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
...
@@ -6,7 +6,7 @@ import LocalStorageSync from '~/vue_shared/components/local_storage_sync.vue';
import
EditMetaControls
from
'
./edit_meta_controls.vue
'
;
import
EditMetaControls
from
'
./edit_meta_controls.vue
'
;
import
{
MR_META_LOCAL_STORAGE_KEY
}
from
'
../constants
'
;
import
{
ISSUABLE_TYPE
,
MR_META_LOCAL_STORAGE_KEY
}
from
'
../constants
'
;
export
default
{
export
default
{
components
:
{
components
:
{
...
@@ -66,7 +66,7 @@ export default {
...
@@ -66,7 +66,7 @@ export default {
this
.
$refs
.
modal
.
hide
();
this
.
$refs
.
modal
.
hide
();
},
},
initTemplates
()
{
initTemplates
()
{
Api
.
issueTemplates
(
this
.
namespace
,
this
.
project
,
'
merge_request
'
,
(
err
,
templates
)
=>
{
Api
.
issueTemplates
(
this
.
namespace
,
this
.
project
,
ISSUABLE_TYPE
,
(
err
,
templates
)
=>
{
if
(
err
)
return
;
// Error handled by global AJAX error handler
if
(
err
)
return
;
// Error handled by global AJAX error handler
this
.
mergeRequestTemplates
=
templates
;
this
.
mergeRequestTemplates
=
templates
;
});
});
...
...
app/assets/javascripts/static_site_editor/constants.js
View file @
a88be4cc
...
@@ -2,6 +2,7 @@ import { s__, __ } from '~/locale';
...
@@ -2,6 +2,7 @@ import { s__, __ } from '~/locale';
export
const
BRANCH_SUFFIX_COUNT
=
8
;
export
const
BRANCH_SUFFIX_COUNT
=
8
;
export
const
DEFAULT_TARGET_BRANCH
=
'
master
'
;
export
const
DEFAULT_TARGET_BRANCH
=
'
master
'
;
export
const
ISSUABLE_TYPE
=
'
merge_request
'
;
export
const
SUBMIT_CHANGES_BRANCH_ERROR
=
s__
(
'
StaticSiteEditor|Branch could not be created.
'
);
export
const
SUBMIT_CHANGES_BRANCH_ERROR
=
s__
(
'
StaticSiteEditor|Branch could not be created.
'
);
export
const
SUBMIT_CHANGES_COMMIT_ERROR
=
s__
(
export
const
SUBMIT_CHANGES_COMMIT_ERROR
=
s__
(
...
...
app/assets/javascripts/static_site_editor/pages/home.vue
View file @
a88be4cc
...
@@ -64,6 +64,9 @@ export default {
...
@@ -64,6 +64,9 @@ export default {
isContentLoaded
()
{
isContentLoaded
()
{
return
Boolean
(
this
.
sourceContent
);
return
Boolean
(
this
.
sourceContent
);
},
},
projectSplit
()
{
return
this
.
appData
.
project
.
split
(
'
/
'
);
// TODO: refactor so `namespace` and `project` remain distinct
},
},
},
mounted
()
{
mounted
()
{
Tracking
.
event
(
document
.
body
.
dataset
.
page
,
TRACKING_ACTION_INITIALIZE_EDITOR
);
Tracking
.
event
(
document
.
body
.
dataset
.
page
,
TRACKING_ACTION_INITIALIZE_EDITOR
);
...
@@ -148,8 +151,8 @@ export default {
...
@@ -148,8 +151,8 @@ export default {
<edit-meta-modal
<edit-meta-modal
ref=
"editMetaModal"
ref=
"editMetaModal"
:source-path=
"appData.sourcePath"
:source-path=
"appData.sourcePath"
:namespace=
"
appData.project.split('/')
[0]"
:namespace=
"
projectSplit
[0]"
:project=
"
appData.project.split('/')
[1]"
:project=
"
projectSplit
[1]"
@
primary=
"onSubmit"
@
primary=
"onSubmit"
@
hide=
"onHideModal"
@
hide=
"onHideModal"
/>
/>
...
...
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