summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/diff_notes
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-10-02 13:32:53 +0100
committerPhil Hughes <me@iamphill.com>2017-10-10 10:14:22 +0100
commitfa2af5e0f5e290eff32f62c7ea9f935a6ad33967 (patch)
tree539846b44a1e8e5c0c3117bf71455c6131c135d1 /app/assets/javascripts/diff_notes
parent99806914a5ca382b22588de722a0db1c7a8bfff6 (diff)
downloadgitlab-ce-fa2af5e0f5e290eff32f62c7ea9f935a6ad33967.tar.gz
Flash is now a ES6 module
Reduced the technical debt around our JS flash function by making it a module that is imported rather than relying on the global function. The global function still exists mainly for technical debt with how some requests are being completed, but new JS should import the module directly. Also reduces some tech debt in the file by removing the need for jQuery. Instead Flash is now 100% vanilla JS.
Diffstat (limited to 'app/assets/javascripts/diff_notes')
-rw-r--r--app/assets/javascripts/diff_notes/components/resolve_btn.js2
-rw-r--r--app/assets/javascripts/diff_notes/services/resolve.js2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/assets/javascripts/diff_notes/components/resolve_btn.js b/app/assets/javascripts/diff_notes/components/resolve_btn.js
index efb6ced9f46..20ddcbfb8bd 100644
--- a/app/assets/javascripts/diff_notes/components/resolve_btn.js
+++ b/app/assets/javascripts/diff_notes/components/resolve_btn.js
@@ -1,9 +1,9 @@
/* eslint-disable comma-dangle, object-shorthand, func-names, quote-props, no-else-return, camelcase, max-len */
/* global CommentsStore */
/* global ResolveService */
-/* global Flash */
import Vue from 'vue';
+import Flash from '../../flash';
const ResolveBtn = Vue.extend({
props: {
diff --git a/app/assets/javascripts/diff_notes/services/resolve.js b/app/assets/javascripts/diff_notes/services/resolve.js
index 2f063f6fe1f..6eae54f830b 100644
--- a/app/assets/javascripts/diff_notes/services/resolve.js
+++ b/app/assets/javascripts/diff_notes/services/resolve.js
@@ -1,7 +1,7 @@
-/* global Flash */
/* global CommentsStore */
import Vue from 'vue';
+import Flash from '../../flash';
import '../../vue_shared/vue_resource_interceptor';
window.gl = window.gl || {};