debian-mirror-gitlab/app/assets/javascripts/super_sidebar/components/super_sidebar.vue

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

52 lines
1.4 KiB
Vue
Raw Normal View History

2023-03-17 16:20:25 +05:30
<script>
import { GlCollapse } from '@gitlab/ui';
import { context } from '../mock_data';
import UserBar from './user_bar.vue';
import ContextSwitcherToggle from './context_switcher_toggle.vue';
import ContextSwitcher from './context_switcher.vue';
2023-04-23 21:23:45 +05:30
import HelpCenter from './help_center.vue';
2023-03-17 16:20:25 +05:30
export default {
context,
components: {
GlCollapse,
UserBar,
ContextSwitcherToggle,
ContextSwitcher,
2023-04-23 21:23:45 +05:30
HelpCenter,
2023-03-17 16:20:25 +05:30
},
props: {
sidebarData: {
type: Object,
required: true,
},
},
data() {
return {
contextSwitcherOpened: false,
};
},
};
</script>
<template>
<aside
2023-04-23 21:23:45 +05:30
id="super-sidebar"
class="super-sidebar gl-fixed gl-bottom-0 gl-left-0 gl-display-flex gl-flex-direction-column gl-bg-gray-10 gl-border-r gl-border-gray-a-08"
2023-03-17 16:20:25 +05:30
data-testid="super-sidebar"
>
<user-bar :sidebar-data="sidebarData" />
<div class="gl-display-flex gl-flex-direction-column gl-flex-grow-1 gl-overflow-hidden">
<div class="gl-flex-grow-1 gl-overflow-auto">
<context-switcher-toggle :context="$options.context" :expanded="contextSwitcherOpened" />
<gl-collapse id="context-switcher" v-model="contextSwitcherOpened">
<context-switcher />
</gl-collapse>
</div>
2023-04-23 21:23:45 +05:30
<div class="gl-p-3">
<help-center :sidebar-data="sidebarData" />
2023-03-17 16:20:25 +05:30
</div>
</div>
</aside>
</template>