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
e64b93cc
Commit
e64b93cc
authored
Mar 07, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change button style when there are changes
parent
60c9c24e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
2 deletions
+15
-2
ee/app/assets/javascripts/ide/components/editor_mode_dropdown.vue
...ssets/javascripts/ide/components/editor_mode_dropdown.vue
+7
-0
ee/app/assets/javascripts/ide/components/repo_tabs.vue
ee/app/assets/javascripts/ide/components/repo_tabs.vue
+5
-1
ee/app/assets/javascripts/ide/stores/getters.js
ee/app/assets/javascripts/ide/stores/getters.js
+2
-0
spec/javascripts/ide/lib/editor_spec.js
spec/javascripts/ide/lib/editor_spec.js
+1
-1
No files found.
ee/app/assets/javascripts/ide/components/editor_mode_dropdown.vue
View file @
e64b93cc
...
...
@@ -6,6 +6,10 @@
Icon
,
},
props
:
{
hasChanges
:
{
type
:
Boolean
,
required
:
true
,
},
viewer
:
{
type
:
String
,
required
:
true
,
...
...
@@ -33,6 +37,9 @@
<button
type=
"button"
class=
"btn btn-primary btn-sm"
:class=
"
{
'btn-inverted': hasChanges,
}"
data-toggle="dropdown"
>
<template
v-if=
"viewer === 'editor'"
>
...
...
ee/app/assets/javascripts/ide/components/repo_tabs.vue
View file @
e64b93cc
<
script
>
import
{
mapActions
,
mapState
}
from
'
vuex
'
;
import
{
mapActions
,
map
Getters
,
map
State
}
from
'
vuex
'
;
import
RepoTab
from
'
./repo_tab.vue
'
;
import
EditorMode
from
'
./editor_mode_dropdown.vue
'
;
...
...
@@ -14,6 +14,9 @@
};
},
computed
:
{
...
mapGetters
([
'
hasChanges
'
,
]),
...
mapState
([
'
openFiles
'
,
'
viewer
'
,
...
...
@@ -47,6 +50,7 @@
<editor-mode
:viewer=
"viewer"
:show-shadow=
"showShadow"
:has-changes=
"hasChanges"
@
click=
"updateViewer"
/>
</div>
...
...
ee/app/assets/javascripts/ide/stores/getters.js
View file @
e64b93cc
...
...
@@ -15,3 +15,5 @@ export const canEditFile = (state) => {
export
const
addedFiles
=
state
=>
state
.
changedFiles
.
filter
(
f
=>
f
.
tempFile
);
export
const
modifiedFiles
=
state
=>
state
.
changedFiles
.
filter
(
f
=>
!
f
.
tempFile
);
export
const
hasChanges
=
state
=>
!!
state
.
changedFiles
.
length
;
spec/javascripts/ide/lib/editor_spec.js
View file @
e64b93cc
...
...
@@ -82,7 +82,7 @@ describe('Multi-file editor library', () => {
});
});
f
describe
(
'
attachModel
'
,
()
=>
{
describe
(
'
attachModel
'
,
()
=>
{
let
model
;
beforeEach
(()
=>
{
...
...
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