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
Léo-Paul Géneau
gitlab-ce
Commits
abccda6f
Commit
abccda6f
authored
Apr 18, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed alignment of icon
auto open new folder when creating item scroll dropdown into view when opening
parent
6d1467de
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
32 additions
and
6 deletions
+32
-6
app/assets/javascripts/ide/components/new_dropdown/index.vue
app/assets/javascripts/ide/components/new_dropdown/index.vue
+11
-1
app/assets/javascripts/ide/components/repo_file.vue
app/assets/javascripts/ide/components/repo_file.vue
+1
-1
app/assets/javascripts/ide/stores/actions.js
app/assets/javascripts/ide/stores/actions.js
+5
-1
app/assets/javascripts/ide/stores/workers/files_decorator_worker.js
.../javascripts/ide/stores/workers/files_decorator_worker.js
+8
-2
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+7
-1
No files found.
app/assets/javascripts/ide/components/new_dropdown/index.vue
View file @
abccda6f
...
...
@@ -27,6 +27,13 @@
dropdownOpen
:
false
,
};
},
watch
:
{
dropdownOpen
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dropdownMenu
.
scrollIntoView
();
});
},
},
methods
:
{
...
mapActions
([
'
createTempEntry
'
,
...
...
@@ -71,7 +78,10 @@
css-classes=
"pull-left"
/>
</button>
<ul
class=
"dropdown-menu dropdown-menu-right"
>
<ul
class=
"dropdown-menu dropdown-menu-right"
ref=
"dropdownMenu"
>
<li>
<a
href=
"#"
...
...
app/assets/javascripts/ide/components/repo_file.vue
View file @
abccda6f
...
...
@@ -97,7 +97,7 @@ export default {
:file=
"file"
/>
</span>
<span
class=
"pull-right"
>
<span
class=
"pull-right
ide-file-icon-holder
"
>
<mr-file-icon
v-if=
"file.mrChange"
/>
...
...
app/assets/javascripts/ide/stores/actions.js
View file @
abccda6f
...
...
@@ -60,7 +60,7 @@ export const createTempEntry = (
}
worker
.
addEventListener
(
'
message
'
,
({
data
})
=>
{
const
{
file
}
=
data
;
const
{
file
,
parentPath
}
=
data
;
worker
.
terminate
();
...
...
@@ -76,6 +76,10 @@ export const createTempEntry = (
dispatch
(
'
setFileActive
'
,
file
.
path
);
}
if
(
parentPath
&&
!
state
.
entries
[
parentPath
].
opened
)
{
commit
(
types
.
TOGGLE_TREE_OPEN
,
parentPath
);
}
resolve
(
file
);
});
...
...
app/assets/javascripts/ide/stores/workers/files_decorator_worker.js
View file @
abccda6f
...
...
@@ -6,6 +6,7 @@ self.addEventListener('message', e => {
const
treeList
=
[];
let
file
;
let
parentPath
;
const
entries
=
data
.
reduce
((
acc
,
path
)
=>
{
const
pathSplit
=
path
.
split
(
'
/
'
);
const
blobName
=
pathSplit
.
pop
().
trim
();
...
...
@@ -17,6 +18,8 @@ self.addEventListener('message', e => {
const
foundEntry
=
acc
[
folderPath
];
if
(
!
foundEntry
)
{
parentPath
=
parentFolder
?
parentFolder
.
path
:
null
;
const
tree
=
decorateData
({
projectId
,
branchId
,
...
...
@@ -29,7 +32,7 @@ self.addEventListener('message', e => {
tempFile
,
changed
:
tempFile
,
opened
:
tempFile
,
parentPath
:
parentFolder
?
parentFolder
.
path
:
null
,
parentPath
,
});
Object
.
assign
(
acc
,
{
...
...
@@ -53,6 +56,8 @@ self.addEventListener('message', e => {
if
(
blobName
!==
''
)
{
const
fileFolder
=
acc
[
pathSplit
.
join
(
'
/
'
)];
parentPath
=
fileFolder
?
fileFolder
.
path
:
null
;
file
=
decorateData
({
projectId
,
branchId
,
...
...
@@ -67,7 +72,7 @@ self.addEventListener('message', e => {
content
,
base64
,
previewMode
:
viewerInformationForPath
(
blobName
),
parentPath
:
fileFolder
?
fileFolder
.
path
:
null
,
parentPath
,
});
Object
.
assign
(
acc
,
{
...
...
@@ -88,5 +93,6 @@ self.addEventListener('message', e => {
entries
,
treeList
:
sortTree
(
treeList
),
file
,
parentPath
,
});
});
app/assets/stylesheets/pages/repo.scss
View file @
abccda6f
...
...
@@ -54,6 +54,7 @@
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
max-width
:
inherit
;
line-height
:
22px
;
svg
{
vertical-align
:
middle
;
...
...
@@ -66,13 +67,17 @@
}
}
.ide-file-icon-holder
{
display
:
flex
;
align-items
:
center
;
}
.ide-file-changed-icon
{
margin-left
:
auto
;
}
.ide-new-btn
{
display
:
none
;
margin-bottom
:
-4px
;
margin-right
:
-8px
;
}
...
...
@@ -104,6 +109,7 @@
.file-col-commit-message
{
display
:
flex
;
overflow
:
visible
;
align-items
:
center
;
padding
:
6px
12px
;
}
...
...
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