Skip to content

Commit

Permalink
home2: clearer distinction between signed-in and not-yet-signed-in state
Browse files Browse the repository at this point in the history
  • Loading branch information
alexch committed Nov 28, 2011
1 parent f99866c commit 6c32659
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 12 deletions.
4 changes: 2 additions & 2 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -273,9 +273,9 @@ def authorize back = nil
)

@google_api = GoogleApi.new(access_token)
d("in oauth_callback"){@google_api}
# d("in oauth_callback"){@google_api}
@current_account = Accounts.write(google_data.user_id, access_token)
d("in oauth_callback"){@current_account}
# d("in oauth_callback"){@current_account}

session[:current_account_id] = @current_account["_id"]

Expand Down
24 changes: 14 additions & 10 deletions web/home2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,25 @@ def signed_in?

def content

section "What just happened to Google Reader?" do
p {
text "Google ", a("removed a lot of features", href: "/features"), " from Google Reader, gutting thousands of vibrant online communities in an attempt to move their members to Google Plus."
}
if !signed_in?
section "What just happened to Google Reader?" do
p {
text "Google ", a("removed a lot of features", href: "/features"), " from Google Reader, gutting thousands of vibrant online communities in an attempt to move their members to Google Plus."
}

p {
text "This site is a hub for efforts to replace what was lost. "
text "See ", a("the about page", "/about"), " for more info."
}
p {
text "This site is a hub for efforts to replace what was lost. "
text "See ", a("the about page", "/about"), " for more info."
}
end
end

section "What can I do?" do

if !signed_in?
item( name: "Sign In", url: "/sign_in") {
if signed_in?
p "Cool! You're signed in. Now you can..."
else
item( name: "Sign In", url: "/sign_in?back=L2hvbWUy") { # that means "home2" :-)
text " and allow Sharebro to read your Google Reader info"
}
end
Expand Down

0 comments on commit 6c32659

Please sign in to comment.