Commit af5fc6e2 authored by Phil Hughes's avatar Phil Hughes Committed by Douwe Maan

Diff line comments resolve

parent fb362795
......@@ -349,3 +349,4 @@ gem 'health_check', '~> 2.1.0'
# System information
gem 'vmstat', '~> 2.1.1'
gem 'sys-filesystem', '~> 1.1.6'
gem 'vuejs-rails'
......@@ -776,6 +776,7 @@ GEM
descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9)
vmstat (2.1.1)
vuejs-rails (1.0.24)
warden (1.2.6)
rack (>= 1.0)
web-console (2.3.0)
......@@ -980,7 +981,12 @@ DEPENDENCIES
unicorn-worker-killer (~> 0.4.2)
version_sorter (~> 2.0.0)
virtus (~> 1.0.1)
<<<<<<< HEAD
vmstat (~> 2.1.1)
=======
vmstat (~> 2.1.0)
vuejs-rails
>>>>>>> Diff line comments resolve
web-console (~> 2.0)
webmock (~> 1.21.0)
wikicloth (= 0.8.1)
......
#= require vue
#= require_directory ./components
$ ->
new Vue
el: '#notes'
LineBtn = Vue.extend
props:
noteId: Number
resolved: Boolean
computed:
buttonText: ->
if this.resolved then "Mark as un-resolved" else "Mark as resolved"
methods:
updateTooltip: ->
$(this.$el)
.tooltip('hide')
.tooltip('fixTitle')
resolve: ->
this.$set('resolved', !this.resolved)
this.$nextTick this.updateTooltip
compiled: ->
$(this.$el).tooltip()
Vue.component 'line-btn', LineBtn
......@@ -383,3 +383,47 @@ ul.notes {
color: $gl-link-color;
}
}
.line-resolve-all {
padding: 10px;
border: 1px solid $border-color;
border-radius: 2px;
.btn {
margin-right: 10px;
}
}
.line-resolve-text {
vertical-align: middle;
}
.line-resolve-btn {
position: relative;
top: -1px;
width: 14px;
height: 14px;
padding: 0;
background-color: transparent;
border: 1px solid #c3c3c3;
border-radius: 50%;
outline: 0;
vertical-align: middle;
&:hover,
&.is-active {
color: #fff;
background-color: $gl-text-green;
border-color: $gl-text-green;
.fa {
color: #fff;
}
}
.fa {
top: 2px;
font-size: 8px;
vertical-align: top;
}
}
- page_title "#{@merge_request.title} (#{@merge_request.to_reference})", "Merge Requests"
- page_description @merge_request.description
- page_card_attributes @merge_request.card_attributes
- content_for :page_specific_javascripts do
= page_specific_javascript_tag('line_comments/application.js')
- if diff_view == 'parallel'
- fluid_layout true
......
......@@ -20,6 +20,10 @@
- access = note_max_access_for_user(note)
- if access and not note.system
%span.note-role.hidden-xs= access
- unless note.system
%line-btn{ ":note-id" => note.id, ":resolved" => "false", "inline-template" => true }
%button.note-action-button.line-resolve-btn{ type: "button", "v-bind:class" => "{ 'is-active': resolved }", "v-bind:aria-label" => "buttonText", "v-on:click" => "resolve", "v-bind:title" => "buttonText" }
= icon("check")
- if current_user and not note.system
= link_to '#', title: 'Award Emoji', class: 'note-action-button note-emoji-button js-add-award js-note-emoji', data: { position: 'right' } do
= icon('spinner spin')
......
......@@ -85,6 +85,7 @@ module Gitlab
config.assets.precompile << "users/users_bundle.js"
config.assets.precompile << "network/network_bundle.js"
config.assets.precompile << "profile/profile_bundle.js"
config.assets.precompile << "line_comments/application.js"
config.assets.precompile << "lib/utils/*.js"
config.assets.precompile << "lib/*.js"
config.assets.precompile << "u2f.js"
......
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