diff --git a/client/src/css/01-main.css b/client/src/css/01-main.css index e4174f2c..443430d3 100644 --- a/client/src/css/01-main.css +++ b/client/src/css/01-main.css @@ -1,6 +1,6 @@ body { - background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSI1NiIgaGVpZ2h0PSIxMDAiPgo8cmVjdCB3aWR0aD0iNTYiIGhlaWdodD0iMTAwIiBmaWxsPSIjRkZGRkZGIj48L3JlY3Q+CjxwYXRoIGQ9Ik0yOCA2NkwwIDUwTDAgMTZMMjggMEw1NiAxNkw1NiA1MEwyOCA2NkwyOCAxMDAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0ZDRkNGQyIgc3Ryb2tlLXdpZHRoPSIyIj48L3BhdGg+CjxwYXRoIGQ9Ik0yOCAwTDI4IDM0TDAgNTBMMCA4NEwyOCAxMDBMNTYgODRMNTYgNTBMMjggMzQiIGZpbGw9Im5vbmUiIHN0cm9rZT0iI0ZCRkJGQiIgc3Ryb2tlLXdpZHRoPSIyIj48L3BhdGg+Cjwvc3ZnPg=="); + background-image: url("/img/background.svg"); } .authelia-brand { diff --git a/client/src/img/background.svg b/client/src/img/background.svg new file mode 100644 index 00000000..93b00339 --- /dev/null +++ b/client/src/img/background.svg @@ -0,0 +1,5 @@ + diff --git a/client/src/index.ts b/client/src/index.ts index 8c60127f..0b4f302e 100644 --- a/client/src/index.ts +++ b/client/src/index.ts @@ -10,27 +10,22 @@ import ResetPasswordForm from "./lib/reset-password/reset-password-form"; import jslogger = require("js-logger"); import jQuery = require("jquery"); import U2fApi = require("u2f-api"); +import Endpoints = require("../../shared/api"); jslogger.useDefaults(); jslogger.setLevel(jslogger.INFO); -export = { - firstfactor: function () { - FirstFactor(window, jQuery, FirstFactorValidator, jslogger); - }, - secondfactor: function () { - SecondFactor(window, jQuery, U2fApi); - }, - register_totp: function() { - TOTPRegister(window, jQuery); - }, - register_u2f: function () { - U2fRegister(window, jQuery); - }, - reset_password_request: function () { - ResetPasswordRequest(window, jQuery); - }, - reset_password_form: function () { - ResetPasswordForm(window, jQuery); - } -}; \ No newline at end of file +(function () { + if (window.location.pathname == Endpoints.FIRST_FACTOR_GET) + FirstFactor(window, jQuery, FirstFactorValidator, jslogger); + else if (window.location.pathname == Endpoints.SECOND_FACTOR_GET) + SecondFactor(window, jQuery, U2fApi); + else if (window.location.pathname == Endpoints.SECOND_FACTOR_TOTP_IDENTITY_FINISH_GET) + TOTPRegister(window, jQuery); + else if (window.location.pathname == Endpoints.SECOND_FACTOR_U2F_IDENTITY_FINISH_GET) + U2fRegister(window, jQuery); + else if (window.location.pathname == Endpoints.RESET_PASSWORD_IDENTITY_FINISH_GET) + ResetPasswordForm(window, jQuery); + else if (window.location.pathname == Endpoints.RESET_PASSWORD_REQUEST_GET) + ResetPasswordRequest(window, jQuery); +})(); diff --git a/server/src/views/firstfactor.pug b/server/src/views/firstfactor.pug index 4c93b576..ddf22527 100644 --- a/server/src/views/firstfactor.pug +++ b/server/src/views/firstfactor.pug @@ -15,7 +15,4 @@ block content a(href=reset_password_request_endpoint, class="pull-right link forgot-password") Forgot password? - - -block entrypoint - \ No newline at end of file + \ No newline at end of file diff --git a/server/src/views/layout/layout.pug b/server/src/views/layout/layout.pug index 07fb0613..613f6f05 100644 --- a/server/src/views/layout/layout.pug +++ b/server/src/views/layout/layout.pug @@ -1,31 +1,32 @@ block variables html - head - title Authelia - 2FA - meta(name="viewport", content="width=device-width, initial-scale=1.0")/ - meta(name="robots", content="noindex, nofollow, nosnippet, noarchive")/ - link(rel="icon", href="/img/icon.png" type="image/png" sizes="32x32")/ - link(rel="stylesheet", type="text/css", href="/css/authelia.css")/ - if redirection_url - - body -
Touch the token to register your U2F device.
block content - - -block entrypoint - + \ No newline at end of file