From e578b2b8f74589a7a9c48a3a37adb879efc2cab7 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Thu, 26 Jul 2018 10:37:16 -0500 Subject: [PATCH] Change default account type to Invidious accounts --- src/invidious.cr | 4 ++-- src/invidious/views/login.ecr | 40 +++++++++++++++++------------------ 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/src/invidious.cr b/src/invidious.cr index b16af9a4..19bdab78 100644 --- a/src/invidious.cr +++ b/src/invidious.cr @@ -1027,7 +1027,7 @@ get "/login" do |env| referer ||= "/feed/subscriptions" account_type = env.params.query["type"]? - account_type ||= "google" + account_type ||= "invidious" if account_type == "invidious" captcha = generate_captcha(HMAC_KEY) @@ -1144,7 +1144,7 @@ post "/login" do |env| end if !tfa_code - next env.redirect "/login?tfa=true" + next env.redirect "/login?tfa=true&type=google" end tl = challenge_results[1][2] diff --git a/src/invidious/views/login.ecr b/src/invidious/views/login.ecr index 00420eb8..3f19ba53 100644 --- a/src/invidious/views/login.ecr +++ b/src/invidious/views/login.ecr @@ -8,31 +8,14 @@

- <% if account_type == "google" %> -
-
- - - - - - - <% if tfa %> - - - <% end %> - - -
-
- <% elsif account_type == "invidious" %> + <% if account_type == "invidious" %>
@@ -50,6 +33,23 @@
+ <% elsif account_type == "google" %> +
+
+ + + + + + + <% if tfa %> + + + <% end %> + + +
+
<% end %>