285 lines
9.9 KiB
Plaintext
Raw Normal View History

2017-11-05 06:29:13 +00:00
component SettingsTabs
.tabs
2017-11-05 07:16:20 +00:00
Tab("Personal", "user", "/settings")
Tab("Accounts", "cubes", "/settings/accounts")
Tab("Notifications", "bell", "/settings/notifications")
Tab("Apps", "puzzle-piece", "/settings/apps")
Tab("Formatting", "font", "/settings/formatting")
Tab("PRO", "star", "/settings/pro")
component SettingsPersonal(user *arn.User)
SettingsTabs
h1.page-title Personal settings
2017-10-20 16:46:50 +00:00
2017-11-03 11:02:13 +00:00
.settings
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("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")
2018-03-27 10:32:56 +00:00
2018-03-06 18:54:14 +00:00
if arn.IsDevelopment()
InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us about yourself (Markdown is allowed)")
2018-03-06 17:14:21 +00:00
2017-11-17 10:07:16 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
2018-03-07 13:00:14 +00:00
Icon("camera")
2017-11-17 10:07:16 +00:00
span Avatar
2018-03-03 17:38:21 +00:00
//- .widget-section
//- label(for="Avatar.Source") Source:
//- select.widget-ui-element.action(id="Avatar.Source", data-field="Avatar.Source", value=user.Settings().Avatar.Source, data-action="save", data-trigger="change")
//- option(value="") Automatic
//- option(value="Gravatar") Gravatar
//- option(value="URL") Link
//- option(value="FileSystem") Upload
2017-11-17 10:07:16 +00:00
2018-03-03 17:38:21 +00:00
//- //- URL input
//- if user.Settings().Avatar.Source == "URL"
//- InputText("Avatar.SourceURL", user.Settings().Avatar.SourceURL, "Link", "Post the link to the image here")
2017-11-17 10:07:16 +00:00
2018-03-03 17:38:21 +00:00
//- //- Gravatar preview image
//- 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 (" + user.Email + ")", title="Gravatar (" + user.Email + ")")
2017-11-17 10:07:16 +00:00
2018-03-03 17:38:21 +00:00
//- //- URL preview image
//- 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")
2018-03-02 16:18:29 +00:00
2018-03-03 17:38:21 +00:00
//- //- File upload
//- if user.Settings().Avatar.Source == "FileSystem"
2018-03-07 13:00:14 +00:00
InputImage("avatar-input", "File", "/api/upload/avatar")
2018-03-02 16:18:29 +00:00
2018-03-03 17:38:21 +00:00
.profile-image-container.avatar-preview
if user.HasAvatar()
2018-03-07 13:00:14 +00:00
img#avatar-input-preview.profile-image.lazy(data-src=user.AvatarLink("large"), data-webp="true", alt="Profile image", title="Recommended: 560 x 560 | PNG or JPG")
2018-03-03 17:38:21 +00:00
else
2018-03-05 16:49:24 +00:00
img#avatar-input-preview.profile-image.hidden(src=user.AvatarLink("large"), alt="Profile image", title="Recommended: 560 x 560 | PNG or JPG")
2018-03-03 17:29:39 +00:00
2018-03-03 17:38:21 +00:00
#avatar-input-preview-svg
SVGProfileImage(user)
2018-03-07 13:00:14 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("picture-o")
span Cover
InputImage("cover-input", "File", "/api/upload/cover")
2018-03-07 13:52:56 +00:00
.cover-preview(title="Recommended: 1920 x 450 | PNG or JPG")
2018-03-07 13:00:14 +00:00
img#cover-input-preview.profile-cover.lazy(data-src=user.CoverLink("small"), data-webp="true", alt="Cover image")
2018-03-07 13:52:56 +00:00
if !user.IsPro()
.footer
p PRO account required.
2017-11-17 10:07:16 +00:00
2017-11-05 07:16:20 +00:00
component SettingsNotifications(user *arn.User)
SettingsTabs
2017-06-18 18:22:43 +00:00
2017-11-05 07:16:20 +00:00
h1.page-title Notification settings
2017-06-24 14:17:38 +00:00
2017-11-05 07:16:20 +00:00
.settings
2017-07-14 21:50:34 +00:00
.widget.mountable
h3.widget-title
Icon("bell")
2018-03-15 20:08:30 +00:00
span Push notifications
2017-07-14 21:50:34 +00:00
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")
2018-03-15 20:08:30 +00:00
span Enable push notifications
2017-07-14 21:50:34 +00:00
2018-03-15 20:08:30 +00:00
#disable-notifications.widget-section.hidden
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")
2018-03-15 20:08:30 +00:00
span Disable push notifications
2017-07-14 21:50:34 +00:00
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
2018-03-15 20:08:30 +00:00
.footer
p(title="This setting is not account bound, instead it is bound to your browser.") You can customize this setting on every device you own.
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("filter")
2018-03-20 18:18:30 +00:00
span Filter
2018-03-15 20:08:30 +00:00
InputBool("Notification.AnimeEpisodeReleases", user.Settings().Notification.AnimeEpisodeReleases, "New episodes", "Notifications about new episodes")
InputBool("Notification.AnimeFinished", user.Settings().Notification.AnimeFinished, "Finished anime series", "Notifications about finished anime series")
2018-03-20 18:18:30 +00:00
//- InputBool("Notification.NewFollowers", user.Settings().Notification.NewFollowers, "New followers", "Notifications about new followers")
2018-03-15 20:08:30 +00:00
2018-03-20 18:18:30 +00:00
//- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title
//- Icon("heart")
//- span Likes
2018-03-15 20:08:30 +00:00
2018-03-20 18:18:30 +00:00
//- InputBool("Notification.ForumLikes", user.Settings().Notification.ForumLikes, "Forum post likes", "Notifications about forum post likes")
//- InputBool("Notification.SoundTrackLikes", user.Settings().Notification.SoundTrackLikes, "Soundtrack likes", "Notifications about soundtrack likes")
//- //- InputBool("Notification.GroupPostLikes", user.Settings().Notification.GroupPostLikes, "Group post likes", "Notifications about group post likes")
//- InputBool("Notification.QuoteLikes", user.Settings().Notification.QuoteLikes, "Quote likes", "Notifications about quote likes")
2017-07-14 21:50:34 +00:00
2017-11-05 07:16:20 +00:00
component SettingsApps(user *arn.User)
SettingsTabs
2017-07-02 21:42:46 +00:00
2017-11-05 07:16:20 +00:00
h1.page-title App settings
2017-07-02 21:42:46 +00:00
2017-11-05 07:16:20 +00:00
.settings
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-11-07 09:17:27 +00:00
label Firefox Extension:
a.button(href="https://addons.mozilla.org/en-US/firefox/addon/anime-notifier/", target="_blank", rel="nofollow")
Icon("firefox")
span Get the Firefox Extension
2017-10-01 06:06:43 +00:00
2017-10-09 13:47:40 +00:00
.widget-section
2017-11-07 09:19:02 +00:00
label Android Web App:
2017-07-15 18:27:49 +00:00
a.button(href="https://www.youtube.com/watch?v=opyt4cw0ep8", target="_blank", rel="noopener")
Icon("android")
2017-11-07 09:19:02 +00:00
span Get the Android Web App
2017-11-04 16:11:47 +00:00
2017-11-07 09:17:27 +00:00
.widget-section
2017-11-07 09:19:02 +00:00
label Desktop Web App:
2017-11-07 09:17:27 +00:00
button.action(data-action="installApp", data-trigger="click")
Icon("desktop")
2017-11-07 09:19:02 +00:00
span Get the Desktop Web App
2017-11-07 09:17:27 +00:00
2017-11-05 07:16:20 +00:00
component SettingsFormatting(user *arn.User)
SettingsTabs
h1.page-title Formatting settings
.settings
2017-11-04 16:11:47 +00:00
.widget.mountable(data-api="/api/settings/" + user.ID)
h3.widget-title
Icon("font")
span Formatting
2017-11-17 11:51:08 +00:00
.widget-section
label(for="Theme")= "Theme:"
select.widget-ui-element.action(id="Theme", data-field="Theme", value=user.Settings().Theme, title="Language of anime titles", data-action="save", data-trigger="change")
option(value="light") Light
option(value="dark") Dark
2017-11-04 16:11:47 +00:00
.widget-section
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
option(value="japanese") 日本語
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-11-05 07:16:20 +00:00
component SettingsPro(user *arn.User)
SettingsTabs
h1.page-title PRO settings
.settings
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(href="/shop")
2017-10-06 06:44:29 +00:00
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(href="/support")
2017-10-06 06:44:29 +00:00
Icon("star")
span Go PRO
2017-11-05 07:16:20 +00:00
component SettingsAccounts(user *arn.User)
SettingsTabs
h1.page-title Accounts settings
.settings
.widget.mountable(data-api="/api/user/" + user.ID)
h3.widget-title
Icon("cubes")
span Accounts
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")
InputText("Accounts.Kitsu.Nick", user.Accounts.Kitsu.Nick, "Kitsu", "Your username on kitsu.io")
InputText("Accounts.Osu.Nick", user.Accounts.Osu.Nick, "Osu", "Your username on osu.ppy.sh")
2017-11-21 15:16:55 +00:00
InputText("Accounts.Overwatch.BattleTag", user.Accounts.Overwatch.BattleTag, "Overwatch", "Your battletag on Overwatch")
2017-11-05 07:16:20 +00:00
//- InputText("Accounts.AnimePlanet.Nick", user.Accounts.AnimePlanet.Nick, "AnimePlanet", "Your username on anime-planet.com")
.widget.mountable
h3.widget-title
Icon("user-plus")
span Connect
.widget-section.social-account
label(for="google") Google:
2018-03-23 20:29:28 +00:00
a#google.button.social-account-button(href="/auth/google", data-ajax="false")
2017-11-05 07:16:20 +00:00
if user.Accounts.Google.ID != ""
Icon("check")
span Connected
else
Icon("circle-o")
span Not connected
.widget-section.social-account
label(for="facebook") Facebook:
2018-03-23 20:29:28 +00:00
a#facebook.button.social-account-button(href="/auth/facebook", data-ajax="false")
2017-11-05 07:16:20 +00:00
if user.Accounts.Facebook.ID != ""
Icon("check")
span Connected
else
Icon("circle-o")
span Not connected
2017-06-24 14:17:38 +00:00
2017-11-05 07:16:20 +00:00
.widget.mountable
h3.widget-title
Icon("download")
span Import
ImportLists(user)
2018-03-24 16:19:45 +00:00
if len(user.AnimeList().Items) > 0
.widget.mountable
h3.widget-title
Icon("upload")
span Export
.widget-section
label JSON:
a.button(href="/api/animelist/" + user.ID, target="_blank")
Icon("upload")
span Export anime list as JSON