mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-28 15:38:30 +00:00
Add infrastructure for /signup page
This commit is contained in:
parent
72ec494f2b
commit
b3ee685a70
7
assets/css/signin-signout.css
Normal file
7
assets/css/signin-signout.css
Normal file
@ -0,0 +1,7 @@
|
||||
#signin-button {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.account-page-action-bar {
|
||||
margin-top: 1em;
|
||||
}
|
@ -27,6 +27,9 @@ module Invidious::Routes::Login
|
||||
templated "user/login"
|
||||
end
|
||||
|
||||
def self.signup_page(env)
|
||||
end
|
||||
|
||||
def self.login(env)
|
||||
locale = env.get("preferences").as(Preferences).locale
|
||||
|
||||
|
@ -55,6 +55,7 @@ module Invidious::Routing
|
||||
def register_user_routes
|
||||
# User login/out
|
||||
get "/login", Routes::Login, :login_page
|
||||
get "/signup", Routes::Login, :signup_page
|
||||
post "/login", Routes::Login, :login
|
||||
post "/signout", Routes::Login, :signout
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<% content_for "header" do %>
|
||||
<title><%= translate(locale, "Log in") %> - Invidious</title>
|
||||
<link rel="stylesheet" href="/css/signin-signout.css?v=<%= ASSET_COMMIT %>">
|
||||
<% end %>
|
||||
|
||||
<div class="pure-g">
|
||||
@ -64,9 +65,13 @@
|
||||
</label>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
||||
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
||||
</button>
|
||||
<div class="account-page-action-bar">
|
||||
<a href="/signup" id="signup-link"><%= translate(locale, ("Create an account")) %> </a>
|
||||
|
||||
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary" id="signin-button">
|
||||
<%= translate(locale, "Sign In") %>
|
||||
</button>
|
||||
</div>
|
||||
<% end %>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
Loading…
Reference in New Issue
Block a user