Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2018-04-17 18:41:18 +0300
committerPhil Hughes <me@iamphill.com>2018-04-18 16:36:32 +0300
commitfda4128ad0ade7fdffad3bae3eec2bbef27fbaf4 (patch)
tree93559ed508cfda89bd30a01f71b23b447cb35b94
parent201afb0f85aee65d025194c1aa0e73fc4ec9f126 (diff)
moved styles out of the component
added theme styles
-rw-r--r--app/assets/javascripts/ide/components/ide_side_bar.vue15
-rw-r--r--app/assets/javascripts/ide/ide_router.js2
-rw-r--r--app/assets/javascripts/ide/stores/actions.js4
-rw-r--r--app/assets/stylesheets/framework/gitlab_theme.scss4
-rw-r--r--app/assets/stylesheets/pages/repo.scss10
5 files changed, 20 insertions, 15 deletions
diff --git a/app/assets/javascripts/ide/components/ide_side_bar.vue b/app/assets/javascripts/ide/components/ide_side_bar.vue
index b14e4f21f48..a75c9e99bf4 100644
--- a/app/assets/javascripts/ide/components/ide_side_bar.vue
+++ b/app/assets/javascripts/ide/components/ide_side_bar.vue
@@ -49,7 +49,7 @@ export default {
</div>
</template>
<template v-else>
- <div class="context-header">
+ <div class="context-header ide-context-header">
<a
:href="currentProject.web_url"
>
@@ -76,7 +76,6 @@ export default {
{{ currentProject.name }}
</div>
<div
- v-if="currentBranchId !== ''"
class="sidebar-context-title ide-sidebar-branch-title"
>
<icon
@@ -96,15 +95,3 @@ export default {
</div>
</resizable-panel>
</template>
-
-<style>
-.ide-sidebar-branch-title {
- font-weight: normal;
-}
-
-.ide-sidebar-branch-title svg {
- position: relative;
- top: 3px;
- margin-top: -1px;
-}
-</style>
diff --git a/app/assets/javascripts/ide/ide_router.js b/app/assets/javascripts/ide/ide_router.js
index 9f475e9e9b0..ee30e5074b3 100644
--- a/app/assets/javascripts/ide/ide_router.js
+++ b/app/assets/javascripts/ide/ide_router.js
@@ -63,7 +63,7 @@ router.beforeEach((to, from, next) => {
const fullProjectId = `${to.params.namespace}/${to.params.project}`;
if (to.params.branch) {
- store.commit('SET_CURRENT_BRANCH', to.params.branch);
+ store.dispatch('setCurrentBranchId', to.params.branch);
store.dispatch('getBranchData', {
projectId: fullProjectId,
diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js
index e7b98404ebc..87364a8d5e9 100644
--- a/app/assets/javascripts/ide/stores/actions.js
+++ b/app/assets/javascripts/ide/stores/actions.js
@@ -120,6 +120,10 @@ export const setEmptyStateSvgs = ({ commit }, svgs) => {
commit(types.SET_EMPTY_STATE_SVGS, svgs);
};
+export const setCurrentBranchId = ({ commit }, currentBranchId) => {
+ commit(types.SET_CURRENT_BRANCH, currentBranchId);
+};
+
export * from './actions/tree';
export * from './actions/file';
export * from './actions/project';
diff --git a/app/assets/stylesheets/framework/gitlab_theme.scss b/app/assets/stylesheets/framework/gitlab_theme.scss
index 6a03c302d9c..9db89887faf 100644
--- a/app/assets/stylesheets/framework/gitlab_theme.scss
+++ b/app/assets/stylesheets/framework/gitlab_theme.scss
@@ -196,6 +196,10 @@
box-shadow: inset 3px 0 $color-700;
}
}
+
+ .ide-context-header a {
+ color: $color-700;
+ }
}
body {
diff --git a/app/assets/stylesheets/pages/repo.scss b/app/assets/stylesheets/pages/repo.scss
index 7fcf2602e63..6fede2a43f2 100644
--- a/app/assets/stylesheets/pages/repo.scss
+++ b/app/assets/stylesheets/pages/repo.scss
@@ -895,3 +895,13 @@
margin-left: auto;
}
}
+
+.ide-sidebar-branch-title {
+ font-weight: $gl-font-weight-normal;
+
+ svg {
+ position: relative;
+ top: 3px;
+ margin-top: -1px;
+ }
+}