diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/images/multi-editor-on.png | bin | 5464 -> 3971 bytes | |||
-rw-r--r-- | app/assets/javascripts/jobs/components/header.vue | 6 | ||||
-rw-r--r-- | app/assets/javascripts/projects_dropdown/index.js | 7 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/diff.scss | 8 | ||||
-rw-r--r-- | app/assets/stylesheets/pages/issuable.scss | 1 | ||||
-rw-r--r-- | app/controllers/projects/jobs_controller.rb | 2 | ||||
-rw-r--r-- | app/helpers/blob_helper.rb | 2 | ||||
-rw-r--r-- | app/models/repository.rb | 4 | ||||
-rw-r--r-- | app/services/merge_requests/build_service.rb | 8 | ||||
-rw-r--r-- | app/views/layouts/header/_default.html.haml | 2 | ||||
-rw-r--r-- | app/views/profiles/preferences/show.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/diffs/_file_header.html.haml | 3 | ||||
-rw-r--r-- | app/views/projects/diffs/_stats.html.haml | 7 | ||||
-rw-r--r-- | app/views/projects/jobs/_empty_state.html.haml | 5 | ||||
-rw-r--r-- | app/views/projects/jobs/_table.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/jobs/show.html.haml | 7 |
17 files changed, 41 insertions, 29 deletions
diff --git a/app/assets/images/multi-editor-on.png b/app/assets/images/multi-editor-on.png Binary files differindex 2bcd29abf13..d51b68da985 100644 --- a/app/assets/images/multi-editor-on.png +++ b/app/assets/images/multi-editor-on.png diff --git a/app/assets/javascripts/jobs/components/header.vue b/app/assets/javascripts/jobs/components/header.vue index c660828b30e..a17514231b5 100644 --- a/app/assets/javascripts/jobs/components/header.vue +++ b/app/assets/javascripts/jobs/components/header.vue @@ -30,8 +30,12 @@ shouldRenderContent() { return !this.isLoading && Object.keys(this.job).length; }, + /** + * When job has not started the key will be `false` + * When job started the key will be a string with a date. + */ jobStarted() { - return this.job.started; + return !this.job.started === false; }, }, methods: { diff --git a/app/assets/javascripts/projects_dropdown/index.js b/app/assets/javascripts/projects_dropdown/index.js index 2660da3c558..e78ebce2923 100644 --- a/app/assets/javascripts/projects_dropdown/index.js +++ b/app/assets/javascripts/projects_dropdown/index.js @@ -19,11 +19,8 @@ document.addEventListener('DOMContentLoaded', () => { return; } - $(navEl).on('show.bs.dropdown', (e) => { - const dropdownEl = $(e.currentTarget).find('.projects-dropdown-menu'); - dropdownEl.one('transitionend', () => { - eventHub.$emit('dropdownOpen'); - }); + $(navEl).on('shown.bs.dropdown', () => { + eventHub.$emit('dropdownOpen'); }); // eslint-disable-next-line no-new diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index 1d081b58f62..7f037582ca0 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -651,12 +651,18 @@ min-width: 0; } - .diff-changed-file-name { + .diff-changed-file-name, + .diff-changed-blank-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } + .diff-changed-blank-file-name { + color: $gl-text-color-tertiary; + font-style: italic; + } + .diff-changed-file-path { color: $gl-text-color-tertiary; } diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index e1637618ab2..ae9a8b0182c 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -303,7 +303,6 @@ .gutter-toggle { margin-top: 7px; border-left: 1px solid $border-gray-normal; - padding-left: 0; text-align: center; } diff --git a/app/controllers/projects/jobs_controller.rb b/app/controllers/projects/jobs_controller.rb index 4865ec3dfe5..8b54ba3ad7c 100644 --- a/app/controllers/projects/jobs_controller.rb +++ b/app/controllers/projects/jobs_controller.rb @@ -29,7 +29,7 @@ class Projects::JobsController < Projects::ApplicationController :project, :tags ]) - @builds = @builds.page(params[:page]).per(30) + @builds = @builds.page(params[:page]).per(30).without_count end def cancel_all diff --git a/app/helpers/blob_helper.rb b/app/helpers/blob_helper.rb index f9dcb32f7c4..5e3b2e5581c 100644 --- a/app/helpers/blob_helper.rb +++ b/app/helpers/blob_helper.rb @@ -46,7 +46,7 @@ module BlobHelper end def ide_edit_text - "#{_('Multi Edit')} <span class='label label-primary'>#{_('Beta')}</span>".html_safe + "#{_('Web IDE')}" end def ide_blob_link(project = @project, ref = @ref, path = @path, options = {}) diff --git a/app/models/repository.rb b/app/models/repository.rb index 9c879e2006b..b36e756c07c 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -103,6 +103,10 @@ class Repository "#<#{self.class.name}:#{@disk_path}>" end + def create_hooks + Gitlab::Git::Repository.create_hooks(path_to_repo, Gitlab.config.gitlab_shell.hooks_path) + end + def commit(ref = 'HEAD') return nil unless exists? return ref if ref.is_a?(::Commit) diff --git a/app/services/merge_requests/build_service.rb b/app/services/merge_requests/build_service.rb index 9622a5c5462..22b9b91a957 100644 --- a/app/services/merge_requests/build_service.rb +++ b/app/services/merge_requests/build_service.rb @@ -154,13 +154,9 @@ module MergeRequests end def assign_title_from_issue - return unless issue + return unless issue && issue.is_a?(Issue) - merge_request.title = - case issue - when Issue then "Resolve \"#{issue.title}\"" - when ExternalIssue then "Resolve #{issue.title}" - end + merge_request.title = "Resolve \"#{issue.title}\"" end def issue_iid diff --git a/app/views/layouts/header/_default.html.haml b/app/views/layouts/header/_default.html.haml index 39eb71c2bac..99e7f3b568d 100644 --- a/app/views/layouts/header/_default.html.haml +++ b/app/views/layouts/header/_default.html.haml @@ -56,8 +56,6 @@ = link_to "Profile", current_user, class: 'profile-link', data: { user: current_user.username } %li = link_to "Settings", profile_path - %li - = link_to "Turn on multi edit", profile_preferences_path - if current_user %li = link_to "Help", help_path diff --git a/app/views/profiles/preferences/show.html.haml b/app/views/profiles/preferences/show.html.haml index 65328791ce5..aeae7455a1c 100644 --- a/app/views/profiles/preferences/show.html.haml +++ b/app/views/profiles/preferences/show.html.haml @@ -5,8 +5,8 @@ = form_for @user, url: profile_preferences_path, remote: true, method: :put, html: { class: 'row prepend-top-default js-preferences-form' } do |f| .col-lg-4 %h4.prepend-top-0 - GitLab multi file editor - %p Unlock an additional editing experience which makes it possible to edit and commit multiple files + Web IDE (Beta) + %p Enable the new web IDE on this device to make it possible to open and edit multiple files with a single commit .col-lg-8.multi-file-editor-options = label_tag do .preview.append-bottom-10= image_tag "multi-editor-off.png" diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index adc4dcbed33..0b01e38d23d 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -11,7 +11,7 @@ - unless diff_file.submodule? - blob = diff_file.blob .file-actions.hidden-xs - - if blob.readable_text? + - if blob&.readable_text? = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: "Toggle comments for this file", disabled: @diff_notes_disabled do = icon('comment') \ diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index 73c316472e3..dbeddf6689a 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -35,3 +35,6 @@ - if diff_file.mode_changed? %small #{diff_file.a_mode} → #{diff_file.b_mode} + + - if diff_file.stored_externally? && diff_file.external_storage == :lfs + %span.label.label-lfs.append-right-5 LFS diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index 325159dd9a7..b082ad0ef0e 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -24,7 +24,12 @@ %a.diff-changed-file{ href: "##{hexdigest(diff_file.file_path)}", title: diff_file.new_path } = sprite_icon(diff_file_changed_icon(diff_file), size: 16, css_class: "#{diff_file_changed_icon_color(diff_file)} diff-file-changed-icon append-right-8") %span.diff-changed-file-content.append-right-8 - %strong.diff-changed-file-name= diff_file.blob.name + - if diff_file.blob&.name + %strong.diff-changed-file-name + = diff_file.blob.name + - else + %strong.diff-changed-blank-file-name + = s_('Diffs|No file name available') %span.diff-changed-file-path.prepend-top-5= diff_file_path_text(diff_file) %span.diff-changed-stats %span.cgreen< diff --git a/app/views/projects/jobs/_empty_state.html.haml b/app/views/projects/jobs/_empty_state.html.haml index c66313bdbf3..311934d9c33 100644 --- a/app/views/projects/jobs/_empty_state.html.haml +++ b/app/views/projects/jobs/_empty_state.html.haml @@ -1,7 +1,7 @@ - illustration = local_assigns.fetch(:illustration) - illustration_size = local_assigns.fetch(:illustration_size) - title = local_assigns.fetch(:title) -- content = local_assigns.fetch(:content) +- content = local_assigns.fetch(:content, nil) - action = local_assigns.fetch(:action, nil) .row.empty-state @@ -11,7 +11,8 @@ .col-xs-12 .text-content %h4.text-center= title - %p= content + - if content + %p= content - if action .text-center = action diff --git a/app/views/projects/jobs/_table.html.haml b/app/views/projects/jobs/_table.html.haml index 82806f022ee..d124d3ebfc1 100644 --- a/app/views/projects/jobs/_table.html.haml +++ b/app/views/projects/jobs/_table.html.haml @@ -22,4 +22,4 @@ = render partial: "projects/ci/builds/build", collection: builds, as: :build, locals: { commit_sha: true, ref: true, pipeline_link: true, stage: true, allow_retry: true, admin: admin } - = paginate builds, theme: 'gitlab' + = paginate_collection(builds) diff --git a/app/views/projects/jobs/show.html.haml b/app/views/projects/jobs/show.html.haml index 8b05440fc78..1e6d6f67e66 100644 --- a/app/views/projects/jobs/show.html.haml +++ b/app/views/projects/jobs/show.html.haml @@ -93,14 +93,13 @@ illustration: 'illustrations/manual_action.svg', illustration_size: 'svg-394', title: _('This job requires a manual action'), - content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments.'), - action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), class: 'btn btn-primary', title: _('Trigger this manual action') ) + content: _('This job depends on a user to trigger its process. Often they are used to deploy code to production environments'), + action: ( link_to _('Trigger this manual action'), play_project_job_path(@project, @build), method: :post, class: 'btn btn-primary', title: _('Trigger this manual action') ) - else = render 'empty_state', illustration: 'illustrations/job_not_triggered.svg', illustration_size: 'svg-306', - title: _('This job has not been triggered yet'), - content: _('This job depends on upstream jobs that need to succeed in order for this job to be triggered.') + title: _('This job has not been triggered yet') = render "sidebar" |