Skip to content
Snippets Groups Projects

Prepare common Vue app for Repository header area

All threads resolved!
4 files
+ 75
44
Compare changes
  • Side-by-side
  • Inline
Files
4
@@ -16,6 +16,7 @@ import BlobControls from '~/repository/components/header_area/blob_controls.vue'
export default {
name: 'HeaderArea',
i18n: {
compare: __('Compare'),
findFile: __('Find file'),
history: __('History'),
},
@@ -44,6 +45,7 @@ export default {
'uploadPath',
'newDirPath',
'projectRootPath',
'comparePath',
],
props: {
projectPath: {
@@ -71,7 +73,7 @@ export default {
},
computed: {
isTreeView() {
return this.$route.name === 'treePathDecoded';
return this.$route.name !== 'blobPathDecoded';
},
historyPath() {
const url = new URL(window.location.href);
@@ -88,7 +90,7 @@ export default {
currentPath() {
return this.$route.params.path;
},
reSelectorQueryParams() {
refSelectorQueryParams() {
return {
sort: 'updated_desc',
};
@@ -123,7 +125,7 @@ export default {
:project-id="projectId"
:value="refSelectorValue"
use-symbolic-ref-names
:query-params="reSelectorQueryParams"
:query-params="refSelectorQueryParams"
@input="onInput"
/>
<breadcrumbs
@@ -146,8 +148,14 @@ export default {
<!-- Tree controls -->
<div v-if="isTreeView" class="gl-mb-3 gl-flex gl-flex-wrap gl-gap-3 sm:gl-mb-0">
<!-- = render_if_exists 'projects/tree/lock_link' -->
<!-- = render 'projects/buttons/compare' -->
<!-- EE: = render_if_exists 'projects/tree/lock_link' -->
<gl-button
v-if="comparePath"
data-testid="tree-compare-control"
:href="comparePath"
class="shortcuts-compare"
>{{ $options.i18n.compare }}</gl-button
>
<gl-button :href="historyPath" data-testid="tree-history-control">{{
$options.i18n.history
}}</gl-button>
@@ -160,8 +168,8 @@ export default {
>
{{ $options.i18n.findFile }}
</gl-button>
<!-- web ide for tree -->
<!-- code for tree + mobile panel -->
<!-- web ide -->
<!-- code + mobile panel -->
</div>
<!-- Blob controls -->
Loading