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
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
Show 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 @@
...
@@ -27,6 +27,13 @@
dropdownOpen
:
false
,
dropdownOpen
:
false
,
};
};
},
},
watch
:
{
dropdownOpen
()
{
this
.
$nextTick
(()
=>
{
this
.
$refs
.
dropdownMenu
.
scrollIntoView
();
});
},
},
methods
:
{
methods
:
{
...
mapActions
([
...
mapActions
([
'
createTempEntry
'
,
'
createTempEntry
'
,
...
@@ -71,7 +78,10 @@
...
@@ -71,7 +78,10 @@
css-classes=
"pull-left"
css-classes=
"pull-left"
/>
/>
</button>
</button>
<ul
class=
"dropdown-menu dropdown-menu-right"
>
<ul
class=
"dropdown-menu dropdown-menu-right"
ref=
"dropdownMenu"
>
<li>
<li>
<a
<a
href=
"#"
href=
"#"
...
...
app/assets/javascripts/ide/components/repo_file.vue
View file @
abccda6f
...
@@ -97,7 +97,7 @@ export default {
...
@@ -97,7 +97,7 @@ export default {
:file=
"file"
:file=
"file"
/>
/>
</span>
</span>
<span
class=
"pull-right"
>
<span
class=
"pull-right
ide-file-icon-holder
"
>
<mr-file-icon
<mr-file-icon
v-if=
"file.mrChange"
v-if=
"file.mrChange"
/>
/>
...
...
app/assets/javascripts/ide/stores/actions.js
View file @
abccda6f
...
@@ -60,7 +60,7 @@ export const createTempEntry = (
...
@@ -60,7 +60,7 @@ export const createTempEntry = (
}
}
worker
.
addEventListener
(
'
message
'
,
({
data
})
=>
{
worker
.
addEventListener
(
'
message
'
,
({
data
})
=>
{
const
{
file
}
=
data
;
const
{
file
,
parentPath
}
=
data
;
worker
.
terminate
();
worker
.
terminate
();
...
@@ -76,6 +76,10 @@ export const createTempEntry = (
...
@@ -76,6 +76,10 @@ export const createTempEntry = (
dispatch
(
'
setFileActive
'
,
file
.
path
);
dispatch
(
'
setFileActive
'
,
file
.
path
);
}
}
if
(
parentPath
&&
!
state
.
entries
[
parentPath
].
opened
)
{
commit
(
types
.
TOGGLE_TREE_OPEN
,
parentPath
);
}
resolve
(
file
);
resolve
(
file
);
});
});
...
...
app/assets/javascripts/ide/stores/workers/files_decorator_worker.js
View file @
abccda6f
...
@@ -6,6 +6,7 @@ self.addEventListener('message', e => {
...
@@ -6,6 +6,7 @@ self.addEventListener('message', e => {
const
treeList
=
[];
const
treeList
=
[];
let
file
;
let
file
;
let
parentPath
;
const
entries
=
data
.
reduce
((
acc
,
path
)
=>
{
const
entries
=
data
.
reduce
((
acc
,
path
)
=>
{
const
pathSplit
=
path
.
split
(
'
/
'
);
const
pathSplit
=
path
.
split
(
'
/
'
);
const
blobName
=
pathSplit
.
pop
().
trim
();
const
blobName
=
pathSplit
.
pop
().
trim
();
...
@@ -17,6 +18,8 @@ self.addEventListener('message', e => {
...
@@ -17,6 +18,8 @@ self.addEventListener('message', e => {
const
foundEntry
=
acc
[
folderPath
];
const
foundEntry
=
acc
[
folderPath
];
if
(
!
foundEntry
)
{
if
(
!
foundEntry
)
{
parentPath
=
parentFolder
?
parentFolder
.
path
:
null
;
const
tree
=
decorateData
({
const
tree
=
decorateData
({
projectId
,
projectId
,
branchId
,
branchId
,
...
@@ -29,7 +32,7 @@ self.addEventListener('message', e => {
...
@@ -29,7 +32,7 @@ self.addEventListener('message', e => {
tempFile
,
tempFile
,
changed
:
tempFile
,
changed
:
tempFile
,
opened
:
tempFile
,
opened
:
tempFile
,
parentPath
:
parentFolder
?
parentFolder
.
path
:
null
,
parentPath
,
});
});
Object
.
assign
(
acc
,
{
Object
.
assign
(
acc
,
{
...
@@ -53,6 +56,8 @@ self.addEventListener('message', e => {
...
@@ -53,6 +56,8 @@ self.addEventListener('message', e => {
if
(
blobName
!==
''
)
{
if
(
blobName
!==
''
)
{
const
fileFolder
=
acc
[
pathSplit
.
join
(
'
/
'
)];
const
fileFolder
=
acc
[
pathSplit
.
join
(
'
/
'
)];
parentPath
=
fileFolder
?
fileFolder
.
path
:
null
;
file
=
decorateData
({
file
=
decorateData
({
projectId
,
projectId
,
branchId
,
branchId
,
...
@@ -67,7 +72,7 @@ self.addEventListener('message', e => {
...
@@ -67,7 +72,7 @@ self.addEventListener('message', e => {
content
,
content
,
base64
,
base64
,
previewMode
:
viewerInformationForPath
(
blobName
),
previewMode
:
viewerInformationForPath
(
blobName
),
parentPath
:
fileFolder
?
fileFolder
.
path
:
null
,
parentPath
,
});
});
Object
.
assign
(
acc
,
{
Object
.
assign
(
acc
,
{
...
@@ -88,5 +93,6 @@ self.addEventListener('message', e => {
...
@@ -88,5 +93,6 @@ self.addEventListener('message', e => {
entries
,
entries
,
treeList
:
sortTree
(
treeList
),
treeList
:
sortTree
(
treeList
),
file
,
file
,
parentPath
,
});
});
});
});
app/assets/stylesheets/pages/repo.scss
View file @
abccda6f
...
@@ -54,6 +54,7 @@
...
@@ -54,6 +54,7 @@
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
max-width
:
inherit
;
max-width
:
inherit
;
line-height
:
22px
;
svg
{
svg
{
vertical-align
:
middle
;
vertical-align
:
middle
;
...
@@ -66,13 +67,17 @@
...
@@ -66,13 +67,17 @@
}
}
}
}
.ide-file-icon-holder
{
display
:
flex
;
align-items
:
center
;
}
.ide-file-changed-icon
{
.ide-file-changed-icon
{
margin-left
:
auto
;
margin-left
:
auto
;
}
}
.ide-new-btn
{
.ide-new-btn
{
display
:
none
;
display
:
none
;
margin-bottom
:
-4px
;
margin-right
:
-8px
;
margin-right
:
-8px
;
}
}
...
@@ -104,6 +109,7 @@
...
@@ -104,6 +109,7 @@
.file-col-commit-message
{
.file-col-commit-message
{
display
:
flex
;
display
:
flex
;
overflow
:
visible
;
overflow
:
visible
;
align-items
:
center
;
padding
:
6px
12px
;
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