Facebook login

This commit is contained in:
2017-07-02 23:42:46 +02:00
parent 8f3c03a5c5
commit 6c7fc902c0
12 changed files with 267 additions and 78 deletions

View File

@ -5,13 +5,14 @@ component AnimeListItem(viewUser *arn.User, item *arn.AnimeListItem, anime *arn.
InputNumber("Episodes", float64(item.Episodes), "Episodes", "Number of episodes you watched", "0", arn.EpisodeCountMax(anime.EpisodeCount), "1")
label(for="Status") Status:
select.widget-element.action(id="Status", data-field="Status", value=item.Status, data-action="save", data-trigger="change")
option(value=arn.AnimeListStatusWatching) Watching
option(value=arn.AnimeListStatusCompleted) Completed
option(value=arn.AnimeListStatusPlanned) Plan to watch
option(value=arn.AnimeListStatusHold) On hold
option(value=arn.AnimeListStatusDropped) Dropped
.widget-input
label(for="Status") Status:
select.widget-element.action(id="Status", data-field="Status", value=item.Status, data-action="save", data-trigger="change")
option(value=arn.AnimeListStatusWatching) Watching
option(value=arn.AnimeListStatusCompleted) Completed
option(value=arn.AnimeListStatusPlanned) Plan to watch
option(value=arn.AnimeListStatusHold) On hold
option(value=arn.AnimeListStatusDropped) Dropped
.anime-list-item-rating-edit
InputNumber("Rating.Overall", item.Rating.Overall, arn.OverallRatingName(item.Episodes), "Overall rating on a scale of 0 to 10", "0", "10", "0.1")

View File

@ -1,4 +1,7 @@
component Login
.login-buttons
a.login-button(href="/auth/google")
img.login-button-image(src="/images/login/google", alt="Google Login", title="Login with your Google account")
img.login-button-image(src="/images/login/google", alt="Google Login", title="Login with your Google account")
a.login-button(href="/auth/facebook")
img.login-button-image(src="/images/login/facebook", alt="Facebook Login", title="Login with your Facebook account")

View File

@ -4,7 +4,7 @@
justify-content center
.login-button
//
padding 0.5rem
.login-button-image
max-width 236px

View File

@ -2,17 +2,22 @@ component NewSoundTrack(user *arn.User)
.widgets
.widget
h3 New soundtrack
label(for="soundcloud-link") Soundcloud link:
input#soundcloud-link.widget-element(type="text", placeholder="https://soundcloud.com/abc/123")
label(for="youtube-link") Youtube link:
input#youtube-link.widget-element(type="text", placeholder="https://www.youtube.com/watch?v=123")
.widget-input
label(for="soundcloud-link") Soundcloud link:
input#soundcloud-link.widget-element(type="text", placeholder="https://soundcloud.com/abc/123")
label(for="anime-link") Anime link:
input#anime-link.widget-element(type="text", placeholder="https://notify.moe/anime/123")
.widget-input
label(for="youtube-link") Youtube link:
input#youtube-link.widget-element(type="text", placeholder="https://www.youtube.com/watch?v=123")
label(for="osu-link") Osu beatmap (optional):
input#osu-link.widget-element(type="text", placeholder="https://osu.ppy.sh/s/123")
.widget-input
label(for="anime-link") Anime link:
input#anime-link.widget-element(type="text", placeholder="https://notify.moe/anime/123")
.widget-input
label(for="osu-link") Osu beatmap (optional):
input#osu-link.widget-element(type="text", placeholder="https://osu.ppy.sh/s/123")
.buttons
button.action(data-action="createSoundTrack", data-trigger="click")

View File

@ -21,6 +21,34 @@ component Settings(user *arn.User)
InputText("Accounts.AnimePlanet.Nick", user.Accounts.AnimePlanet.Nick, "AnimePlanet", "Your username on anime-planet.com")
InputText("Accounts.Osu.Nick", user.Accounts.Osu.Nick, "Osu", "Your username on osu.ppy.sh")
.widget.mountable
h3.widget-title
Icon("user-plus")
span Connect
.widget-input.social-account
label(for="google") Google:
a#google.button.social-account-button(href="/auth/google")
if user.Accounts.Google.ID != ""
Icon("check")
span Connected
else
Icon("circle-o")
span Not connected
.widget-input.social-account
label(for="facebook") Facebook:
a#facebook.button.social-account-button(href="/auth/facebook")
if user.Accounts.Facebook.ID != ""
Icon("check")
span Connected
else
Icon("circle-o")
span Not connected
//- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title
//- Icon("cogs")

View File

@ -0,0 +1,2 @@
.social-account-button
margin-bottom 1rem