mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
link to log in with demo account on the welcome page
This commit is contained in:
@@ -35,6 +35,7 @@ import org.apache.wicket.util.cookies.CookieUtils;
|
|||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import com.commafeed.frontend.pages.DemoLoginPage;
|
||||||
import com.commafeed.frontend.pages.FaviconPage;
|
import com.commafeed.frontend.pages.FaviconPage;
|
||||||
import com.commafeed.frontend.pages.GoogleImportCallbackPage;
|
import com.commafeed.frontend.pages.GoogleImportCallbackPage;
|
||||||
import com.commafeed.frontend.pages.GoogleImportRedirectPage;
|
import com.commafeed.frontend.pages.GoogleImportRedirectPage;
|
||||||
@@ -53,6 +54,7 @@ public class CommaFeedApplication extends AuthenticatedWebApplication {
|
|||||||
super.init();
|
super.init();
|
||||||
|
|
||||||
mountPage("welcome", WelcomePage.class);
|
mountPage("welcome", WelcomePage.class);
|
||||||
|
mountPage("demo", DemoLoginPage.class);
|
||||||
mountPage("logout", LogoutPage.class);
|
mountPage("logout", LogoutPage.class);
|
||||||
mountPage("error", DisplayExceptionPage.class);
|
mountPage("error", DisplayExceptionPage.class);
|
||||||
mountPage("favicon", FaviconPage.class);
|
mountPage("favicon", FaviconPage.class);
|
||||||
|
|||||||
@@ -0,0 +1,23 @@
|
|||||||
|
package com.commafeed.frontend.pages;
|
||||||
|
|
||||||
|
import javax.inject.Inject;
|
||||||
|
|
||||||
|
import org.apache.wicket.markup.html.WebPage;
|
||||||
|
|
||||||
|
import com.commafeed.backend.StartupBean;
|
||||||
|
import com.commafeed.backend.services.UserService;
|
||||||
|
import com.commafeed.frontend.CommaFeedSession;
|
||||||
|
|
||||||
|
public class DemoLoginPage extends WebPage {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
UserService userService;
|
||||||
|
|
||||||
|
public DemoLoginPage() {
|
||||||
|
CommaFeedSession.get().authenticate(StartupBean.USERNAME_DEMO,
|
||||||
|
StartupBean.USERNAME_DEMO);
|
||||||
|
setResponsePage(getApplication().getHomePage());
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -13,6 +13,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<h4 class="text-center">
|
<h4 class="text-center">
|
||||||
CommaFeed is a bloat-free feed reader. It aims to replace Google Reader while keeping things simple.
|
CommaFeed is a bloat-free feed reader. It aims to replace Google Reader while keeping things simple.
|
||||||
|
<br />
|
||||||
|
<a wicket:id="demo-login">Try out the demo.</a>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public class WelcomePage extends BasePage {
|
|||||||
public WelcomePage() {
|
public WelcomePage() {
|
||||||
add(new BookmarkablePageLink<Void>("logo-link", getApplication()
|
add(new BookmarkablePageLink<Void>("logo-link", getApplication()
|
||||||
.getHomePage()));
|
.getHomePage()));
|
||||||
|
add(new BookmarkablePageLink<Void>("demo-login", DemoLoginPage.class));
|
||||||
add(new LoginPanel("login"));
|
add(new LoginPanel("login"));
|
||||||
add(new RegisterPanel("register") {
|
add(new RegisterPanel("register") {
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user