2017-06-18 15:16:40 +00:00
component Settings(user *arn.User)
2017-07-06 20:23:32 +00:00
h1.page-title Settings
2017-10-20 16:46:50 +00:00
2017-06-24 14:17:38 +00:00
.widgets
.widget.mountable(data-api="/api/user/" + user.ID)
2017-06-18 18:22:43 +00:00
h3.widget-title
Icon("user")
span Personal
2017-06-21 12:00:52 +00:00
InputText("Nick", user.Nick, "Username", "Your username on notify.moe")
InputText("Tagline", user.Tagline, "Tagline", "Text that appears below your username")
InputText("Website", user.Website, "Website", "Your homepage")
2017-06-18 18:22:43 +00:00
2017-06-24 14:17:38 +00:00
.widget.mountable(data-api="/api/user/" + user.ID)
2017-06-18 18:22:43 +00:00
h3.widget-title
Icon("cubes")
span Accounts
2017-06-21 12:00:52 +00:00
InputText("Accounts.AniList.Nick", user.Accounts.AniList.Nick, "AniList", "Your username on anilist.co")
InputText("Accounts.MyAnimeList.Nick", user.Accounts.MyAnimeList.Nick, "MyAnimeList", "Your username on myanimelist.net")
2017-06-24 21:05:07 +00:00
InputText("Accounts.Kitsu.Nick", user.Accounts.Kitsu.Nick, "Kitsu", "Your username on kitsu.io")
2017-07-02 14:24:26 +00:00
InputText("Accounts.Osu.Nick", user.Accounts.Osu.Nick, "Osu", "Your username on osu.ppy.sh")
2017-07-07 21:06:39 +00:00
//- InputText("Accounts.AnimePlanet.Nick", user.Accounts.AnimePlanet.Nick, "AnimePlanet", "Your username on anime-planet.com")
2017-06-24 14:17:38 +00:00
2017-07-14 21:50:34 +00:00
.widget.mountable
h3.widget-title
Icon("bell")
span Notifications
2017-10-09 13:47:40 +00:00
#enable-notifications.widget-section
2017-07-14 21:50:34 +00:00
label Enable:
button.action(data-action="enableNotifications", data-trigger="click")
2017-07-14 23:32:06 +00:00
Icon("toggle-off")
2017-07-14 21:50:34 +00:00
span Enable notifications
2017-10-09 13:47:40 +00:00
#disable-notifications.widget-section
2017-07-14 21:50:34 +00:00
label Disable:
button.action(data-action="disableNotifications", data-trigger="click")
2017-07-14 23:32:06 +00:00
Icon("toggle-on")
2017-07-14 21:50:34 +00:00
span Disable notifications
2017-10-09 13:47:40 +00:00
#test-notification.widget-section
2017-07-14 21:50:34 +00:00
label Test:
button.action(data-action="testNotification", data-trigger="click")
Icon("paper-plane")
span Send test notification
2017-07-02 21:42:46 +00:00
.widget.mountable
h3.widget-title
Icon("user-plus")
span Connect
2017-10-09 13:47:40 +00:00
.widget-section.social-account
2017-07-02 21:42:46 +00:00
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
2017-10-09 13:47:40 +00:00
.widget-section.social-account
2017-07-02 21:42:46 +00:00
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
2017-07-03 17:33:52 +00:00
.widget.mountable
h3.widget-title
2017-07-09 02:22:14 +00:00
Icon("download")
2017-07-03 17:33:52 +00:00
span Import
ImportLists(user)
2017-07-02 21:42:46 +00:00
2017-07-05 02:10:19 +00:00
.widget.mountable
h3.widget-title
2017-07-10 21:37:57 +00:00
Icon("upload")
span Export
2017-07-05 02:10:19 +00:00
2017-10-09 13:47:40 +00:00
.widget-section
2017-07-10 21:37:57 +00:00
label JSON:
a.button(href="/api/animelist/" + user.ID)
Icon("upload")
span Export anime list as JSON
2017-07-05 02:10:19 +00:00
2017-07-14 21:50:34 +00:00
.widget.mountable
h3.widget-title
Icon("puzzle-piece")
2017-07-15 18:27:49 +00:00
span Apps
2017-07-14 21:50:34 +00:00
2017-10-09 13:47:40 +00:00
.widget-section
2017-07-14 21:50:34 +00:00
label Chrome Extension:
button.action(data-action="installExtension", data-trigger="click")
Icon("chrome")
span Get the Chrome Extension
2017-10-09 13:47:40 +00:00
.widget-section
2017-10-01 06:06:43 +00:00
label Desktop App:
button.action(data-action="installApp", data-trigger="click")
Icon("desktop")
span Get the Desktop App
2017-10-09 13:47:40 +00:00
.widget-section
2017-07-15 18:27:49 +00:00
label Android App:
a.button(href="https://www.youtube.com/watch?v=opyt4cw0ep8", target="_blank", rel="noopener")
Icon("android")
span Get the Android App
2017-07-17 17:49:52 +00:00
2017-07-18 05:54:50 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
2017-07-17 17:49:52 +00:00
h3.widget-title
Icon("picture-o")
span Avatar
2017-07-18 05:54:50 +00:00
2017-10-09 13:47:40 +00:00
.widget-section
2017-07-17 20:43:26 +00:00
label(for="Avatar.Source") Source:
2017-10-09 13:47:40 +00:00
select.widget-ui-element.action(id="Avatar.Source", data-field="Avatar.Source", value=user.Settings().Avatar.Source, data-action="save", data-trigger="change")
2017-07-18 05:54:50 +00:00
option(value="") Automatic
2017-07-17 17:49:52 +00:00
option(value="Gravatar") Gravatar
2017-07-18 01:55:47 +00:00
option(value="URL") Link
2017-07-18 05:23:48 +00:00
//- option(value="FileSystem") Upload
2017-07-18 01:55:47 +00:00
2017-07-18 05:54:50 +00:00
if user.Settings().Avatar.Source == "URL"
InputText("Avatar.SourceURL", user.Settings().Avatar.SourceURL, "Link", "Post the link to the image here")
if user.Settings().Avatar.Source == "Gravatar" || (user.Settings().Avatar.Source == "" && user.Avatar.Source == "Gravatar")
.profile-image-container.avatar-preview
img.profile-image.mountable(src=user.Gravatar(), alt="Gravatar")
if user.Settings().Avatar.Source == "URL" && user.Settings().Avatar.SourceURL != ""
.profile-image-container.avatar-preview
img.profile-image.mountable(src=strings.Replace(user.Settings().Avatar.SourceURL, "http://", "https://", 1), alt="Avatar preview")
2017-07-15 18:27:49 +00:00
2017-10-06 06:44:29 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("star")
span PRO
if user.IsPro()
2017-10-09 13:47:40 +00:00
.widget-section
2017-10-06 06:44:29 +00:00
label
span Your PRO account expires in
span.utc-date(data-date=user.ProExpires)
span .
a.button.ajax(href="/shop")
Icon("star")
span Extend PRO account duration
else
2017-10-09 13:47:40 +00:00
.widget-section
2017-10-06 06:44:29 +00:00
label Would you like to support the site development?
a.button.ajax(href="/shop")
Icon("star")
span Go PRO
2017-10-20 15:24:16 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("font")
span Formatting
.widget-section
2017-10-20 16:04:30 +00:00
label(for="TitleLanguage")= "Title language:"
select.widget-ui-element.action(id="TitleLanguage", data-field="TitleLanguage", value=user.Settings().TitleLanguage, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="canonical") Canonical
option(value="english") English
option(value="romaji") Romaji
2017-10-20 16:46:50 +00:00
option(value="japanese") 日本語
2017-10-20 16:04:30 +00:00
InputNumber("Format.RatingsPrecision", float64(user.Settings().Format.RatingsPrecision), "Ratings precision", "How many decimals after the comma would you like to display in ratings on anime pages?", "0", "2", "1")
2017-10-06 06:44:29 +00:00
2017-06-24 14:31:54 +00:00
//- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title
//- Icon("cogs")
//- span Settings
2017-06-24 14:17:38 +00:00
2017-06-24 14:31:54 +00:00
//- InputText("TitleLanguage", user.Settings().TitleLanguage, "Title language", "Language of anime titles")