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
d52172fa
Commit
d52172fa
authored
Jul 26, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds green to circle when unsaved. Activates right tab when closing.
parent
0cdf9700
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
5 deletions
+25
-5
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+1
-1
app/assets/javascripts/repo/repo_binary_viewer.vue
app/assets/javascripts/repo/repo_binary_viewer.vue
+0
-3
app/assets/javascripts/repo/repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+1
-0
app/assets/javascripts/repo/repo_store.js
app/assets/javascripts/repo/repo_store.js
+18
-1
app/assets/stylesheets/pages/repo.scss
app/assets/stylesheets/pages/repo.scss
+5
-0
No files found.
app/assets/javascripts/repo/index.js
View file @
d52172fa
...
...
@@ -30,7 +30,7 @@ function initRepo() {
data
:
()
=>
Store
,
template
:
`
<div class="tree-content-holder">
<repo-sidebar/><div class="panel-right" :class="{'edit-mode':
readOnly
}">
<repo-sidebar/><div class="panel-right" :class="{'edit-mode':
editMode
}">
<repo-tabs/>
<repo-file-buttons/>
<repo-editor/>
...
...
app/assets/javascripts/repo/repo_binary_viewer.vue
View file @
d52172fa
...
...
@@ -13,12 +13,10 @@ const RepoBinaryViewer = {
methods
:
{
errored
()
{
console
.
log
(
'
errored
'
);
Store
.
binaryLoaded
=
false
;
},
loaded
()
{
console
.
log
(
'
loaded
'
);
Store
.
binaryLoaded
=
true
;
},
...
...
@@ -39,7 +37,6 @@ const RepoBinaryViewer = {
if
(
!
this
.
binary
)
return
;
switch
(
this
.
binaryMimeType
)
{
case
'
image/png
'
:
console
.
log
(
'
png bitch
'
)
this
.
binaryTypes
.
png
=
true
;
break
;
default
:
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
d52172fa
...
...
@@ -65,6 +65,7 @@ const RepoEditor = {
},
editMode
()
{
console
.
log
(
'
edit mode changed
'
)
const
readOnly
=
!
this
.
editMode
;
Store
.
readOnly
=
readOnly
;
...
...
app/assets/javascripts/repo/repo_store.js
View file @
d52172fa
...
...
@@ -151,8 +151,25 @@ const RepoStore = {
removeFromOpenedFiles
(
file
)
{
if
(
file
.
type
===
'
tree
'
)
return
;
let
foundIndex
;
RepoStore
.
openedFiles
=
RepoStore
.
openedFiles
.
filter
((
openedFile
,
i
)
=>
{
if
(
openedFile
.
url
===
file
.
url
)
foundIndex
=
i
;
return
openedFile
.
url
!==
file
.
url
;
});
// now activate the right tab based on what you closed.
if
(
RepoStore
.
openedFiles
.
length
===
0
)
return
;
if
(
RepoStore
.
openedFiles
.
length
===
1
||
foundIndex
===
0
)
{
RepoStore
.
setActiveFiles
(
RepoStore
.
openedFiles
[
0
]);
return
;
}
RepoStore
.
openedFiles
=
RepoStore
.
openedFiles
.
filter
(
openedFile
=>
openedFile
.
url
!==
file
.
url
);
if
(
foundIndex
)
{
if
(
foundIndex
>
0
)
{
RepoStore
.
setActiveFiles
(
RepoStore
.
openedFiles
[
foundIndex
-
1
]);
}
}
},
addPlaceholderFile
()
{
...
...
app/assets/stylesheets/pages/repo.scss
View file @
d52172fa
...
...
@@ -100,6 +100,7 @@
&
.close
{
width
:
auto
;
font-size
:
15px
;
opacity
:
1
;
}
}
...
...
@@ -110,6 +111,10 @@
margin-left
:
15px
;
color
:
$gray-darkest
;
}
i
.fa.fa-circle
{
color
:
$brand-success
;
}
}
}
...
...
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