Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-09-24 21:06:05 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2019-09-24 21:06:05 +0300
commit2ed368929ab5094fec5da8038f723463596a80cf (patch)
treeaec98d50349b0e9a490db0099253b801b2d1a9ea /app/assets/javascripts/vue_shared
parentf1a5755898e865428c923587402fd965b601c4ea (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/vue_shared')
-rw-r--r--app/assets/javascripts/vue_shared/gl_feature_flags_plugin.js7
-rw-r--r--app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js8
2 files changed, 15 insertions, 0 deletions
diff --git a/app/assets/javascripts/vue_shared/gl_feature_flags_plugin.js b/app/assets/javascripts/vue_shared/gl_feature_flags_plugin.js
new file mode 100644
index 00000000000..3488a44bd0f
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/gl_feature_flags_plugin.js
@@ -0,0 +1,7 @@
+export default Vue => {
+ Vue.mixin({
+ provide: {
+ glFeatures: { ...((window.gon && window.gon.features) || {}) },
+ },
+ });
+};
diff --git a/app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js b/app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js
new file mode 100644
index 00000000000..dc8a63f26ac
--- /dev/null
+++ b/app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js
@@ -0,0 +1,8 @@
+export default () => ({
+ inject: {
+ glFeatures: {
+ from: 'glFeatures',
+ default: () => ({}),
+ },
+ },
+});