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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
7ca5a3f9
Commit
7ca5a3f9
authored
Jan 06, 2018
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes more eslint rules
parent
cbdbb645
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
486 additions
and
455 deletions
+486
-455
app/assets/javascripts/environments/components/environment_actions.vue
...vascripts/environments/components/environment_actions.vue
+2
-1
app/assets/javascripts/environments/components/environment_rollback.vue
...ascripts/environments/components/environment_rollback.vue
+4
-4
app/assets/javascripts/environments/components/environments_app.vue
.../javascripts/environments/components/environments_app.vue
+1
-1
app/assets/javascripts/environments/components/environments_table.vue
...avascripts/environments/components/environments_table.vue
+18
-4
app/assets/javascripts/environments/folder/environments_folder_view.vue
...ascripts/environments/folder/environments_folder_view.vue
+1
-1
app/assets/javascripts/groups/components/group_item.vue
app/assets/javascripts/groups/components/group_item.vue
+4
-2
app/assets/javascripts/groups/components/groups.vue
app/assets/javascripts/groups/components/groups.vue
+35
-34
app/assets/javascripts/groups/components/item_caret.vue
app/assets/javascripts/groups/components/item_caret.vue
+3
-3
app/assets/javascripts/groups/components/item_stats.vue
app/assets/javascripts/groups/components/item_stats.vue
+36
-36
app/assets/javascripts/groups/components/item_stats_value.vue
...assets/javascripts/groups/components/item_stats_value.vue
+45
-45
app/assets/javascripts/ide/components/commit_sidebar/list.vue
...assets/javascripts/ide/components/commit_sidebar/list.vue
+0
-1
app/assets/javascripts/ide/components/ide.vue
app/assets/javascripts/ide/components/ide.vue
+19
-16
app/assets/javascripts/ide/components/ide_context_bar.vue
app/assets/javascripts/ide/components/ide_context_bar.vue
+59
-59
app/assets/javascripts/ide/components/ide_project_branches_tree.vue
.../javascripts/ide/components/ide_project_branches_tree.vue
+5
-5
app/assets/javascripts/ide/components/ide_project_tree.vue
app/assets/javascripts/ide/components/ide_project_tree.vue
+8
-6
app/assets/javascripts/ide/components/ide_repo_tree.vue
app/assets/javascripts/ide/components/ide_repo_tree.vue
+57
-55
app/assets/javascripts/ide/components/ide_side_bar.vue
app/assets/javascripts/ide/components/ide_side_bar.vue
+19
-15
app/assets/javascripts/ide/components/ide_status_bar.vue
app/assets/javascripts/ide/components/ide_status_bar.vue
+37
-42
app/assets/javascripts/ide/components/new_branch_form.vue
app/assets/javascripts/ide/components/new_branch_form.vue
+7
-7
app/assets/javascripts/ide/components/new_dropdown/index.vue
app/assets/javascripts/ide/components/new_dropdown/index.vue
+5
-5
app/assets/javascripts/ide/components/new_dropdown/modal.vue
app/assets/javascripts/ide/components/new_dropdown/modal.vue
+22
-22
app/assets/javascripts/ide/components/new_dropdown/upload.vue
...assets/javascripts/ide/components/new_dropdown/upload.vue
+6
-6
app/assets/javascripts/ide/components/repo_commit_section.vue
...assets/javascripts/ide/components/repo_commit_section.vue
+63
-63
app/assets/javascripts/ide/components/repo_edit_button.vue
app/assets/javascripts/ide/components/repo_edit_button.vue
+1
-1
app/assets/javascripts/ide/components/repo_editor.vue
app/assets/javascripts/ide/components/repo_editor.vue
+14
-14
app/assets/javascripts/ide/components/repo_file_buttons.vue
app/assets/javascripts/ide/components/repo_file_buttons.vue
+8
-4
app/assets/javascripts/vue_shared/components/modal.vue
app/assets/javascripts/vue_shared/components/modal.vue
+7
-3
No files found.
app/assets/javascripts/environments/components/environment_actions.vue
View file @
7ca5a3f9
...
@@ -69,7 +69,8 @@
...
@@ -69,7 +69,8 @@
<i
<i
class=
"fa fa-caret-down"
class=
"fa fa-caret-down"
aria-hidden=
"true"
aria-hidden=
"true"
/>
>
</i>
<loading-icon
v-if=
"isLoading"
/>
<loading-icon
v-if=
"isLoading"
/>
</span>
</span>
</button>
</button>
...
...
app/assets/javascripts/environments/components/environment_rollback.vue
View file @
7ca5a3f9
...
@@ -9,6 +9,10 @@
...
@@ -9,6 +9,10 @@
import
loadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
import
loadingIcon
from
'
../../vue_shared/components/loading_icon.vue
'
;
export
default
{
export
default
{
components
:
{
loadingIcon
,
},
props
:
{
props
:
{
retryUrl
:
{
retryUrl
:
{
type
:
String
,
type
:
String
,
...
@@ -21,10 +25,6 @@
...
@@ -21,10 +25,6 @@
},
},
},
},
components
:
{
loadingIcon
,
},
data
()
{
data
()
{
return
{
return
{
isLoading
:
false
,
isLoading
:
false
,
...
...
app/assets/javascripts/environments/components/environments_app.vue
View file @
7ca5a3f9
...
@@ -119,7 +119,7 @@
...
@@ -119,7 +119,7 @@
:can-read-environment=
"canReadEnvironment"
:can-read-environment=
"canReadEnvironment"
@
onChangePage=
"onChangePage"
@
onChangePage=
"onChangePage"
>
>
<empty-state
<empty-state
slot=
"emptyState"
slot=
"emptyState"
v-if=
"!isLoading && state.environments.length === 0"
v-if=
"!isLoading && state.environments.length === 0"
:new-path=
"newEnvironmentPath"
:new-path=
"newEnvironmentPath"
...
...
app/assets/javascripts/environments/components/environments_table.vue
View file @
7ca5a3f9
...
@@ -31,6 +31,15 @@ export default {
...
@@ -31,6 +31,15 @@ export default {
},
},
},
},
computed
:
{
shouldRenderFolderContent
()
{
return
this
.
model
.
isFolder
&&
this
.
model
.
isOpen
&&
this
.
model
.
children
&&
this
.
model
.
children
.
length
>
0
;
},
},
methods
:
{
methods
:
{
folderUrl
(
model
)
{
folderUrl
(
model
)
{
return
`
${
window
.
location
.
pathname
}
/folders/
${
model
.
folderName
}
`
;
return
`
${
window
.
location
.
pathname
}
/folders/
${
model
.
folderName
}
`
;
...
@@ -80,17 +89,21 @@ export default {
...
@@ -80,17 +89,21 @@ export default {
</div>
</div>
<template
<template
v-for=
"(model, i) in environments"
v-for=
"(model, i) in environments"
:key=
"i"
:model=
"model"
>
:model=
"model"
>
<div
<div
is=
"environment-item"
is=
"environment-item"
:model=
"model"
:model=
"model"
:can-create-deployment=
"canCreateDeployment"
:can-create-deployment=
"canCreateDeployment"
:can-read-environment=
"canReadEnvironment"
:can-read-environment=
"canReadEnvironment"
:key=
"i"
/>
/>
<template
v-if=
"model.isFolder && model.isOpen && model.children && model.children.length > 0"
>
<template
<div
v-if=
"model.isLoadingFolderContent"
>
v-if=
"shouldRenderFolderContent"
>
<div
v-if=
"model.isLoadingFolderContent"
:key=
"i"
>
<loading-icon
size=
"2"
/>
<loading-icon
size=
"2"
/>
</div>
</div>
...
@@ -101,9 +114,10 @@ export default {
...
@@ -101,9 +114,10 @@ export default {
:model=
"children"
:model=
"children"
:can-create-deployment=
"canCreateDeployment"
:can-create-deployment=
"canCreateDeployment"
:can-read-environment=
"canReadEnvironment"
:can-read-environment=
"canReadEnvironment"
:key=
"i"
/>
/>
<div>
<div
:key=
"i"
>
<div
class=
"text-center prepend-top-10"
>
<div
class=
"text-center prepend-top-10"
>
<a
<a
:href=
"folderUrl(model)"
:href=
"folderUrl(model)"
...
...
app/assets/javascripts/environments/folder/environments_folder_view.vue
View file @
7ca5a3f9
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
>
>
<h4
class=
"js-folder-name environments-folder-name"
>
<h4
class=
"js-folder-name environments-folder-name"
>
{{
s__
(
"
Environments|Environments
"
)
}}
/
<b>
{{
folderName
}}
</b>
{{
s__
(
"
Environments|Environments
"
)
}}
/
<b>
{{
folderName
}}
</b>
</h4>
</h4>
<tabs
<tabs
...
...
app/assets/javascripts/groups/components/group_item.vue
View file @
7ca5a3f9
...
@@ -86,7 +86,8 @@
...
@@ -86,7 +86,8 @@
/>
/>
<item-stats
:item=
"group"
/>
<item-stats
:item=
"group"
/>
<div
<div
class=
"folder-toggle-wrap"
>
class=
"folder-toggle-wrap"
>
<item-caret
:is-group-open=
"group.isOpen"
/>
<item-caret
:is-group-open=
"group.isOpen"
/>
<item-type-icon
<item-type-icon
:item-type=
"group.type"
:item-type=
"group.type"
...
@@ -115,7 +116,8 @@
...
@@ -115,7 +116,8 @@
</a>
</a>
</div>
</div>
<div
<div
class=
"title namespace-title"
>
class=
"title namespace-title"
>
<a
<a
v-tooltip
v-tooltip
:href=
"group.relativePath"
:href=
"group.relativePath"
...
...
app/assets/javascripts/groups/components/groups.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
tablePagination
from
'
~/vue_shared/components/table_pagination.vue
'
;
import
tablePagination
from
'
~/vue_shared/components/table_pagination.vue
'
;
import
eventHub
from
'
../event_hub
'
;
import
eventHub
from
'
../event_hub
'
;
import
{
getParameterByName
}
from
'
../../lib/utils/common_utils
'
;
import
{
getParameterByName
}
from
'
../../lib/utils/common_utils
'
;
export
default
{
export
default
{
components
:
{
components
:
{
tablePagination
,
tablePagination
,
},
props
:
{
groups
:
{
type
:
Array
,
required
:
true
,
},
},
pageInfo
:
{
props
:
{
type
:
Object
,
groups
:
{
required
:
true
,
type
:
Array
,
required
:
true
,
},
pageInfo
:
{
type
:
Object
,
required
:
true
,
},
searchEmpty
:
{
type
:
Boolean
,
required
:
true
,
},
searchEmptyMessage
:
{
type
:
String
,
required
:
true
,
},
},
},
searchEmpty
:
{
methods
:
{
type
:
Boolean
,
change
(
page
)
{
required
:
true
,
const
filterGroupsParam
=
getParameterByName
(
'
filter_groups
'
);
const
sortParam
=
getParameterByName
(
'
sort
'
);
const
archivedParam
=
getParameterByName
(
'
archived
'
);
eventHub
.
$emit
(
'
fetchPage
'
,
page
,
filterGroupsParam
,
sortParam
,
archivedParam
);
},
},
},
searchEmptyMessage
:
{
};
type
:
String
,
required
:
true
,
},
},
methods
:
{
change
(
page
)
{
const
filterGroupsParam
=
getParameterByName
(
'
filter_groups
'
);
const
sortParam
=
getParameterByName
(
'
sort
'
);
const
archivedParam
=
getParameterByName
(
'
archived
'
);
eventHub
.
$emit
(
'
fetchPage
'
,
page
,
filterGroupsParam
,
sortParam
,
archivedParam
);
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"groups-list-tree-container"
>
<div
class=
"groups-list-tree-container"
>
<div
<div
v-if=
"searchEmpty"
v-if=
"searchEmpty"
class=
"has-no-search-results"
>
class=
"has-no-search-results"
{{
searchEmptyMessage
}}
>
{{
searchEmptyMessage
}}
</div>
</div>
<group-folder
<group-folder
v-if=
"!searchEmpty"
v-if=
"!searchEmpty"
...
@@ -50,7 +51,7 @@ export default {
...
@@ -50,7 +51,7 @@ export default {
<table-pagination
<table-pagination
v-if=
"!searchEmpty"
v-if=
"!searchEmpty"
:change=
"change"
:change=
"change"
:page
I
nfo=
"pageInfo"
:page
-i
nfo=
"pageInfo"
/>
/>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/groups/components/item_caret.vue
View file @
7ca5a3f9
...
@@ -2,6 +2,9 @@
...
@@ -2,6 +2,9 @@
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
components
:
{
icon
,
},
props
:
{
props
:
{
isGroupOpen
:
{
isGroupOpen
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -9,9 +12,6 @@ export default {
...
@@ -9,9 +12,6 @@ export default {
default
:
false
,
default
:
false
,
},
},
},
},
components
:
{
icon
,
},
computed
:
{
computed
:
{
iconClass
()
{
iconClass
()
{
return
this
.
isGroupOpen
?
'
angle-down
'
:
'
angle-right
'
;
return
this
.
isGroupOpen
?
'
angle-down
'
:
'
angle-right
'
;
...
...
app/assets/javascripts/groups/components/item_stats.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
timeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
timeAgoTooltip
from
'
~/vue_shared/components/time_ago_tooltip.vue
'
;
import
{
import
{
ITEM_TYPE
,
ITEM_TYPE
,
VISIBILITY_TYPE_ICON
,
VISIBILITY_TYPE_ICON
,
GROUP_VISIBILITY_TYPE
,
GROUP_VISIBILITY_TYPE
,
PROJECT_VISIBILITY_TYPE
PROJECT_VISIBILITY_TYPE
,
}
from
'
../constants
'
;
}
from
'
../constants
'
;
import
itemStatsValue
from
'
./item_stats_value.vue
'
;
import
itemStatsValue
from
'
./item_stats_value.vue
'
;
export
default
{
export
default
{
components
:
{
components
:
{
icon
,
icon
,
timeAgoTooltip
,
timeAgoTooltip
,
itemStatsValue
,
itemStatsValue
,
},
props
:
{
item
:
{
type
:
Object
,
required
:
true
,
},
},
},
props
:
{
computed
:
{
item
:
{
visibilityIcon
()
{
type
:
Object
,
return
VISIBILITY_TYPE_ICON
[
this
.
item
.
visibility
];
required
:
true
,
},
},
},
visibilityTooltip
()
{
computed
:
{
if
(
this
.
item
.
type
===
ITEM_TYPE
.
GROUP
)
{
visibilityIcon
()
{
return
GROUP_VISIBILITY_TYPE
[
this
.
item
.
visibility
];
return
VISIBILITY_TYPE_ICON
[
this
.
item
.
visibility
];
}
},
return
PROJECT_VISIBILITY_TYPE
[
this
.
item
.
visibility
];
visibilityTooltip
()
{
if
(
this
.
item
.
type
===
ITEM_TYPE
.
GROUP
)
{
return
GROUP_VISIBILITY_TYPE
[
this
.
item
.
visibility
];
}
return
PROJECT_VISIBILITY_TYPE
[
this
.
item
.
visibility
];
},
isProject
()
{
return
this
.
item
.
type
===
ITEM_TYPE
.
PROJECT
;
},
isGroup
()
{
return
this
.
item
.
type
===
ITEM_TYPE
.
GROUP
;
},
},
},
isProject
()
{
};
return
this
.
item
.
type
===
ITEM_TYPE
.
PROJECT
;
},
isGroup
()
{
return
this
.
item
.
type
===
ITEM_TYPE
.
GROUP
;
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
...
...
app/assets/javascripts/groups/components/item_stats_value.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
tooltip
from
'
~/vue_shared/directives/tooltip
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
import
icon
from
'
~/vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
props
:
{
components
:
{
title
:
{
icon
,
type
:
String
,
required
:
false
,
default
:
''
,
},
},
cssClass
:
{
directives
:
{
type
:
String
,
tooltip
,
required
:
false
,
default
:
''
,
},
},
iconName
:
{
props
:
{
type
:
String
,
title
:
{
required
:
true
,
type
:
String
,
required
:
false
,
default
:
''
,
},
cssClass
:
{
type
:
String
,
required
:
false
,
default
:
''
,
},
iconName
:
{
type
:
String
,
required
:
true
,
},
tooltipPlacement
:
{
type
:
String
,
required
:
false
,
default
:
'
bottom
'
,
},
/**
* value could either be number or string
* as `memberCount` is always passed as string
* while `subgroupCount` & `projectCount`
* are always number
*/
value
:
{
type
:
[
Number
,
String
],
required
:
false
,
default
:
''
,
},
},
},
tooltipPlacement
:
{
computed
:
{
type
:
String
,
isValuePresent
()
{
required
:
false
,
return
this
.
value
!==
''
;
default
:
'
bottom
'
,
}
,
},
},
/**
};
* value could either be number or string
* as `memberCount` is always passed as string
* while `subgroupCount` & `projectCount`
* are always number
*/
value
:
{
type
:
[
Number
,
String
],
required
:
false
,
default
:
''
,
},
},
directives
:
{
tooltip
,
},
components
:
{
icon
,
},
computed
:
{
isValuePresent
()
{
return
this
.
value
!==
''
;
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -57,12 +57,12 @@ export default {
...
@@ -57,12 +57,12 @@ export default {
:class=
"cssClass"
:class=
"cssClass"
:title=
"title"
:title=
"title"
>
>
<icon
:name=
"iconName"
/>
<icon
:name=
"iconName"
/>
<span
<span
v-if=
"isValuePresent"
v-if=
"isValuePresent"
class=
"stat-value"
class=
"stat-value"
>
>
{{
value
}}
{{
value
}}
</span>
</span>
</span>
</span>
</
template
>
</
template
>
app/assets/javascripts/ide/components/commit_sidebar/list.vue
View file @
7ca5a3f9
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
this
.
$emit
(
'
toggleCollapsed
'
);
this
.
$emit
(
'
toggleCollapsed
'
);
},
},
},
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/ide/components/ide.vue
View file @
7ca5a3f9
...
@@ -9,6 +9,15 @@ import repoPreview from './repo_preview.vue';
...
@@ -9,6 +9,15 @@ import repoPreview from './repo_preview.vue';
import
repoEditor
from
'
./repo_editor.vue
'
;
import
repoEditor
from
'
./repo_editor.vue
'
;
export
default
{
export
default
{
components
:
{
ideSidebar
,
ideContextbar
,
repoTabs
,
repoFileButtons
,
ideStatusBar
,
repoEditor
,
repoPreview
,
},
computed
:
{
computed
:
{
...
mapState
([
...
mapState
([
'
currentBlobView
'
,
'
currentBlobView
'
,
...
@@ -19,15 +28,6 @@ export default {
...
@@ -19,15 +28,6 @@ export default {
'
activeFile
'
,
'
activeFile
'
,
]),
]),
},
},
components
:
{
ideSidebar
,
ideContextbar
,
repoTabs
,
repoFileButtons
,
ideStatusBar
,
repoEditor
,
repoPreview
,
},
mounted
()
{
mounted
()
{
const
returnValue
=
'
Are you sure you want to lose unsaved changes?
'
;
const
returnValue
=
'
Are you sure you want to lose unsaved changes?
'
;
window
.
onbeforeunload
=
(
e
)
=>
{
window
.
onbeforeunload
=
(
e
)
=>
{
...
@@ -43,7 +43,7 @@ export default {
...
@@ -43,7 +43,7 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
<div
class=
"ide-view"
class=
"ide-view"
>
>
<ide-sidebar/>
<ide-sidebar/>
...
@@ -51,23 +51,26 @@ export default {
...
@@ -51,23 +51,26 @@ export default {
class=
"multi-file-edit-pane"
class=
"multi-file-edit-pane"
>
>
<template
<template
v-if=
"activeFile"
>
v-if=
"activeFile"
<repo-tabs/>
>
<repo-tabs
/>
<component
<component
class=
"multi-file-edit-pane-content"
class=
"multi-file-edit-pane-content"
:is=
"currentBlobView"
:is=
"currentBlobView"
/>
/>
<repo-file-buttons/>
<repo-file-buttons
/>
<ide-status-bar
<ide-status-bar
:file=
"selectedFile"
/>
:file=
"selectedFile"
/>
</
template
>
</
template
>
<
template
<
template
v-else
>
v-else
>
<div
class=
"ide-empty-state"
>
<div
class=
"ide-empty-state"
>
<h2
class=
"clgray"
>
Welcome to the GitLab IDE
</h2>
<h2
class=
"clgray"
>
Welcome to the GitLab IDE
</h2>
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<ide-contextbar/>
<ide-contextbar
/>
</div>
</div>
</template>
</template>
app/assets/javascripts/ide/components/ide_context_bar.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
{
mapGetters
,
mapState
,
mapActions
}
from
'
vuex
'
;
import
{
mapGetters
,
mapState
,
mapActions
}
from
'
vuex
'
;
import
repoCommitSection
from
'
./repo_commit_section.vue
'
;
import
repoCommitSection
from
'
./repo_commit_section.vue
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
import
panelResizer
from
'
../../vue_shared/components/panel_resizer.vue
'
;
import
panelResizer
from
'
../../vue_shared/components/panel_resizer.vue
'
;
export
default
{
export
default
{
data
()
{
components
:
{
return
{
repoCommitSection
,
width
:
290
,
icon
,
};
panelResizer
,
},
components
:
{
repoCommitSection
,
icon
,
panelResizer
,
},
computed
:
{
...
mapState
([
'
rightPanelCollapsed
'
,
]),
...
mapGetters
([
'
changedFiles
'
,
]),
currentIcon
()
{
return
this
.
rightPanelCollapsed
?
'
angle-double-left
'
:
'
angle-double-right
'
;
},
},
maxSize
()
{
data
()
{
return
window
.
innerWidth
/
2
;
return
{
width
:
290
,
};
},
},
panelStyle
()
{
computed
:
{
if
(
!
this
.
rightPanelCollapsed
)
{
...
mapState
([
return
{
width
:
`
${
this
.
width
}
px`
};
'
rightPanelCollapsed
'
,
}
]),
return
{};
...
mapGetters
([
'
changedFiles
'
,
]),
currentIcon
()
{
return
this
.
rightPanelCollapsed
?
'
angle-double-left
'
:
'
angle-double-right
'
;
},
maxSize
()
{
return
window
.
innerWidth
/
2
;
},
panelStyle
()
{
if
(
!
this
.
rightPanelCollapsed
)
{
return
{
width
:
`
${
this
.
width
}
px`
};
}
return
{};
},
},
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
setPanelCollapsedStatus
'
,
'
setPanelCollapsedStatus
'
,
'
setResizingStatus
'
,
'
setResizingStatus
'
,
]),
]),
toggleCollapsed
()
{
toggleCollapsed
()
{
this
.
setPanelCollapsedStatus
({
this
.
setPanelCollapsedStatus
({
side
:
'
right
'
,
side
:
'
right
'
,
collapsed
:
!
this
.
rightPanelCollapsed
,
collapsed
:
!
this
.
rightPanelCollapsed
,
});
});
},
resizingStarted
()
{
this
.
setResizingStatus
(
true
);
},
resizingEnded
()
{
this
.
setResizingStatus
(
false
);
},
},
},
resizingStarted
()
{
};
this
.
setResizingStatus
(
true
);
},
resizingEnded
()
{
this
.
setResizingStatus
(
false
);
},
},
};
</
script
>
</
script
>
<
template
>
<
template
>
...
@@ -64,17 +64,17 @@ export default {
...
@@ -64,17 +64,17 @@ export default {
}"
}"
:style="panelStyle"
:style="panelStyle"
>
>
<div
<div
class=
"multi-file-commit-panel-section"
>
class=
"multi-file-commit-panel-section"
>
<header
<header
class=
"multi-file-commit-panel-header"
class=
"multi-file-commit-panel-header"
:class=
"
{
:class=
"
{
'is-collapsed': rightPanelCollapsed,
'is-collapsed': rightPanelCollapsed,
}"
}"
>
>
<div
<div
class=
"multi-file-commit-panel-header-title"
class=
"multi-file-commit-panel-header-title"
v-if=
"!rightPanelCollapsed"
>
v-if=
"!rightPanelCollapsed"
>
<icon
<icon
name=
"list-bulleted"
name=
"list-bulleted"
:size=
"18"
:size=
"18"
...
@@ -92,8 +92,7 @@ export default {
...
@@ -92,8 +92,7 @@ export default {
/>
/>
</button>
</button>
</header>
</header>
<repo-commit-section
<repo-commit-section
/>
class=
""
/>
</div>
</div>
<panel-resizer
<panel-resizer
:size.sync=
"width"
:size.sync=
"width"
...
@@ -103,6 +102,7 @@ export default {
...
@@ -103,6 +102,7 @@ export default {
:max-size=
"maxSize"
:max-size=
"maxSize"
@
resize-start=
"resizingStarted"
@
resize-start=
"resizingStarted"
@
resize-end=
"resizingEnded"
@
resize-end=
"resizingEnded"
side=
"left"
/>
side=
"left"
/>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/ide_project_branches_tree.vue
View file @
7ca5a3f9
...
@@ -28,20 +28,20 @@ export default {
...
@@ -28,20 +28,20 @@ export default {
<div
class=
"branch-header-title"
>
<div
class=
"branch-header-title"
>
<icon
<icon
name=
"branch"
name=
"branch"
:size=
"12"
>
:size=
"12"
</icon
>
/
>
{{
branch
.
name
}}
{{
branch
.
name
}}
</div>
</div>
<div
class=
"branch-header-btns"
>
<div
class=
"branch-header-btns"
>
<new-dropdown
<new-dropdown
:project-id=
"projectId"
:project-id=
"projectId"
:branch=
"branch.name"
:branch=
"branch.name"
path=
""
/>
path=
""
/>
</div>
</div>
</div>
</div>
<div>
<div>
<repo-tree
<repo-tree
:tree-id=
"branch.treeId"
/>
:treeId=
"branch.treeId"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/ide_project_tree.vue
View file @
7ca5a3f9
...
@@ -19,9 +19,10 @@ export default {
...
@@ -19,9 +19,10 @@ export default {
<
template
>
<
template
>
<div
class=
"projects-sidebar"
>
<div
class=
"projects-sidebar"
>
<div
class=
"context-header"
>
<div
class=
"context-header"
>
<a
<a
:title=
"project.name"
:title=
"project.name"
:href=
"project.web_url"
>
:href=
"project.web_url"
>
<div
class=
"avatar-container s40 project-avatar"
>
<div
class=
"avatar-container s40 project-avatar"
>
<project-avatar-image
<project-avatar-image
class=
"avatar-container project-avatar"
class=
"avatar-container project-avatar"
...
@@ -29,7 +30,7 @@ export default {
...
@@ -29,7 +30,7 @@ export default {
:img-src=
"project.avatar_url"
:img-src=
"project.avatar_url"
:img-alt=
"project.name"
:img-alt=
"project.name"
:img-size=
"40"
:img-size=
"40"
/>
/>
</div>
</div>
<div
class=
"sidebar-context-title"
>
<div
class=
"sidebar-context-title"
>
{{
project
.
name
}}
{{
project
.
name
}}
...
@@ -38,10 +39,11 @@ export default {
...
@@ -38,10 +39,11 @@ export default {
</div>
</div>
<div
class=
"multi-file-commit-panel-inner-scroll"
>
<div
class=
"multi-file-commit-panel-inner-scroll"
>
<branches-tree
<branches-tree
v-for=
"
(branch, index)
in project.branches"
v-for=
"
branch
in project.branches"
:key=
"branch.name"
:key=
"branch.name"
:project-id=
"project.path_with_namespace"
:project-id=
"project.path_with_namespace"
:branch=
"branch"
/>
:branch=
"branch"
/>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/ide_repo_tree.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
RepoPreviousDirectory
from
'
./repo_prev_directory.vue
'
;
import
RepoPreviousDirectory
from
'
./repo_prev_directory.vue
'
;
import
RepoFile
from
'
./repo_file.vue
'
;
import
RepoFile
from
'
./repo_file.vue
'
;
import
RepoLoadingFile
from
'
./repo_loading_file.vue
'
;
import
RepoLoadingFile
from
'
./repo_loading_file.vue
'
;
import
{
treeList
}
from
'
../stores/utils
'
;
import
{
treeList
}
from
'
../stores/utils
'
;
export
default
{
export
default
{
components
:
{
components
:
{
'
repo-previous-directory
'
:
RepoPreviousDirectory
,
'
repo-previous-directory
'
:
RepoPreviousDirectory
,
'
repo-file
'
:
RepoFile
,
'
repo-file
'
:
RepoFile
,
'
repo-loading-file
'
:
RepoLoadingFile
,
'
repo-loading-file
'
:
RepoLoadingFile
,
},
props
:
{
treeId
:
{
type
:
String
,
required
:
true
,
},
},
},
props
:
{
computed
:
{
treeId
:
{
...
mapState
([
type
:
String
,
'
loading
'
,
required
:
true
,
'
isRoot
'
,
]),
...
mapState
({
projectName
(
state
)
{
return
state
.
project
.
name
;
},
},
}),
fetchedList
()
{
return
treeList
(
this
.
$store
.
state
,
this
.
treeId
);
},
},
hasPreviousDirectory
()
{
computed
:
{
return
!
this
.
isRoot
&&
this
.
fetchedList
.
length
;
...
mapState
([
},
'
loading
'
,
showLoading
()
{
'
isRoot
'
,
return
this
.
loading
;
]),
...
mapState
({
projectName
(
state
)
{
return
state
.
project
.
name
;
},
}),
fetchedList
()
{
return
treeList
(
this
.
$store
.
state
,
this
.
treeId
);
},
hasPreviousDirectory
()
{
return
!
this
.
isRoot
&&
this
.
fetchedList
.
length
;
},
showLoading
()
{
return
this
.
loading
;
},
},
},
},
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div>
<div
class=
"ide-file-list"
>
<div
class=
"ide-file-list"
>
<table
class=
"table"
>
<table
class=
"table"
>
<tbody
<tbody
v-if=
"treeId"
>
v-if=
"treeId"
<repo-previous-directory
>
v-if=
"hasPreviousDirectory"
<repo-previous-directory
/>
v-if=
"hasPreviousDirectory"
<repo-loading-file
/>
v-if=
"showLoading"
<template
v-if=
"showLoading"
>
v-for=
"n in 5"
<repo-loading-file
:key=
"n"
v-for=
"n in 5"
/>
:key=
"n"
<repo-file
/>
v-for=
"file in fetchedList"
</
template
>
:key=
"file.key"
<repo-file
:file=
"file"
v-for=
"file in fetchedList"
/>
:key=
"file.key"
</tbody>
:file=
"file"
</table>
/>
</tbody>
</table>
</div>
</div>
</div>
</div>
</template>
</template>
app/assets/javascripts/ide/components/ide_side_bar.vue
View file @
7ca5a3f9
...
@@ -5,16 +5,16 @@ import icon from '../../vue_shared/components/icon.vue';
...
@@ -5,16 +5,16 @@ import icon from '../../vue_shared/components/icon.vue';
import
panelResizer
from
'
../../vue_shared/components/panel_resizer.vue
'
;
import
panelResizer
from
'
../../vue_shared/components/panel_resizer.vue
'
;
export
default
{
export
default
{
data
()
{
return
{
width
:
290
,
};
},
components
:
{
components
:
{
projectTree
,
projectTree
,
icon
,
icon
,
panelResizer
,
panelResizer
,
},
},
data
()
{
return
{
width
:
290
,
};
},
computed
:
{
computed
:
{
...
mapState
([
...
mapState
([
'
projects
'
,
'
projects
'
,
...
@@ -56,17 +56,18 @@ export default {
...
@@ -56,17 +56,18 @@ export default {
<
template
>
<
template
>
<div
<div
class=
"multi-file-commit-panel"
class=
"multi-file-commit-panel"
:class=
"
{
:class=
"
{
'is-collapsed': leftPanelCollapsed,
'is-collapsed': leftPanelCollapsed,
}"
}"
:style="panelStyle"
:style="panelStyle"
>
>
<div
class=
"multi-file-commit-panel-inner"
>
<div
class=
"multi-file-commit-panel-inner"
>
<project-tree
<project-tree
v-for=
"
(project, index)
in projects"
v-for=
"
project
in projects"
:key=
"project.id"
:key=
"project.id"
:project=
"project"
/>
:project=
"project"
/>
</div>
</div>
<button
<button
type=
"button"
type=
"button"
...
@@ -80,7 +81,9 @@ export default {
...
@@ -80,7 +81,9 @@ export default {
<span
<span
v-if=
"!leftPanelCollapsed"
v-if=
"!leftPanelCollapsed"
class=
"collapse-text"
class=
"collapse-text"
>
Collapse sidebar
</span>
>
Collapse sidebar
</span>
</button>
</button>
<panel-resizer
<panel-resizer
:size.sync=
"width"
:size.sync=
"width"
...
@@ -90,6 +93,7 @@ export default {
...
@@ -90,6 +93,7 @@ export default {
:max-size=
"maxSize"
:max-size=
"maxSize"
@
resize-start=
"resizingStarted"
@
resize-start=
"resizingStarted"
@
resize-end=
"resizingEnded"
@
resize-end=
"resizingEnded"
side=
"right"
/>
side=
"right"
/>
</div>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/ide_status_bar.vue
View file @
7ca5a3f9
<
script
>
<
script
>
import
{
mapState
}
from
'
vuex
'
;
import
{
mapState
}
from
'
vuex
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
import
icon
from
'
../../vue_shared/components/icon.vue
'
;
import
tooltip
from
'
../../vue_shared/directives/tooltip
'
;
import
tooltip
from
'
../../vue_shared/directives/tooltip
'
;
import
timeAgoMixin
from
'
../../vue_shared/mixins/timeago
'
;
import
timeAgoMixin
from
'
../../vue_shared/mixins/timeago
'
;
export
default
{
export
default
{
props
:
{
components
:
{
file
:
{
icon
,
type
:
Object
,
required
:
true
,
},
},
},
directives
:
{
components
:
{
tooltip
,
icon
,
},
},
mixins
:
[
directives
:
{
timeAgoMixin
,
tooltip
,
],
},
props
:
{
mixins
:
[
file
:
{
timeAgoMixin
,
type
:
Object
,
],
required
:
true
,
computed
:
{
},
...
mapState
([
},
'
selectedFile
'
,
computed
:
{
]),
...
mapState
([
},
'
selectedFile
'
,
};
]),
},
};
</
script
>
</
script
>
<
template
>
<
template
>
<div
<div
class=
"ide-status-bar"
>
class=
"ide-status-bar"
>
<div>
<div>
<icon
<icon
name=
"branch"
name=
"branch"
:size=
"12"
>
:size=
"12"
</icon
>
/
>
{{
selectedFile
.
branchId
}}
{{
selectedFile
.
branchId
}}
</div>
</div>
<div>
<div>
<div
<div
v-if=
"selectedFile.lastCommit && selectedFile.lastCommit.id"
>
v-if=
"selectedFile.lastCommit && selectedFile.lastCommit.id"
>
Last commit:
Last commit:
<a
<a
v-tooltip
v-tooltip
:title=
"selectedFile.lastCommit.message"
:title=
"selectedFile.lastCommit.message"
:href=
"selectedFile.lastCommit.url"
>
:href=
"selectedFile.lastCommit.url"
{{
timeFormated
(
selectedFile
.
lastCommit
.
updatedAt
)
}}
by
>
{{
timeFormated
(
selectedFile
.
lastCommit
.
updatedAt
)
}}
by
{{
selectedFile
.
lastCommit
.
author
}}
{{
selectedFile
.
lastCommit
.
author
}}
</a>
</a>
</div>
</div>
</div>
</div>
<div
<div
class=
"text-right"
>
class=
"text-right"
>
{{
selectedFile
.
name
}}
{{
selectedFile
.
name
}}
</div>
</div>
<div
<div
class=
"text-right"
>
class=
"text-right"
>
{{
selectedFile
.
eol
}}
{{
selectedFile
.
eol
}}
</div>
</div>
<div
<div
class=
"text-right"
>
class=
"text-right"
>
{{
file
.
editorRow
}}
:
{{
file
.
editorColumn
}}
{{
file
.
editorRow
}}
:
{{
file
.
editorColumn
}}
</div>
</div>
<div
<div
class=
"text-right"
>
class=
"text-right"
>
{{
selectedFile
.
fileLanguage
}}
{{
selectedFile
.
fileLanguage
}}
</div>
</div>
</div>
</div>
...
...
app/assets/javascripts/ide/components/new_branch_form.vue
View file @
7ca5a3f9
...
@@ -21,6 +21,13 @@
...
@@ -21,6 +21,13 @@
return
this
.
loading
||
this
.
branchName
===
''
;
return
this
.
loading
||
this
.
branchName
===
''
;
},
},
},
},
created
()
{
// Dropdown is outside of Vue instance & is controlled by Bootstrap
this
.
$dropdown
=
$
(
'
.git-revision-dropdown
'
);
// text element is outside Vue app
this
.
dropdownText
=
document
.
querySelector
(
'
.project-refs-form .dropdown-toggle-text
'
);
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
createNewBranch
'
,
'
createNewBranch
'
,
...
@@ -55,13 +62,6 @@
...
@@ -55,13 +62,6 @@
}));
}));
},
},
},
},
created
()
{
// Dropdown is outside of Vue instance & is controlled by Bootstrap
this
.
$dropdown
=
$
(
'
.git-revision-dropdown
'
);
// text element is outside Vue app
this
.
dropdownText
=
document
.
querySelector
(
'
.project-refs-form .dropdown-toggle-text
'
);
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/ide/components/new_dropdown/index.vue
View file @
7ca5a3f9
...
@@ -4,6 +4,11 @@
...
@@ -4,6 +4,11 @@
import
icon
from
'
../../../vue_shared/components/icon.vue
'
;
import
icon
from
'
../../../vue_shared/components/icon.vue
'
;
export
default
{
export
default
{
components
:
{
icon
,
newModal
,
upload
,
},
props
:
{
props
:
{
branch
:
{
branch
:
{
type
:
String
,
type
:
String
,
...
@@ -18,11 +23,6 @@
...
@@ -18,11 +23,6 @@
default
:
null
,
default
:
null
,
},
},
},
},
components
:
{
icon
,
newModal
,
upload
,
},
data
()
{
data
()
{
return
{
return
{
openModal
:
false
,
openModal
:
false
,
...
...
app/assets/javascripts/ide/components/new_dropdown/modal.vue
View file @
7ca5a3f9
...
@@ -4,6 +4,9 @@
...
@@ -4,6 +4,9 @@
import
modal
from
'
../../../vue_shared/components/modal.vue
'
;
import
modal
from
'
../../../vue_shared/components/modal.vue
'
;
export
default
{
export
default
{
components
:
{
modal
,
},
props
:
{
props
:
{
branchId
:
{
branchId
:
{
type
:
String
,
type
:
String
,
...
@@ -27,28 +30,6 @@
...
@@ -27,28 +30,6 @@
entryName
:
this
.
path
!==
''
?
`
${
this
.
path
}
/`
:
''
,
entryName
:
this
.
path
!==
''
?
`
${
this
.
path
}
/`
:
''
,
};
};
},
},
components
:
{
modal
,
},
methods
:
{
...
mapActions
([
'
createTempEntry
'
,
]),
createEntryInStore
()
{
this
.
createTempEntry
({
projectId
:
this
.
currentProjectId
,
branchId
:
this
.
branchId
,
parent
:
this
.
parent
,
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
type
:
this
.
type
,
});
this
.
hideModal
();
},
hideModal
()
{
this
.
$emit
(
'
hide
'
);
},
},
computed
:
{
computed
:
{
...
mapState
([
...
mapState
([
'
currentProjectId
'
,
'
currentProjectId
'
,
...
@@ -78,6 +59,25 @@
...
@@ -78,6 +59,25 @@
mounted
()
{
mounted
()
{
this
.
$refs
.
fieldName
.
focus
();
this
.
$refs
.
fieldName
.
focus
();
},
},
methods
:
{
...
mapActions
([
'
createTempEntry
'
,
]),
createEntryInStore
()
{
this
.
createTempEntry
({
projectId
:
this
.
currentProjectId
,
branchId
:
this
.
branchId
,
parent
:
this
.
parent
,
name
:
this
.
entryName
.
replace
(
new
RegExp
(
`^
${
this
.
path
}
/`
),
''
),
type
:
this
.
type
,
});
this
.
hideModal
();
},
hideModal
()
{
this
.
$emit
(
'
hide
'
);
},
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/ide/components/new_dropdown/upload.vue
View file @
7ca5a3f9
...
@@ -18,6 +18,12 @@
...
@@ -18,6 +18,12 @@
'
currentProjectId
'
,
'
currentProjectId
'
,
]),
]),
},
},
mounted
()
{
this
.
$refs
.
fileUpload
.
addEventListener
(
'
change
'
,
this
.
openFile
);
},
beforeDestroy
()
{
this
.
$refs
.
fileUpload
.
removeEventListener
(
'
change
'
,
this
.
openFile
);
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
createTempEntry
'
,
'
createTempEntry
'
,
...
@@ -59,12 +65,6 @@
...
@@ -59,12 +65,6 @@
this
.
$refs
.
fileUpload
.
click
();
this
.
$refs
.
fileUpload
.
click
();
},
},
},
},
mounted
()
{
this
.
$refs
.
fileUpload
.
addEventListener
(
'
change
'
,
this
.
openFile
);
},
beforeDestroy
()
{
this
.
$refs
.
fileUpload
.
removeEventListener
(
'
change
'
,
this
.
openFile
);
},
};
};
</
script
>
</
script
>
...
...
app/assets/javascripts/ide/components/repo_commit_section.vue
View file @
7ca5a3f9
...
@@ -105,69 +105,69 @@ export default {
...
@@ -105,69 +105,69 @@ export default {
</
script
>
</
script
>
<
template
>
<
template
>
<div
class=
"multi-file-commit-panel-section"
>
<div
class=
"multi-file-commit-panel-section"
>
<modal
<modal
v-if=
"showNewBranchModal"
v-if=
"showNewBranchModal"
:primary-button-label=
"__('Create new branch')"
:primary-button-label=
"__('Create new branch')"
kind=
"primary"
kind=
"primary"
:title=
"__('Branch has changed')"
:title=
"__('Branch has changed')"
:text=
"__('This branch has changed since you started editing. Would you like to create a new branch?')"
:text=
"__('This branch has changed since you started editing. Would you like to create a new branch?')"
@
cancel=
"showNewBranchModal = false"
@
cancel=
"showNewBranchModal = false"
@
submit=
"makeCommit(true)"
@
submit=
"makeCommit(true)"
/>
/>
<commit-files-list
<commit-files-list
title=
"Staged"
title=
"Staged"
:file-list=
"changedFiles"
:file-list=
"changedFiles"
:collapsed=
"rightPanelCollapsed"
:collapsed=
"rightPanelCollapsed"
@
toggleCollapsed=
"toggleCollapsed"
@
toggleCollapsed=
"toggleCollapsed"
/>
/>
<form
<form
class=
"form-horizontal multi-file-commit-form"
class=
"form-horizontal multi-file-commit-form"
@
submit.prevent=
"tryCommit"
@
submit.prevent=
"tryCommit"
v-if=
"!rightPanelCollapsed"
v-if=
"!rightPanelCollapsed"
>
>
<div
class=
"multi-file-commit-fieldset"
>
<div
class=
"multi-file-commit-fieldset"
>
<textarea
<textarea
class=
"form-control multi-file-commit-message"
class=
"form-control multi-file-commit-message"
name=
"commit-message"
name=
"commit-message"
v-model=
"commitMessage"
v-model=
"commitMessage"
placeholder=
"Commit message"
placeholder=
"Commit message"
>
</textarea>
</div>
<div
class=
"multi-file-commit-fieldset"
>
<label
v-tooltip
title=
"Create a new merge request with these changes"
data-container=
"body"
data-placement=
"top"
>
<input
type=
"checkbox"
v-model=
"startNewMR"
/>
Merge Request
</label>
<button
type=
"submit"
:disabled=
"commitButtonDisabled"
class=
"btn btn-default btn-sm append-right-10 prepend-left-10"
>
<i
v-if=
"submitCommitsLoading"
class=
"js-commit-loading-icon fa fa-spinner fa-spin"
aria-hidden=
"true"
aria-label=
"loading"
>
>
</i>
</textarea>
Commit
</button>
<div
class=
"multi-file-commit-message-count"
>
{{
commitMessageCount
}}
</div>
</div>
</div>
<div
class=
"multi-file-commit-fieldset"
>
</form>
<label
</div>
v-tooltip
title=
"Create a new merge request with these changes"
data-container=
"body"
data-placement=
"top"
>
<input
type=
"checkbox"
v-model=
"startNewMR"
/>
Merge Request
</label>
<button
type=
"submit"
:disabled=
"commitButtonDisabled"
class=
"btn btn-default btn-sm append-right-10 prepend-left-10"
>
<i
v-if=
"submitCommitsLoading"
class=
"js-commit-loading-icon fa fa-spinner fa-spin"
aria-hidden=
"true"
aria-label=
"loading"
>
</i>
Commit
</button>
<div
class=
"multi-file-commit-message-count"
>
{{
commitMessageCount
}}
</div>
</div>
</form>
</div>
</
template
>
</
template
>
app/assets/javascripts/ide/components/repo_edit_button.vue
View file @
7ca5a3f9
...
@@ -40,7 +40,7 @@ export default {
...
@@ -40,7 +40,7 @@ export default {
aria-hidden=
"true"
>
aria-hidden=
"true"
>
</i>
</i>
<span>
<span>
{{
buttonLabel
}}
{{
buttonLabel
}}
</span>
</span>
</button>
</button>
<modal
<modal
...
...
app/assets/javascripts/ide/components/repo_editor.vue
View file @
7ca5a3f9
...
@@ -6,20 +6,6 @@ import monacoLoader from '../monaco_loader';
...
@@ -6,20 +6,6 @@ import monacoLoader from '../monaco_loader';
import
Editor
from
'
../lib/editor
'
;
import
Editor
from
'
../lib/editor
'
;
export
default
{
export
default
{
beforeDestroy
()
{
this
.
editor
.
dispose
();
},
mounted
()
{
if
(
this
.
editor
&&
monaco
)
{
this
.
initMonaco
();
}
else
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
this
.
editor
=
Editor
.
create
(
monaco
);
this
.
initMonaco
();
});
}
},
computed
:
{
computed
:
{
...
mapGetters
([
...
mapGetters
([
'
activeFile
'
,
'
activeFile
'
,
...
@@ -52,6 +38,20 @@ export default {
...
@@ -52,6 +38,20 @@ export default {
}
}
},
},
},
},
beforeDestroy
()
{
this
.
editor
.
dispose
();
},
mounted
()
{
if
(
this
.
editor
&&
monaco
)
{
this
.
initMonaco
();
}
else
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
this
.
editor
=
Editor
.
create
(
monaco
);
this
.
initMonaco
();
});
}
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
getRawFileData
'
,
'
getRawFileData
'
,
...
...
app/assets/javascripts/ide/components/repo_file_buttons.vue
View file @
7ca5a3f9
...
@@ -35,20 +35,24 @@ export default {
...
@@ -35,20 +35,24 @@ export default {
<div
<div
class=
"btn-group"
class=
"btn-group"
role=
"group"
role=
"group"
aria-label=
"File actions"
>
aria-label=
"File actions"
>
<a
<a
:href=
"activeFile.blamePath"
:href=
"activeFile.blamePath"
class=
"btn btn-default btn-sm blame"
>
class=
"btn btn-default btn-sm blame"
>
Blame
Blame
</a>
</a>
<a
<a
:href=
"activeFile.commitsPath"
:href=
"activeFile.commitsPath"
class=
"btn btn-default btn-sm history"
>
class=
"btn btn-default btn-sm history"
>
History
History
</a>
</a>
<a
<a
:href=
"activeFile.permalink"
:href=
"activeFile.permalink"
class=
"btn btn-default btn-sm permalink"
>
class=
"btn btn-default btn-sm permalink"
>
Permalink
Permalink
</a>
</a>
</div>
</div>
...
...
app/assets/javascripts/vue_shared/components/modal.vue
View file @
7ca5a3f9
...
@@ -97,7 +97,7 @@
...
@@ -97,7 +97,7 @@
<div
class=
"modal-header"
>
<div
class=
"modal-header"
>
<slot
name=
"header"
>
<slot
name=
"header"
>
<h4
class=
"modal-title pull-left"
>
<h4
class=
"modal-title pull-left"
>
{{
t
his
.
t
itle
}}
{{
title
}}
</h4>
</h4>
<button
<button
type=
"button"
type=
"button"
...
@@ -111,7 +111,10 @@
...
@@ -111,7 +111,10 @@
</slot>
</slot>
</div>
</div>
<div
class=
"modal-body"
>
<div
class=
"modal-body"
>
<slot
name=
"body"
:text=
"text"
>
<slot
name=
"body"
:text=
"text"
>
<p>
{{
this
.
text
}}
</p>
<p>
{{
this
.
text
}}
</p>
</slot>
</slot>
</div>
</div>
...
@@ -145,7 +148,8 @@
...
@@ -145,7 +148,8 @@
</div>
</div>
<div
<div
v-if=
"id !== ''"
v-if=
"id !== ''"
class=
"modal-backdrop fade in"
>
class=
"modal-backdrop fade in"
>
</div>
</div>
</div>
</div>
</
template
>
</
template
>
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