Skip to content
Snippets Groups Projects
Commit 0eb3d2f7 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 5564275a
No related branches found
No related tags found
No related merge requests found
Showing
with 25 additions and 43 deletions
Loading
Loading
@@ -10,9 +10,6 @@ globals:
localStorage: false
IS_EE: false
plugins:
- import
- "@gitlab/i18n"
- "@gitlab/vue-i18n"
- no-jquery
settings:
import/resolver:
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@ export default {
data-toggle="dropdown"
data-display="static"
>
<icon name="settings" /> <icon name="arrow-down" />
<icon name="settings" /> <icon name="chevron-down" />
</button>
<div class="dropdown-menu dropdown-menu-right p-2 pt-3 pb-3">
<div>
Loading
Loading
Loading
Loading
@@ -64,7 +64,7 @@ export default {
class="rounded border-0 d-flex ide-entry-dropdown-toggle"
@click.stop="openDropdown()"
>
<icon name="ellipsis_v" /> <icon name="arrow-down" />
<icon name="ellipsis_v" /> <icon name="chevron-down" />
</button>
<ul ref="dropdownMenu" class="dropdown-menu dropdown-menu-right">
<template v-if="type === 'tree'">
Loading
Loading
Loading
Loading
@@ -86,7 +86,6 @@ export const createTempEntry = (
 
dispatch('setFileActive', file.path);
dispatch('triggerFilesChange');
dispatch('burstUnusedSeal');
}
 
if (parentPath && !state.entries[parentPath].opened) {
Loading
Loading
@@ -175,12 +174,6 @@ export const updateTempFlagForEntry = ({ commit, dispatch, state }, { file, temp
export const toggleFileFinder = ({ commit }, fileFindVisible) =>
commit(types.TOGGLE_FILE_FINDER, fileFindVisible);
 
export const burstUnusedSeal = ({ state, commit }) => {
if (state.unusedSeal) {
commit(types.BURST_UNUSED_SEAL);
}
};
export const setLinks = ({ commit }, links) => commit(types.SET_LINKS, links);
 
export const setErrorMessage = ({ commit }, errorMessage) =>
Loading
Loading
@@ -209,8 +202,6 @@ export const deleteEntry = ({ commit, dispatch, state }, path) => {
return;
}
 
dispatch('burstUnusedSeal');
if (entry.opened) dispatch('closeFile', entry);
 
if (isTree) {
Loading
Loading
@@ -262,8 +253,6 @@ export const renameEntry = ({ dispatch, commit, state, getters }, { path, name,
if (gon.features?.stageAllByDefault)
commit(types.STAGE_CHANGE, { path: newPath, diffInfo: getters.getDiffInfo(newPath) });
else commit(types.ADD_FILE_TO_CHANGED, newPath);
dispatch('burstUnusedSeal');
}
 
if (!newEntry.tempFile) {
Loading
Loading
Loading
Loading
@@ -148,7 +148,7 @@ export const getRawFileData = ({ state, commit, dispatch, getters }, { path }) =
});
};
 
export const changeFileContent = ({ commit, dispatch, state, getters }, { path, content }) => {
export const changeFileContent = ({ commit, state, getters }, { path, content }) => {
const file = state.entries[path];
commit(types.UPDATE_FILE_CONTENT, {
path,
Loading
Loading
@@ -164,8 +164,6 @@ export const changeFileContent = ({ commit, dispatch, state, getters }, { path,
} else if (!file.changed && !file.tempFile && indexOfChangedFile !== -1) {
commit(types.REMOVE_FILE_FROM_CHANGED, path);
}
dispatch('burstUnusedSeal', {}, { root: true });
};
 
export const setFileLanguage = ({ getters, commit }, { fileLanguage }) => {
Loading
Loading
Loading
Loading
@@ -67,7 +67,6 @@ export const REMOVE_PENDING_TAB = 'REMOVE_PENDING_TAB';
export const UPDATE_ACTIVITY_BAR_VIEW = 'UPDATE_ACTIVITY_BAR_VIEW';
export const UPDATE_TEMP_FLAG = 'UPDATE_TEMP_FLAG';
export const TOGGLE_FILE_FINDER = 'TOGGLE_FILE_FINDER';
export const BURST_UNUSED_SEAL = 'BURST_UNUSED_SEAL';
 
export const CLEAR_PROJECTS = 'CLEAR_PROJECTS';
export const RESET_OPEN_FILES = 'RESET_OPEN_FILES';
Loading
Loading
Loading
Loading
@@ -180,11 +180,6 @@ export default {
});
}
},
[types.BURST_UNUSED_SEAL](state) {
Object.assign(state, {
unusedSeal: false,
});
},
[types.SET_LINKS](state, links) {
Object.assign(state, { links });
},
Loading
Loading
@@ -226,6 +221,8 @@ export default {
state.changedFiles = state.changedFiles.concat(entry);
}
}
state.unusedSeal = false;
},
[types.RENAME_ENTRY](state, { path, name, parentPath }) {
const oldEntry = state.entries[path];
Loading
Loading
Loading
Loading
@@ -153,11 +153,13 @@ export default {
[types.ADD_FILE_TO_CHANGED](state, path) {
Object.assign(state, {
changedFiles: state.changedFiles.concat(state.entries[path]),
unusedSeal: false,
});
},
[types.REMOVE_FILE_FROM_CHANGED](state, path) {
Object.assign(state, {
changedFiles: state.changedFiles.filter(f => f.path !== path),
unusedSeal: false,
});
},
[types.STAGE_CHANGE](state, { path, diffInfo }) {
Loading
Loading
@@ -173,6 +175,7 @@ export default {
deleted: diffInfo.deleted,
}),
}),
unusedSeal: false,
});
 
if (stagedFile) {
Loading
Loading
Loading
Loading
@@ -52,7 +52,7 @@ export default {
>
<icon name="doc-code" class="align-top append-right-4" />
{{ __('Source code') }}
<icon name="arrow-down" />
<icon name="chevron-down" />
</button>
 
<div class="js-sources-dropdown dropdown-menu">
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@ export default {
currentPath: {
type: String,
required: false,
default: '/',
default: '',
},
canCollaborate: {
type: Boolean,
Loading
Loading
@@ -107,7 +107,7 @@ export default {
return acc.concat({
name,
path,
to: `/-/tree/${escape(this.ref)}${path}`,
to: `/-/tree/${escape(this.ref)}${escape(path)}`,
});
},
[
Loading
Loading
@@ -133,7 +133,7 @@ export default {
},
{
attrs: {
href: `${this.newBlobPath}${this.currentPath}`,
href: `${this.newBlobPath}/${this.currentPath ? escape(this.currentPath) : ''}`,
class: 'qa-new-file-option',
},
text: __('New file'),
Loading
Loading
@@ -242,7 +242,7 @@ export default {
<template slot="button-content">
<span class="sr-only">{{ __('Add to tree') }}</span>
<icon name="plus" :size="16" class="float-left" />
<icon name="arrow-down" :size="16" class="float-left" />
<icon name="chevron-down" :size="16" class="float-left" />
</template>
<template v-for="(item, i) in dropdownItems">
<component :is="getComponent(item.type)" :key="i" v-bind="item.attrs">
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ export default {
return splitArray.join('/');
},
parentRoute() {
return { path: `/-/tree/${escape(this.commitRef)}/${this.parentPath}` };
return { path: `/-/tree/${escape(this.commitRef)}/${escape(this.parentPath)}` };
},
},
methods: {
Loading
Loading
Loading
Loading
@@ -90,7 +90,7 @@ export default {
},
computed: {
routerLinkTo() {
return this.isFolder ? { path: `/-/tree/${escape(this.ref)}/${this.path}` } : null;
return this.isFolder ? { path: `/-/tree/${escape(this.ref)}/${escape(this.path)}` } : null;
},
iconName() {
return `fa-${getIconName(this.type, this.path)}`;
Loading
Loading
Loading
Loading
@@ -100,7 +100,7 @@ export default function setupVueRepositoryList() {
render(h) {
return h(TreeActionLink, {
props: {
path: `${historyLink}/${this.$route.params.path || ''}`,
path: `${historyLink}/${this.$route.params.path ? escape(this.$route.params.path) : ''}`,
text: __('History'),
},
});
Loading
Loading
Loading
Loading
@@ -27,9 +27,8 @@ export function fetchLogsTree(client, path, offset, resolver = null) {
 
fetchpromise = axios
.get(
`${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${path.replace(
/^\//,
'',
`${gon.relative_url_root}/${projectPath}/-/refs/${escape(ref)}/logs_tree/${escape(
path.replace(/^\//, ''),
)}`,
{
params: { format: 'json', offset },
Loading
Loading
Loading
Loading
@@ -69,7 +69,7 @@ export default {
data-display="static"
data-toggle="dropdown"
>
<icon name="arrow-down" :aria-label="__('toggle dropdown')" />
<icon name="chevron-down" :aria-label="__('toggle dropdown')" />
</button>
<ul :class="dropdownClass" class="dropdown-menu dropdown-open-top">
<template v-for="(action, index) in actions">
Loading
Loading
Loading
Loading
@@ -32,7 +32,7 @@ class Projects::TreeController < Projects::ApplicationController
 
respond_to do |format|
format.html do
lfs_blob_ids if Feature.disabled?(:vue_file_list, @project)
lfs_blob_ids if Feature.disabled?(:vue_file_list, @project, default_enabled: true)
 
@last_commit = @repository.last_commit_for_path(@commit.id, @tree.path) || @commit
end
Loading
Loading
Loading
Loading
@@ -296,7 +296,7 @@ class ProjectsController < Projects::ApplicationController
private
 
def show_blob_ids?
repo_exists? && project_view_files? && Feature.disabled?(:vue_file_list, @project)
repo_exists? && project_view_files? && Feature.disabled?(:vue_file_list, @project, default_enabled: true)
end
 
# Render project landing depending of which features are available
Loading
Loading
Loading
Loading
@@ -45,7 +45,7 @@ class ProjectsFinder < UnionFinder
end
 
use_cte = params.delete(:use_cte)
collection = Project.wrap_authorized_projects_with_cte(collection) if use_cte
collection = Project.wrap_with_cte(collection) if use_cte
collection = filter_projects(collection)
sort(collection)
end
Loading
Loading
Loading
Loading
@@ -703,7 +703,7 @@ module ProjectsHelper
end
 
def vue_file_list_enabled?
Feature.enabled?(:vue_file_list, @project)
Feature.enabled?(:vue_file_list, @project, default_enabled: true)
end
 
def native_code_navigation_enabled?(project)
Loading
Loading
Loading
Loading
@@ -548,8 +548,8 @@ class Project < ApplicationRecord
)
end
 
def self.wrap_authorized_projects_with_cte(collection)
cte = Gitlab::SQL::CTE.new(:authorized_projects, collection)
def self.wrap_with_cte(collection)
cte = Gitlab::SQL::CTE.new(:projects_cte, collection)
Project.with(cte.to_arel).from(cte.alias_to(Project.arel_table))
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment