mirror of
https://github.com/iv-org/invidious.git
synced 2025-08-29 07:58:35 +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"
|
templated "user/login"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.signup_page(env)
|
||||||
|
end
|
||||||
|
|
||||||
def self.login(env)
|
def self.login(env)
|
||||||
locale = env.get("preferences").as(Preferences).locale
|
locale = env.get("preferences").as(Preferences).locale
|
||||||
|
|
||||||
|
@ -55,6 +55,7 @@ module Invidious::Routing
|
|||||||
def register_user_routes
|
def register_user_routes
|
||||||
# User login/out
|
# User login/out
|
||||||
get "/login", Routes::Login, :login_page
|
get "/login", Routes::Login, :login_page
|
||||||
|
get "/signup", Routes::Login, :signup_page
|
||||||
post "/login", Routes::Login, :login
|
post "/login", Routes::Login, :login
|
||||||
post "/signout", Routes::Login, :signout
|
post "/signout", Routes::Login, :signout
|
||||||
|
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<% content_for "header" do %>
|
<% content_for "header" do %>
|
||||||
<title><%= translate(locale, "Log in") %> - Invidious</title>
|
<title><%= translate(locale, "Log in") %> - Invidious</title>
|
||||||
|
<link rel="stylesheet" href="/css/signin-signout.css?v=<%= ASSET_COMMIT %>">
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<div class="pure-g">
|
<div class="pure-g">
|
||||||
@ -64,9 +65,13 @@
|
|||||||
</label>
|
</label>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% else %>
|
<% else %>
|
||||||
<button type="submit" name="action" value="signin" class="pure-button pure-button-primary">
|
<div class="account-page-action-bar">
|
||||||
<%= translate(locale, "Sign In") %>/<%= translate(locale, "Register") %>
|
<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>
|
</button>
|
||||||
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user