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
Jérome Perrin
gitlab-ce
Commits
fa3b0241
Commit
fa3b0241
authored
Mar 25, 2018
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed new Additions
Automatic Diff Navigation
parent
b452bdea
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
15 additions
and
11 deletions
+15
-11
app/assets/javascripts/ide/components/repo_file.vue
app/assets/javascripts/ide/components/repo_file.vue
+1
-1
app/assets/javascripts/ide/ide_router.js
app/assets/javascripts/ide/ide_router.js
+3
-3
app/assets/javascripts/ide/lib/common/model.js
app/assets/javascripts/ide/lib/common/model.js
+1
-1
app/assets/javascripts/ide/lib/editor.js
app/assets/javascripts/ide/lib/editor.js
+4
-0
app/assets/javascripts/ide/stores/actions/file.js
app/assets/javascripts/ide/stores/actions/file.js
+3
-3
app/assets/javascripts/ide/stores/mutation_types.js
app/assets/javascripts/ide/stores/mutation_types.js
+1
-1
app/assets/javascripts/ide/stores/mutations/file.js
app/assets/javascripts/ide/stores/mutations/file.js
+2
-2
No files found.
app/assets/javascripts/ide/components/repo_file.vue
View file @
fa3b0241
...
...
@@ -104,7 +104,7 @@ export default {
</span>
<changed-file-icon
:file=
"file"
v-if=
"file.changed || file.tempFile || file.mr
Diff
"
v-if=
"file.changed || file.tempFile || file.mr
Change
"
class=
"prepend-top-5 pull-right"
/>
<new-dropdown
...
...
app/assets/javascripts/ide/ide_router.js
View file @
fa3b0241
...
...
@@ -134,12 +134,12 @@ router.beforeEach((to, from, next) => {
store
.
state
.
entries
[
change
.
new_path
];
if
(
changeTreeEntry
)
{
store
.
dispatch
(
'
setFileMr
Diff
'
,
{
store
.
dispatch
(
'
setFileMr
Change
'
,
{
file
:
changeTreeEntry
,
mr
Diff
:
change
.
diff
,
mr
Change
:
change
,
});
if
(
ind
<
5
)
{
if
(
ind
<
10
)
{
store
.
dispatch
(
'
getFileData
'
,
{
path
:
change
.
new_path
,
makeFileActive
:
ind
===
0
,
...
...
app/assets/javascripts/ide/lib/common/model.js
View file @
fa3b0241
...
...
@@ -22,7 +22,7 @@ export default class Model {
)),
);
if
(
this
.
file
.
baseRaw
)
{
if
(
this
.
file
.
mrChange
)
{
this
.
disposable
.
add
(
(
this
.
baseModel
=
this
.
monaco
.
editor
.
createModel
(
this
.
file
.
baseRaw
,
...
...
app/assets/javascripts/ide/lib/editor.js
View file @
fa3b0241
...
...
@@ -114,6 +114,10 @@ export default class Editor {
original
:
model
.
getBaseModel
(),
modified
:
model
.
getModel
(),
});
this
.
monaco
.
editor
.
createDiffNavigator
(
this
.
instance
,
{
alwaysRevealFirst
:
true
,
});
}
setupMonacoTheme
()
{
...
...
app/assets/javascripts/ide/stores/actions/file.js
View file @
fa3b0241
...
...
@@ -87,8 +87,8 @@ export const getFileData = (
});
};
export
const
setFileMr
Diff
=
({
state
,
commit
},
{
file
,
mrDiff
})
=>
{
commit
(
types
.
SET_FILE_MR_
DIFF
,
{
file
,
mrDiff
});
export
const
setFileMr
Change
=
({
state
,
commit
},
{
file
,
mrChange
})
=>
{
commit
(
types
.
SET_FILE_MR_
CHANGE
,
{
file
,
mrChange
});
};
export
const
getRawFileData
=
(
...
...
@@ -101,7 +101,7 @@ export const getRawFileData = (
.
getRawFileData
(
file
)
.
then
(
raw
=>
{
commit
(
types
.
SET_FILE_RAW_DATA
,
{
file
,
raw
});
if
(
file
.
mr
Diff
)
{
if
(
file
.
mr
Change
&&
file
.
mrChange
.
new_file
===
false
)
{
service
.
getBaseRawFileData
(
file
,
baseSha
)
.
then
(
baseRaw
=>
{
...
...
app/assets/javascripts/ide/stores/mutation_types.js
View file @
fa3b0241
...
...
@@ -48,7 +48,7 @@ export const TOGGLE_FILE_CHANGED = 'TOGGLE_FILE_CHANGED';
export
const
SET_CURRENT_BRANCH
=
'
SET_CURRENT_BRANCH
'
;
export
const
SET_ENTRIES
=
'
SET_ENTRIES
'
;
export
const
CREATE_TMP_ENTRY
=
'
CREATE_TMP_ENTRY
'
;
export
const
SET_FILE_MR_
DIFF
=
'
SET_FILE_MR_DIFF
'
;
export
const
SET_FILE_MR_
CHANGE
=
'
SET_FILE_MR_CHANGE
'
;
export
const
SET_FILE_TARGET_BRANCH
=
'
SET_FILE_TARGET_BRANCH
'
;
export
const
UPDATE_VIEWER
=
'
UPDATE_VIEWER
'
;
export
const
UPDATE_DELAY_VIEWER_CHANGE
=
'
UPDATE_DELAY_VIEWER_CHANGE
'
;
app/assets/javascripts/ide/stores/mutations/file.js
View file @
fa3b0241
...
...
@@ -66,9 +66,9 @@ export default {
editorColumn
,
});
},
[
types
.
SET_FILE_MR_
DIFF
](
state
,
{
file
,
mrDiff
})
{
[
types
.
SET_FILE_MR_
CHANGE
](
state
,
{
file
,
mrChange
})
{
Object
.
assign
(
file
,
{
mr
Diff
,
mr
Change
,
});
},
[
types
.
DISCARD_FILE_CHANGES
](
state
,
path
)
{
...
...
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