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
f86cea6f
Commit
f86cea6f
authored
Aug 06, 2017
by
Jacob Schatz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make Store->RepoStore and others consistent.
parent
863114b4
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
19 deletions
+19
-19
app/assets/javascripts/repo/components/repo.vue
app/assets/javascripts/repo/components/repo.vue
+2
-2
app/assets/javascripts/repo/components/repo_binary_viewer.vue
...assets/javascripts/repo/components/repo_binary_viewer.vue
+2
-2
app/assets/javascripts/repo/components/repo_tab.vue
app/assets/javascripts/repo/components/repo_tab.vue
+2
-2
app/assets/javascripts/repo/helpers/monaco_loader_helper.js
app/assets/javascripts/repo/helpers/monaco_loader_helper.js
+4
-4
app/assets/javascripts/repo/stores/repo_store.js
app/assets/javascripts/repo/stores/repo_store.js
+9
-9
No files found.
app/assets/javascripts/repo/components/repo.vue
View file @
f86cea6f
...
@@ -8,7 +8,7 @@ import RepoPreview from './repo_preview.vue';
...
@@ -8,7 +8,7 @@ import RepoPreview from './repo_preview.vue';
import
RepoMixin
from
'
../mixins/repo_mixin
'
;
import
RepoMixin
from
'
../mixins/repo_mixin
'
;
import
PopupDialog
from
'
../../vue_shared/components/popup_dialog.vue
'
;
import
PopupDialog
from
'
../../vue_shared/components/popup_dialog.vue
'
;
import
Store
from
'
../stores/repo_store
'
;
import
Store
from
'
../stores/repo_store
'
;
import
Repo
Helper
from
'
../helpers/repo_helper
'
;
import
Helper
from
'
../helpers/repo_helper
'
;
import
MonacoLoaderHelper
from
'
../helpers/monaco_loader_helper
'
;
import
MonacoLoaderHelper
from
'
../helpers/monaco_loader_helper
'
;
export
default
{
export
default
{
...
@@ -26,7 +26,7 @@ export default {
...
@@ -26,7 +26,7 @@ export default {
},
},
mounted
()
{
mounted
()
{
RepoHelper
.
getContent
().
catch
(
Repo
Helper
.
loadingError
);
Helper
.
getContent
().
catch
(
Helper
.
loadingError
);
},
},
methods
:
{
methods
:
{
...
...
app/assets/javascripts/repo/components/repo_binary_viewer.vue
View file @
f86cea6f
<
script
>
<
script
>
import
Store
from
'
../stores/repo_store
'
;
import
Store
from
'
../stores/repo_store
'
;
import
Repo
Helper
from
'
../helpers/repo_helper
'
;
import
Helper
from
'
../helpers/repo_helper
'
;
const
RepoBinaryViewer
=
{
const
RepoBinaryViewer
=
{
data
:
()
=>
Store
,
data
:
()
=>
Store
,
...
@@ -41,7 +41,7 @@ const RepoBinaryViewer = {
...
@@ -41,7 +41,7 @@ const RepoBinaryViewer = {
watch
:
{
watch
:
{
blobRaw
()
{
blobRaw
()
{
Store
.
resetBinaryTypes
();
Store
.
resetBinaryTypes
();
if
(
Repo
Helper
.
isKindaBinary
())
{
if
(
Helper
.
isKindaBinary
())
{
this
.
activeFile
.
raw
=
false
;
this
.
activeFile
.
raw
=
false
;
// counts as binaryish so we use the binary viewer in this case.
// counts as binaryish so we use the binary viewer in this case.
this
.
binary
=
true
;
this
.
binary
=
true
;
...
...
app/assets/javascripts/repo/components/repo_tab.vue
View file @
f86cea6f
<
script
>
<
script
>
import
Repo
Store
from
'
../stores/repo_store
'
;
import
Store
from
'
../stores/repo_store
'
;
const
RepoTab
=
{
const
RepoTab
=
{
props
:
{
props
:
{
...
@@ -20,7 +20,7 @@ const RepoTab = {
...
@@ -20,7 +20,7 @@ const RepoTab = {
},
},
methods
:
{
methods
:
{
tabClicked
:
Repo
Store
.
setActiveFiles
,
tabClicked
:
Store
.
setActiveFiles
,
xClicked
(
file
)
{
xClicked
(
file
)
{
if
(
file
.
changed
)
return
;
if
(
file
.
changed
)
return
;
...
...
app/assets/javascripts/repo/helpers/monaco_loader_helper.js
View file @
f86cea6f
/* global monaco */
/* global monaco */
import
RepoEditor
from
'
../components/repo_editor.vue
'
;
import
RepoEditor
from
'
../components/repo_editor.vue
'
;
import
Repo
Store
from
'
../stores/repo_store
'
;
import
Store
from
'
../stores/repo_store
'
;
import
monacoLoader
from
'
../monaco_loader
'
;
import
monacoLoader
from
'
../monaco_loader
'
;
function
repoEditorLoader
()
{
function
repoEditorLoader
()
{
Repo
Store
.
monacoLoading
=
true
;
Store
.
monacoLoading
=
true
;
return
new
Promise
((
resolve
)
=>
{
return
new
Promise
((
resolve
)
=>
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
monacoLoader
([
'
vs/editor/editor.main
'
],
()
=>
{
Repo
Store
.
monaco
=
monaco
;
Store
.
monaco
=
monaco
;
Repo
Store
.
monacoLoading
=
false
;
Store
.
monacoLoading
=
false
;
resolve
(
RepoEditor
);
resolve
(
RepoEditor
);
});
});
});
});
...
...
app/assets/javascripts/repo/stores/repo_store.js
View file @
f86cea6f
/* global Flash */
/* global Flash */
import
Repo
Helper
from
'
../helpers/repo_helper
'
;
import
Helper
from
'
../helpers/repo_helper
'
;
import
Repo
Service
from
'
../services/repo_service
'
;
import
Service
from
'
../services/repo_service
'
;
const
RepoStore
=
{
const
RepoStore
=
{
ideEl
:
{},
ideEl
:
{},
...
@@ -35,7 +35,7 @@ const RepoStore = {
...
@@ -35,7 +35,7 @@ const RepoStore = {
title
:
''
,
title
:
''
,
status
:
false
,
status
:
false
,
},
},
activeFile
:
Repo
Helper
.
getDefaultActiveFile
(),
activeFile
:
Helper
.
getDefaultActiveFile
(),
activeFileIndex
:
0
,
activeFileIndex
:
0
,
activeLine
:
0
,
activeLine
:
0
,
activeFileLabel
:
'
Raw
'
,
activeFileLabel
:
'
Raw
'
,
...
@@ -79,7 +79,7 @@ const RepoStore = {
...
@@ -79,7 +79,7 @@ const RepoStore = {
},
},
addFilesToDirectory
(
inDirectory
,
currentList
,
newList
)
{
addFilesToDirectory
(
inDirectory
,
currentList
,
newList
)
{
RepoStore
.
files
=
Repo
Helper
.
getNewMergedList
(
inDirectory
,
currentList
,
newList
);
RepoStore
.
files
=
Helper
.
getNewMergedList
(
inDirectory
,
currentList
,
newList
);
},
},
toggleRawPreview
()
{
toggleRawPreview
()
{
...
@@ -100,14 +100,14 @@ const RepoStore = {
...
@@ -100,14 +100,14 @@ const RepoStore = {
}
else
if
(
file
.
newContent
||
file
.
plain
)
{
}
else
if
(
file
.
newContent
||
file
.
plain
)
{
RepoStore
.
blobRaw
=
file
.
newContent
||
file
.
plain
;
RepoStore
.
blobRaw
=
file
.
newContent
||
file
.
plain
;
}
else
{
}
else
{
Repo
Service
.
getRaw
(
file
.
raw_path
)
Service
.
getRaw
(
file
.
raw_path
)
.
then
((
rawResponse
)
=>
{
.
then
((
rawResponse
)
=>
{
RepoStore
.
blobRaw
=
rawResponse
.
data
;
RepoStore
.
blobRaw
=
rawResponse
.
data
;
Repo
Helper
.
findOpenedFileFromActive
().
plain
=
rawResponse
.
data
;
Helper
.
findOpenedFileFromActive
().
plain
=
rawResponse
.
data
;
}).
catch
(
Repo
Helper
.
loadingError
);
}).
catch
(
Helper
.
loadingError
);
}
}
if
(
!
file
.
loading
)
Repo
Helper
.
toURL
(
file
.
url
,
file
.
name
);
if
(
!
file
.
loading
)
Helper
.
toURL
(
file
.
url
,
file
.
name
);
RepoStore
.
binary
=
file
.
binary
;
RepoStore
.
binary
=
file
.
binary
;
},
},
...
@@ -182,7 +182,7 @@ const RepoStore = {
...
@@ -182,7 +182,7 @@ const RepoStore = {
},
},
addPlaceholderFile
()
{
addPlaceholderFile
()
{
const
randomURL
=
Repo
Helper
.
Time
.
now
();
const
randomURL
=
Helper
.
Time
.
now
();
const
newFakeFile
=
{
const
newFakeFile
=
{
active
:
false
,
active
:
false
,
binary
:
true
,
binary
:
true
,
...
...
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