mirror of
https://github.com/discourse/discourse.git
synced 2025-05-31 09:17:15 +08:00
UX: Add a separate "Sign Up" button
This commit is contained in:
@ -44,6 +44,9 @@
|
|||||||
<button {{action showLogin}} class='btn btn-primary btn-small login-button'>
|
<button {{action showLogin}} class='btn btn-primary btn-small login-button'>
|
||||||
{{icon user}} {{i18n log_in}}
|
{{icon user}} {{i18n log_in}}
|
||||||
</button>
|
</button>
|
||||||
|
<button {{action showCreateAccount}} class='btn btn-primary btn-small sign-up-button'>
|
||||||
|
{{icon user}} {{i18n sign_up}}
|
||||||
|
</button>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
<ul class='icons clearfix' role='navigation'>
|
<ul class='icons clearfix' role='navigation'>
|
||||||
{{#if currentUser}}
|
{{#if currentUser}}
|
||||||
|
@ -80,7 +80,9 @@
|
|||||||
{{#if formSubmitted}}
|
{{#if formSubmitted}}
|
||||||
<i class='fa fa-spinner fa-spin'></i>
|
<i class='fa fa-spinner fa-spin'></i>
|
||||||
{{else}}
|
{{else}}
|
||||||
<a {{action showLogin}}>{{i18n cancel}}</a>
|
<button class="btn btn-large" id="login-link" {{action showLogin}}>
|
||||||
|
{{i18n log_in}}
|
||||||
|
</button>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
</div>
|
</div>
|
||||||
{{/unless}}
|
{{/unless}}
|
||||||
|
@ -50,12 +50,17 @@
|
|||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
button.login-button {
|
button.login-button, button.sign-up-button {
|
||||||
float: left;
|
float: left;
|
||||||
margin-top: 7px;
|
margin-top: 7px;
|
||||||
padding: 6px 10px;
|
padding: 6px 10px;
|
||||||
.fa { margin-right: 3px; }
|
.fa { margin-right: 3px; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.sign-up-button {
|
||||||
|
margin-left: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
.icons {
|
.icons {
|
||||||
float: left;
|
float: left;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
@ -97,6 +97,7 @@ en:
|
|||||||
yes_value: "Yes"
|
yes_value: "Yes"
|
||||||
generic_error: "Sorry, an error has occurred."
|
generic_error: "Sorry, an error has occurred."
|
||||||
generic_error_with_reason: "An error occurred: %{error}"
|
generic_error_with_reason: "An error occurred: %{error}"
|
||||||
|
sign_up: "Sign Up"
|
||||||
log_in: "Log In"
|
log_in: "Log In"
|
||||||
age: "Age"
|
age: "Age"
|
||||||
last_post: "Last Post"
|
last_post: "Last Post"
|
||||||
|
@ -26,8 +26,7 @@ test("sign in", function() {
|
|||||||
|
|
||||||
test("create account", function() {
|
test("create account", function() {
|
||||||
visit("/");
|
visit("/");
|
||||||
click("header .login-button");
|
click("header .sign-up-button");
|
||||||
click('#new-account-link');
|
|
||||||
|
|
||||||
andThen(function() {
|
andThen(function() {
|
||||||
ok(exists('.create-account'), "it shows the create account modal");
|
ok(exists('.create-account'), "it shows the create account modal");
|
||||||
|
Reference in New Issue
Block a user