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