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
eac230ce
Commit
eac230ce
authored
Jul 18, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed queries from vue implementor constructors
parent
358c7359
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
42 deletions
+46
-42
app/assets/javascripts/repo/index.js
app/assets/javascripts/repo/index.js
+19
-8
app/assets/javascripts/repo/repo_binary_viewer.js
app/assets/javascripts/repo/repo_binary_viewer.js
+4
-4
app/assets/javascripts/repo/repo_commit_section.js
app/assets/javascripts/repo/repo_commit_section.js
+4
-5
app/assets/javascripts/repo/repo_edit_button.js
app/assets/javascripts/repo/repo_edit_button.js
+4
-5
app/assets/javascripts/repo/repo_editor.js
app/assets/javascripts/repo/repo_editor.js
+3
-4
app/assets/javascripts/repo/repo_file_buttons.js
app/assets/javascripts/repo/repo_file_buttons.js
+4
-6
app/assets/javascripts/repo/repo_sidebar.js
app/assets/javascripts/repo/repo_sidebar.js
+4
-6
app/assets/javascripts/repo/repo_tabs.js
app/assets/javascripts/repo/repo_tabs.js
+4
-4
No files found.
app/assets/javascripts/repo/index.js
View file @
eac230ce
...
@@ -11,15 +11,26 @@ import Store from './repo_store';
...
@@ -11,15 +11,26 @@ import Store from './repo_store';
import
Helper
from
'
./repo_helper
'
;
import
Helper
from
'
./repo_helper
'
;
$
(()
=>
{
$
(()
=>
{
const
url
=
document
.
getElementById
(
'
ide
'
).
dataset
.
url
;
const
ide
=
document
.
getElementById
(
'
ide
'
);
const
tabs
=
document
.
getElementById
(
'
tabs
'
);
const
sidebar
=
document
.
getElementById
(
'
sidebar
'
);
const
fileButtons
=
document
.
getElementById
(
'
repo-file-buttons
'
);
const
editButton
=
document
.
getElementById
(
'
editable-mode
'
);
const
commitSection
=
document
.
getElementById
(
'
commit-area
'
);
const
binaryViewer
=
document
.
getElementById
(
'
binary-viewer
'
);
const
url
=
ide
.
dataset
.
url
;
Store
.
service
=
Service
;
Store
.
service
=
Service
;
Store
.
service
.
url
=
url
;
Store
.
service
.
url
=
url
;
Store
.
tabs
=
new
Tabs
();
Store
.
sidebar
=
new
Sidebar
(
url
);
Store
.
tabs
=
new
Tabs
(
tabs
);
Store
.
editor
=
new
Editor
();
Store
.
sidebar
=
new
Sidebar
(
sidebar
);
Store
.
buttons
=
new
FileButtons
();
Store
.
editor
=
new
Editor
(
ide
);
Store
.
editButton
=
new
EditButton
();
Store
.
buttons
=
new
FileButtons
(
fileButtons
);
Store
.
commitSection
=
new
CommitSection
();
Store
.
editButton
=
new
EditButton
(
editButton
);
Store
.
binaryViewer
=
new
BinaryViewer
();
Store
.
commitSection
=
new
CommitSection
(
commitSection
);
Store
.
binaryViewer
=
new
BinaryViewer
(
binaryViewer
);
Helper
.
getContent
();
Helper
.
getContent
();
});
});
app/assets/javascripts/repo/repo_binary_viewer.js
View file @
eac230ce
...
@@ -3,13 +3,13 @@ import Store from './repo_store';
...
@@ -3,13 +3,13 @@ import Store from './repo_store';
import
RepoHelper
from
'
./repo_helper
'
;
import
RepoHelper
from
'
./repo_helper
'
;
export
default
class
RepoBinaryViewer
{
export
default
class
RepoBinaryViewer
{
constructor
()
{
constructor
(
el
)
{
this
.
initVue
();
this
.
initVue
(
el
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#binary-viewer
'
,
el
,
data
:
()
=>
Store
,
data
:
()
=>
Store
,
...
...
app/assets/javascripts/repo/repo_commit_section.js
View file @
eac230ce
...
@@ -2,14 +2,13 @@ import Vue from 'vue';
...
@@ -2,14 +2,13 @@ import Vue from 'vue';
import
Store
from
'
./repo_store
'
;
import
Store
from
'
./repo_store
'
;
export
default
class
RepoCommitSection
{
export
default
class
RepoCommitSection
{
constructor
()
{
constructor
(
el
)
{
this
.
initVue
();
this
.
initVue
(
el
);
this
.
el
=
document
.
getElementById
(
'
commit-area
'
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#commit-area
'
,
el
,
data
:
()
=>
Store
,
data
:
()
=>
Store
,
computed
:
{
computed
:
{
...
...
app/assets/javascripts/repo/repo_edit_button.js
View file @
eac230ce
...
@@ -2,14 +2,13 @@ import Vue from 'vue';
...
@@ -2,14 +2,13 @@ import Vue from 'vue';
import
Store
from
'
./repo_store
'
;
import
Store
from
'
./repo_store
'
;
export
default
class
RepoEditButton
{
export
default
class
RepoEditButton
{
constructor
()
{
constructor
(
el
)
{
this
.
initVue
();
this
.
initVue
(
el
);
this
.
el
=
document
.
getElementById
(
'
editable-mode
'
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#editable-mode
'
,
el
,
data
:
()
=>
Store
,
data
:
()
=>
Store
,
computed
:
{
computed
:
{
buttonLabel
()
{
buttonLabel
()
{
...
...
app/assets/javascripts/repo/repo_editor.js
View file @
eac230ce
...
@@ -5,9 +5,9 @@ import Helper from './repo_helper';
...
@@ -5,9 +5,9 @@ import Helper from './repo_helper';
import
monacoLoader
from
'
./monaco_loader
'
;
import
monacoLoader
from
'
./monaco_loader
'
;
export
default
class
RepoEditor
{
export
default
class
RepoEditor
{
constructor
()
{
constructor
(
el
)
{
this
.
initMonaco
();
this
.
initMonaco
();
this
.
el
=
document
.
getElementById
(
'
ide
'
)
;
this
.
el
=
el
;
}
}
addMonacoEvents
()
{
addMonacoEvents
()
{
...
@@ -38,13 +38,12 @@ export default class RepoEditor {
...
@@ -38,13 +38,12 @@ export default class RepoEditor {
initVue
()
{
initVue
()
{
const
self
=
this
;
const
self
=
this
;
const
monacoEditor
=
this
.
monacoEditor
;
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
data
:
()
=>
Store
,
data
:
()
=>
Store
,
created
()
{
created
()
{
this
.
showHide
();
this
.
showHide
();
if
(
this
.
blobRaw
!==
''
)
{
if
(
this
.
blobRaw
!==
''
)
{
monacoEditor
.
setModel
(
self
.
monacoEditor
.
setModel
(
monaco
.
editor
.
createModel
(
monaco
.
editor
.
createModel
(
this
.
blobRaw
,
this
.
blobRaw
,
'
plain
'
,
'
plain
'
,
...
...
app/assets/javascripts/repo/repo_file_buttons.js
View file @
eac230ce
...
@@ -4,15 +4,13 @@ import Helper from './repo_helper';
...
@@ -4,15 +4,13 @@ import Helper from './repo_helper';
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
export
default
class
RepoFileButtons
{
export
default
class
RepoFileButtons
{
constructor
(
url
)
{
constructor
(
el
)
{
this
.
url
=
url
;
this
.
initVue
(
el
);
this
.
initVue
();
this
.
el
=
document
.
getElementById
(
'
repo-file-buttons
'
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#repo-file-buttons
'
,
el
,
data
:
()
=>
Store
,
data
:
()
=>
Store
,
mixins
:
[
RepoMiniMixin
],
mixins
:
[
RepoMiniMixin
],
template
:
`
template
:
`
...
...
app/assets/javascripts/repo/repo_sidebar.js
View file @
eac230ce
...
@@ -9,15 +9,13 @@ import RepoLoadingFile from './repo_loading_file';
...
@@ -9,15 +9,13 @@ import RepoLoadingFile from './repo_loading_file';
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
export
default
class
RepoSidebar
{
export
default
class
RepoSidebar
{
constructor
(
url
)
{
constructor
(
el
)
{
this
.
url
=
url
;
this
.
initVue
(
el
);
this
.
initVue
();
this
.
el
=
document
.
getElementById
(
'
ide
'
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#sidebar
'
,
el
,
mixins
:
[
RepoMiniMixin
],
mixins
:
[
RepoMiniMixin
],
components
:
{
components
:
{
'
repo-file-options
'
:
RepoFileOptions
,
'
repo-file-options
'
:
RepoFileOptions
,
...
...
app/assets/javascripts/repo/repo_tabs.js
View file @
eac230ce
...
@@ -4,14 +4,14 @@ import RepoTab from './repo_tab';
...
@@ -4,14 +4,14 @@ import RepoTab from './repo_tab';
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
import
RepoMiniMixin
from
'
./repo_mini_mixin
'
;
export
default
class
RepoTabs
{
export
default
class
RepoTabs
{
constructor
()
{
constructor
(
el
)
{
RepoTabs
.
styleTabsForWindows
();
RepoTabs
.
styleTabsForWindows
();
this
.
initVue
();
this
.
initVue
(
el
);
}
}
initVue
()
{
initVue
(
el
)
{
this
.
vue
=
new
Vue
({
this
.
vue
=
new
Vue
({
el
:
'
#tabs
'
,
el
,
mixins
:
[
RepoMiniMixin
],
mixins
:
[
RepoMiniMixin
],
components
:
{
components
:
{
'
repo-tab
'
:
RepoTab
,
'
repo-tab
'
:
RepoTab
,
...
...
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