diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 21:06:05 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-09-24 21:06:05 +0300 |
commit | 2ed368929ab5094fec5da8038f723463596a80cf (patch) | |
tree | aec98d50349b0e9a490db0099253b801b2d1a9ea /app/assets/javascripts/vue_shared | |
parent | f1a5755898e865428c923587402fd965b601c4ea (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.js | 7 | ||||
-rw-r--r-- | app/assets/javascripts/vue_shared/mixins/gl_feature_flags_mixin.js | 8 |
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: () => ({}), + }, + }, +}); |