move u2f library to webpack

This commit is contained in:
Mike Greiling 2017-03-07 02:59:12 -06:00
parent 24f1ee5e9b
commit 85e0bbc4f8
4 changed files with 3 additions and 4 deletions

View File

@ -1,6 +1,6 @@
- if inject_u2f_api? - if inject_u2f_api?
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('u2f.js') = page_specific_javascript_bundle_tag('u2f')
%div %div
= render 'devise/shared/tab_single', tab_title: 'Two-Factor Authentication' = render 'devise/shared/tab_single', tab_title: 'Two-Factor Authentication'

View File

@ -4,7 +4,7 @@
- if inject_u2f_api? - if inject_u2f_api?
- content_for :page_specific_javascripts do - content_for :page_specific_javascripts do
= page_specific_javascript_tag('u2f.js') = page_specific_javascript_bundle_tag('u2f')
.row.prepend-top-default .row.prepend-top-default
.col-lg-3 .col-lg-3
@ -96,4 +96,3 @@
:javascript :javascript
var button = "<a class='btn btn-xs btn-warning pull-right' data-method='patch' href='#{skip_profile_two_factor_auth_path}'>Configure it later</a>"; var button = "<a class='btn btn-xs btn-warning pull-right' data-method='patch' href='#{skip_profile_two_factor_auth_path}'>Configure it later</a>";
$(".flash-alert").append(button); $(".flash-alert").append(button);

View File

@ -100,7 +100,6 @@ module Gitlab
config.assets.precompile << "katex.js" config.assets.precompile << "katex.js"
config.assets.precompile << "xterm/xterm.css" config.assets.precompile << "xterm/xterm.css"
config.assets.precompile << "lib/ace.js" config.assets.precompile << "lib/ace.js"
config.assets.precompile << "u2f.js"
config.assets.precompile << "vendor/assets/fonts/*" config.assets.precompile << "vendor/assets/fonts/*"
# Version of your assets, change this if you want to expire all your assets # Version of your assets, change this if you want to expire all your assets

View File

@ -40,6 +40,7 @@ var config = {
protected_branches: './protected_branches/protected_branches_bundle.js', protected_branches: './protected_branches/protected_branches_bundle.js',
snippet: './snippet/snippet_bundle.js', snippet: './snippet/snippet_bundle.js',
terminal: './terminal/terminal_bundle.js', terminal: './terminal/terminal_bundle.js',
u2f: ['vendor/u2f'],
users: './users/users_bundle.js', users: './users/users_bundle.js',
vue_pipelines: './vue_pipelines_index/index.js', vue_pipelines: './vue_pipelines_index/index.js',
}, },