diff options
author | Jacob Schatz <jschatz1@gmail.com> | 2017-08-06 17:53:59 +0300 |
---|---|---|
committer | Jacob Schatz <jschatz1@gmail.com> | 2017-08-06 17:53:59 +0300 |
commit | f86cea6fdb59612e675d006559705a91e7371c15 (patch) | |
tree | 6b847ecc13ec37ad3ecafdd15fc605541c5d214a /app/assets | |
parent | 863114b4f5bc95b5a6b9e814b98306166f88bb35 (diff) |
Make Store->RepoStore and others consistent.
Diffstat (limited to 'app/assets')
5 files changed, 19 insertions, 19 deletions
diff --git a/app/assets/javascripts/repo/components/repo.vue b/app/assets/javascripts/repo/components/repo.vue index 78d2970f340..8c645465553 100644 --- a/app/assets/javascripts/repo/components/repo.vue +++ b/app/assets/javascripts/repo/components/repo.vue @@ -8,7 +8,7 @@ import RepoPreview from './repo_preview.vue'; import RepoMixin from '../mixins/repo_mixin'; import PopupDialog from '../../vue_shared/components/popup_dialog.vue'; import Store from '../stores/repo_store'; -import RepoHelper from '../helpers/repo_helper'; +import Helper from '../helpers/repo_helper'; import MonacoLoaderHelper from '../helpers/monaco_loader_helper'; export default { @@ -26,7 +26,7 @@ export default { }, mounted() { - RepoHelper.getContent().catch(RepoHelper.loadingError); + Helper.getContent().catch(Helper.loadingError); }, methods: { diff --git a/app/assets/javascripts/repo/components/repo_binary_viewer.vue b/app/assets/javascripts/repo/components/repo_binary_viewer.vue index 4390c1021a3..f843244950d 100644 --- a/app/assets/javascripts/repo/components/repo_binary_viewer.vue +++ b/app/assets/javascripts/repo/components/repo_binary_viewer.vue @@ -1,6 +1,6 @@ <script> import Store from '../stores/repo_store'; -import RepoHelper from '../helpers/repo_helper'; +import Helper from '../helpers/repo_helper'; const RepoBinaryViewer = { data: () => Store, @@ -41,7 +41,7 @@ const RepoBinaryViewer = { watch: { blobRaw() { Store.resetBinaryTypes(); - if (RepoHelper.isKindaBinary()) { + if (Helper.isKindaBinary()) { this.activeFile.raw = false; // counts as binaryish so we use the binary viewer in this case. this.binary = true; diff --git a/app/assets/javascripts/repo/components/repo_tab.vue b/app/assets/javascripts/repo/components/repo_tab.vue index 90685c0f3bb..712d64c236f 100644 --- a/app/assets/javascripts/repo/components/repo_tab.vue +++ b/app/assets/javascripts/repo/components/repo_tab.vue @@ -1,5 +1,5 @@ <script> -import RepoStore from '../stores/repo_store'; +import Store from '../stores/repo_store'; const RepoTab = { props: { @@ -20,7 +20,7 @@ const RepoTab = { }, methods: { - tabClicked: RepoStore.setActiveFiles, + tabClicked: Store.setActiveFiles, xClicked(file) { if (file.changed) return; diff --git a/app/assets/javascripts/repo/helpers/monaco_loader_helper.js b/app/assets/javascripts/repo/helpers/monaco_loader_helper.js index 72aa43c38d2..d9e29028634 100644 --- a/app/assets/javascripts/repo/helpers/monaco_loader_helper.js +++ b/app/assets/javascripts/repo/helpers/monaco_loader_helper.js @@ -1,14 +1,14 @@ /* global monaco */ import RepoEditor from '../components/repo_editor.vue'; -import RepoStore from '../stores/repo_store'; +import Store from '../stores/repo_store'; import monacoLoader from '../monaco_loader'; function repoEditorLoader() { - RepoStore.monacoLoading = true; + Store.monacoLoading = true; return new Promise((resolve) => { monacoLoader(['vs/editor/editor.main'], () => { - RepoStore.monaco = monaco; - RepoStore.monacoLoading = false; + Store.monaco = monaco; + Store.monacoLoading = false; resolve(RepoEditor); }); }); diff --git a/app/assets/javascripts/repo/stores/repo_store.js b/app/assets/javascripts/repo/stores/repo_store.js index 5a18707f3b7..06ca391ed0c 100644 --- a/app/assets/javascripts/repo/stores/repo_store.js +++ b/app/assets/javascripts/repo/stores/repo_store.js @@ -1,6 +1,6 @@ /* global Flash */ -import RepoHelper from '../helpers/repo_helper'; -import RepoService from '../services/repo_service'; +import Helper from '../helpers/repo_helper'; +import Service from '../services/repo_service'; const RepoStore = { ideEl: {}, @@ -35,7 +35,7 @@ const RepoStore = { title: '', status: false, }, - activeFile: RepoHelper.getDefaultActiveFile(), + activeFile: Helper.getDefaultActiveFile(), activeFileIndex: 0, activeLine: 0, activeFileLabel: 'Raw', @@ -79,7 +79,7 @@ const RepoStore = { }, addFilesToDirectory(inDirectory, currentList, newList) { - RepoStore.files = RepoHelper.getNewMergedList(inDirectory, currentList, newList); + RepoStore.files = Helper.getNewMergedList(inDirectory, currentList, newList); }, toggleRawPreview() { @@ -100,14 +100,14 @@ const RepoStore = { } else if (file.newContent || file.plain) { RepoStore.blobRaw = file.newContent || file.plain; } else { - RepoService.getRaw(file.raw_path) + Service.getRaw(file.raw_path) .then((rawResponse) => { RepoStore.blobRaw = rawResponse.data; - RepoHelper.findOpenedFileFromActive().plain = rawResponse.data; - }).catch(RepoHelper.loadingError); + Helper.findOpenedFileFromActive().plain = rawResponse.data; + }).catch(Helper.loadingError); } - if (!file.loading) RepoHelper.toURL(file.url, file.name); + if (!file.loading) Helper.toURL(file.url, file.name); RepoStore.binary = file.binary; }, @@ -182,7 +182,7 @@ const RepoStore = { }, addPlaceholderFile() { - const randomURL = RepoHelper.Time.now(); + const randomURL = Helper.Time.now(); const newFakeFile = { active: false, binary: true, |