Commit 50e0728c authored by Phil Hughes's avatar Phil Hughes Committed by Douwe Maan

Moved away from vuejs-rails

Fixed issue with resolve buttons always being visible - even when not logged in
parent b550e6ee
...@@ -349,4 +349,3 @@ gem 'health_check', '~> 2.1.0' ...@@ -349,4 +349,3 @@ gem 'health_check', '~> 2.1.0'
# System information # System information
gem 'vmstat', '~> 2.1.1' gem 'vmstat', '~> 2.1.1'
gem 'sys-filesystem', '~> 1.1.6' gem 'sys-filesystem', '~> 1.1.6'
gem 'vuejs-rails'
...@@ -776,7 +776,6 @@ GEM ...@@ -776,7 +776,6 @@ GEM
descendants_tracker (~> 0.0, >= 0.0.3) descendants_tracker (~> 0.0, >= 0.0.3)
equalizer (~> 0.0, >= 0.0.9) equalizer (~> 0.0, >= 0.0.9)
vmstat (2.1.1) vmstat (2.1.1)
vuejs-rails (1.0.24)
warden (1.2.6) warden (1.2.6)
rack (>= 1.0) rack (>= 1.0)
web-console (2.3.0) web-console (2.3.0)
...@@ -985,8 +984,11 @@ DEPENDENCIES ...@@ -985,8 +984,11 @@ DEPENDENCIES
vmstat (~> 2.1.1) vmstat (~> 2.1.1)
======= =======
vmstat (~> 2.1.0) vmstat (~> 2.1.0)
<<<<<<< HEAD
vuejs-rails vuejs-rails
>>>>>>> Diff line comments resolve >>>>>>> Diff line comments resolve
=======
>>>>>>> Moved away from vuejs-rails
web-console (~> 2.0) web-console (~> 2.0)
webmock (~> 1.21.0) webmock (~> 1.21.0)
wikicloth (= 0.8.1) wikicloth (= 0.8.1)
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
loading: false loading: false
computed: computed:
buttonText: -> buttonText: ->
if this.comments[this.noteId] then "Mark as un-resolved" else "Mark as resolved" if this.isResolved then "Mark as un-resolved" else "Mark as resolved"
isResolved: -> this.comments[this.noteId] isResolved: -> this.comments[this.noteId]
methods: methods:
updateTooltip: -> updateTooltip: ->
......
...@@ -44,14 +44,15 @@ ...@@ -44,14 +44,15 @@
= succeed '.' do = succeed '.' do
= link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal" = link_to "command line", "#modal_merge_info", class: "how_to_merge_link vlink", title: "How To Merge", "data-toggle" => "modal"
#resolve-all-app{ "v-cloak" => true } - if current_user
%resolve-all{ "inline-template" => true } #resolve-all-app{ "v-cloak" => true }
.line-resolve-all{ "v-show" => "commentsCount > 0" } %resolve-all{ "inline-template" => true }
%button.btn.btn-gray{ type: "button", "aria-label" => "Resolve all", "@click" => "updateAll", ":disabled" => "loading" } .line-resolve-all{ "v-show" => "commentsCount > 0" }
= icon("spinner spin", "v-show" => "loading") %button.btn.btn-gray{ type: "button", "aria-label" => "Resolve all", "@click" => "updateAll", ":disabled" => "loading" }
{{ buttonText }} = icon("spinner spin", "v-show" => "loading")
%span.line-resolve-text {{ buttonText }}
{{ resolved }}/{{ commentsCount }} comments resolved %span.line-resolve-text
{{ resolved }}/{{ commentsCount }} comments resolved
- if @commits.nonzero? - if @commits.nonzero?
%ul.merge-request-tabs.nav-links.no-top.no-bottom %ul.merge-request-tabs.nav-links.no-top.no-bottom
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
- access = note_max_access_for_user(note) - access = note_max_access_for_user(note)
- if access and not note.system - if access and not note.system
%span.note-role.hidden-xs= access %span.note-role.hidden-xs= access
- unless note.system - if !note.system && current_user
%resolve-btn{ ":endpoint" => "'#{resolve_namespace_project_note_path(note.project.namespace, note.project, note)}'", ":note-id" => note.id, ":resolved" => "false", "inline-template" => true, "v-ref:note_#{note.id}" => true } %resolve-btn{ ":endpoint" => "'#{resolve_namespace_project_note_path(note.project.namespace, note.project, note)}'", ":note-id" => note.id, ":resolved" => "false", "inline-template" => true, "v-ref:note_#{note.id}" => true }
.note-action-button .note-action-button
= icon("spin spinner", "v-show" => "loading") = icon("spin spinner", "v-show" => "loading")
......
This diff is collapsed.
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