Commit 702f9f2a authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 7ec169601dd4
......@@ -10,9 +10,6 @@
localStorage: false
IS_EE: false
plugins:
- import
- "@gitlab/i18n"
- "@gitlab/vue-i18n"
- no-jquery
settings:
import/resolver:
......
......@@ -31,7 +31,7 @@
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 @@
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 @@
dispatch('setFileActive', file.path);
dispatch('triggerFilesChange');
dispatch('burstUnusedSeal');
}
if (parentPath && !state.entries[parentPath].opened) {
......@@ -175,12 +174,6 @@
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 @@
return;
}
dispatch('burstUnusedSeal');
if (entry.opened) dispatch('closeFile', entry);
if (isTree) {
......@@ -262,8 +253,6 @@
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 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 @@
} 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 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 @@
});
}
},
[types.BURST_UNUSED_SEAL](state) {
Object.assign(state, {
unusedSeal: false,
});
},
[types.SET_LINKS](state, links) {
Object.assign(state, { links });
},
......@@ -226,6 +221,8 @@
state.changedFiles = state.changedFiles.concat(entry);
}
}
state.unusedSeal = false;
},
[types.RENAME_ENTRY](state, { path, name, parentPath }) {
const oldEntry = state.entries[path];
......
......@@ -153,8 +153,9 @@
[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),
......@@ -156,8 +157,9 @@
});
},
[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 @@
deleted: diffInfo.deleted,
}),
}),
unusedSeal: false,
});
if (stagedFile) {
......
......@@ -52,7 +52,7 @@
>
<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 @@
currentPath: {
type: String,
required: false,
default: '/',
default: '',
},
canCollaborate: {
type: Boolean,
......@@ -107,7 +107,7 @@
return acc.concat({
name,
path,
to: `/-/tree/${escape(this.ref)}${path}`,
to: `/-/tree/${escape(this.ref)}${escape(path)}`,
});
},
[
......@@ -133,7 +133,7 @@
},
{
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 @@
<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 @@
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 @@
},
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
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 @@
)
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
......
Supports Markdown
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