diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:09:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-06 18:09:11 +0300 |
commit | 0eb3d2f799ce4f4de87fb9fc6fd98e592323bc89 (patch) | |
tree | fd70d5bc63fe152e0a67aaa5a70e4c9f16dc6ffc /app/assets | |
parent | 5564275a0b378298dc6281599cbfe71a937109ff (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
14 files changed, 19 insertions, 34 deletions
diff --git a/app/assets/javascripts/diffs/components/settings_dropdown.vue b/app/assets/javascripts/diffs/components/settings_dropdown.vue index 0129763161a..08e991c4791 100644 --- a/app/assets/javascripts/diffs/components/settings_dropdown.vue +++ b/app/assets/javascripts/diffs/components/settings_dropdown.vue @@ -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> diff --git a/app/assets/javascripts/ide/components/new_dropdown/index.vue b/app/assets/javascripts/ide/components/new_dropdown/index.vue index b2fa020fb00..9961c0df52e 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/index.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/index.vue @@ -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'"> diff --git a/app/assets/javascripts/ide/stores/actions.js b/app/assets/javascripts/ide/stores/actions.js index 34e7cc304dd..9bc008c0dd5 100644 --- a/app/assets/javascripts/ide/stores/actions.js +++ b/app/assets/javascripts/ide/stores/actions.js @@ -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) { diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js index 55ee8a699c8..052120059c4 100644 --- a/app/assets/javascripts/ide/stores/actions/file.js +++ b/app/assets/javascripts/ide/stores/actions/file.js @@ -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 }) => { diff --git a/app/assets/javascripts/ide/stores/mutation_types.js b/app/assets/javascripts/ide/stores/mutation_types.js index 4dde53a9fdf..78831bdf022 100644 --- a/app/assets/javascripts/ide/stores/mutation_types.js +++ b/app/assets/javascripts/ide/stores/mutation_types.js @@ -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'; diff --git a/app/assets/javascripts/ide/stores/mutations.js b/app/assets/javascripts/ide/stores/mutations.js index e84e2782e46..49485f4d575 100644 --- a/app/assets/javascripts/ide/stores/mutations.js +++ b/app/assets/javascripts/ide/stores/mutations.js @@ -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]; diff --git a/app/assets/javascripts/ide/stores/mutations/file.js b/app/assets/javascripts/ide/stores/mutations/file.js index 313fa1fe029..5c5920a3027 100644 --- a/app/assets/javascripts/ide/stores/mutations/file.js +++ b/app/assets/javascripts/ide/stores/mutations/file.js @@ -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) { diff --git a/app/assets/javascripts/releases/list/components/release_block_assets.vue b/app/assets/javascripts/releases/list/components/release_block_assets.vue index e840bc90d68..06b7f97a8de 100644 --- a/app/assets/javascripts/releases/list/components/release_block_assets.vue +++ b/app/assets/javascripts/releases/list/components/release_block_assets.vue @@ -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"> diff --git a/app/assets/javascripts/repository/components/breadcrumbs.vue b/app/assets/javascripts/repository/components/breadcrumbs.vue index 9d6eda55c1e..751565ad542 100644 --- a/app/assets/javascripts/repository/components/breadcrumbs.vue +++ b/app/assets/javascripts/repository/components/breadcrumbs.vue @@ -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"> diff --git a/app/assets/javascripts/repository/components/table/parent_row.vue b/app/assets/javascripts/repository/components/table/parent_row.vue index 096c25a693f..a5c6c9822fb 100644 --- a/app/assets/javascripts/repository/components/table/parent_row.vue +++ b/app/assets/javascripts/repository/components/table/parent_row.vue @@ -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: { diff --git a/app/assets/javascripts/repository/components/table/row.vue b/app/assets/javascripts/repository/components/table/row.vue index e7bbca957c1..f97c8ae1f74 100644 --- a/app/assets/javascripts/repository/components/table/row.vue +++ b/app/assets/javascripts/repository/components/table/row.vue @@ -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)}`; diff --git a/app/assets/javascripts/repository/index.js b/app/assets/javascripts/repository/index.js index aefbef5467d..637060f6ed9 100644 --- a/app/assets/javascripts/repository/index.js +++ b/app/assets/javascripts/repository/index.js @@ -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'), }, }); diff --git a/app/assets/javascripts/repository/log_tree.js b/app/assets/javascripts/repository/log_tree.js index aefa4963d5f..192e410b36f 100644 --- a/app/assets/javascripts/repository/log_tree.js +++ b/app/assets/javascripts/repository/log_tree.js @@ -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 }, diff --git a/app/assets/javascripts/vue_shared/components/droplab_dropdown_button.vue b/app/assets/javascripts/vue_shared/components/droplab_dropdown_button.vue index c35fee84771..9aca210c1fb 100644 --- a/app/assets/javascripts/vue_shared/components/droplab_dropdown_button.vue +++ b/app/assets/javascripts/vue_shared/components/droplab_dropdown_button.vue @@ -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"> |