Commit 55f1d477 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 7ec169601dd4
......@@ -10,9 +10,6 @@ globals:
localStorage: false
IS_EE: false
plugins:
- import
- "@gitlab/i18n"
- "@gitlab/vue-i18n"
- no-jquery
settings:
import/resolver:
......
......@@ -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>
......
......@@ -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'">
......
......@@ -86,7 +86,6 @@ export const createTempEntry = (
dispatch('setFileActive', file.path);
dispatch('triggerFilesChange');
dispatch('burstUnusedSeal');
}
if (parentPath && !state.entries[parentPath].opened) {
......@@ -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) =>
......@@ -209,8 +202,6 @@ export const deleteEntry = ({ commit, dispatch, state }, path) => {
return;
}
dispatch('burstUnusedSeal');
if (entry.opened) dispatch('closeFile', entry);
if (isTree) {
......@@ -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) {
......
......@@ -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,
......@@ -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 }) => {
......
......@@ -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';
......
......@@ -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 });
},
......@@ -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];
......
......@@ -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 }) {
......@@ -173,6 +175,7 @@ export default {
deleted: diffInfo.deleted,
}),
}),
unusedSeal: false,
});
if (stagedFile) {
......
......@@ -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">
......
......@@ -45,7 +45,7 @@ export default {
currentPath: {
type: String,
required: false,
default: '/',
default: '',
},
canCollaborate: {
type: Boolean,
......@@ -107,7 +107,7 @@ export default {
return acc.concat({
name,
path,
to: `/-/tree/${escape(this.ref)}${path}`,
to: `/-/tree/${escape(this.ref)}${escape(path)}`,
});
},
[
......@@ -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'),
......@@ -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">
......
......@@ -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: {
......
......@@ -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)}`;
......
......@@ -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'),
},
});
......
......@@ -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 },
......
......@@ -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">
......
......@@ -32,7 +32,7 @@ def show
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
......
......@@ -296,7 +296,7 @@ def resolve
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
......
......@@ -45,7 +45,7 @@ def execute
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
......
......@@ -703,7 +703,7 @@ def user_can_see_auto_devops_implicitly_enabled_banner?(project, user)
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)
......
......@@ -548,8 +548,8 @@ def self.filter_by_feature_visibility(feature, user)
)
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment