Added birthday and gender fields
This commit is contained in:
parent
81764b981c
commit
daaa4c609f
@ -12,7 +12,7 @@ func Register(l *layout.Layout) {
|
|||||||
l.Page("/settings", settings.Get(components.SettingsPersonal))
|
l.Page("/settings", settings.Get(components.SettingsPersonal))
|
||||||
l.Page("/settings/accounts", settings.Get(components.SettingsAccounts))
|
l.Page("/settings/accounts", settings.Get(components.SettingsAccounts))
|
||||||
l.Page("/settings/notifications", settings.Get(components.SettingsNotifications))
|
l.Page("/settings/notifications", settings.Get(components.SettingsNotifications))
|
||||||
l.Page("/settings/apps", settings.Get(components.SettingsApps))
|
l.Page("/settings/info", settings.Get(components.SettingsInfo))
|
||||||
l.Page("/settings/formatting", settings.Get(components.SettingsFormatting))
|
l.Page("/settings/style", settings.Get(components.SettingsStyle))
|
||||||
l.Page("/settings/extras", settings.Get(components.SettingsExtras))
|
l.Page("/settings/extras", settings.Get(components.SettingsExtras))
|
||||||
}
|
}
|
||||||
|
@ -1,34 +0,0 @@
|
|||||||
component SettingsApps(user *arn.User)
|
|
||||||
SettingsTabs
|
|
||||||
|
|
||||||
h1.page-title App settings
|
|
||||||
|
|
||||||
.settings
|
|
||||||
.widget.mountable
|
|
||||||
h3.widget-title
|
|
||||||
Icon("puzzle-piece")
|
|
||||||
span Apps
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
label Chrome Extension:
|
|
||||||
button.action(data-action="installExtension", data-trigger="click")
|
|
||||||
Icon("chrome")
|
|
||||||
span Get the Chrome Extension
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
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
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
label Android Web App:
|
|
||||||
a.button(href="https://www.youtube.com/watch?v=opyt4cw0ep8", target="_blank", rel="noopener")
|
|
||||||
Icon("android")
|
|
||||||
span Get the Android Web App
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
label Desktop Web App:
|
|
||||||
button.action(data-action="installApp", data-trigger="click")
|
|
||||||
Icon("desktop")
|
|
||||||
span Get the Desktop Web App
|
|
@ -4,6 +4,55 @@ component SettingsExtras(user *arn.User)
|
|||||||
h1.page-title Extra settings
|
h1.page-title Extra settings
|
||||||
|
|
||||||
.settings
|
.settings
|
||||||
|
//- Apps
|
||||||
|
.widget.mountable
|
||||||
|
h3.widget-title
|
||||||
|
Icon("puzzle-piece")
|
||||||
|
span Apps
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
label Chrome Extension:
|
||||||
|
a.button(href="https://chrome.google.com/webstore/detail/anime-notifier/hajchfikckiofgilinkpifobdbiajfch", target="_blank", rel="nofollow")
|
||||||
|
Icon("chrome")
|
||||||
|
span Get the Chrome Extension
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
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
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
label Android Web App:
|
||||||
|
a.button(href="https://www.youtube.com/watch?v=opyt4cw0ep8", target="_blank", rel="noopener")
|
||||||
|
Icon("android")
|
||||||
|
span Get the Android Web App
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
label Desktop Web App:
|
||||||
|
button.action(data-action="installApp", data-trigger="click")
|
||||||
|
Icon("desktop")
|
||||||
|
span Get the Desktop Web App
|
||||||
|
|
||||||
|
//- Developer
|
||||||
|
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||||
|
h3.widget-title
|
||||||
|
Icon("code")
|
||||||
|
span Developer
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
label API:
|
||||||
|
a.button(href="/api")
|
||||||
|
Icon("code")
|
||||||
|
span API
|
||||||
|
|
||||||
|
.widget-section
|
||||||
|
label GitHub:
|
||||||
|
a.button(href="https://github.com/animenotifier/notify.moe")
|
||||||
|
Icon("github")
|
||||||
|
span GitHub
|
||||||
|
|
||||||
|
//- PRO
|
||||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||||
h3.widget-title
|
h3.widget-title
|
||||||
Icon("star")
|
Icon("star")
|
||||||
@ -23,21 +72,4 @@ component SettingsExtras(user *arn.User)
|
|||||||
label Would you like to make this website more awesome?
|
label Would you like to make this website more awesome?
|
||||||
a.button(href="/support")
|
a.button(href="/support")
|
||||||
Icon("star")
|
Icon("star")
|
||||||
span Go PRO
|
span Go PRO
|
||||||
|
|
||||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
|
||||||
h3.widget-title
|
|
||||||
Icon("code")
|
|
||||||
span Developer
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
label API:
|
|
||||||
a.button(href="/api")
|
|
||||||
Icon("code")
|
|
||||||
span API
|
|
||||||
|
|
||||||
.widget-section
|
|
||||||
label GitHub:
|
|
||||||
a.button(href="https://github.com/animenotifier/notify.moe")
|
|
||||||
Icon("github")
|
|
||||||
span GitHub
|
|
27
pages/settings/info.pixy
Normal file
27
pages/settings/info.pixy
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
component SettingsInfo(user *arn.User)
|
||||||
|
SettingsTabs
|
||||||
|
|
||||||
|
h1.page-title Info settings
|
||||||
|
|
||||||
|
.settings
|
||||||
|
.widget.mountable(data-api="/api/user/" + user.ID)
|
||||||
|
h3.widget-title
|
||||||
|
Icon("user-circle")
|
||||||
|
span Info
|
||||||
|
|
||||||
|
InputSelection("Gender", user.Gender, "Gender", "Your gender", arn.DataLists["genders"])
|
||||||
|
InputText("BirthDay", user.BirthDay, "Birthday", "YYYY-MM-DD")
|
||||||
|
InputText("Website", user.Website, "Website", "Your homepage")
|
||||||
|
|
||||||
|
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||||
|
h3.widget-title
|
||||||
|
Icon("user-secret")
|
||||||
|
span Privacy
|
||||||
|
|
||||||
|
InputBool("Privacy.ShowGender", user.Settings().Privacy.ShowGender, "Show gender", "Shows your gender on the profile page")
|
||||||
|
InputBool("Privacy.ShowAge", user.Settings().Privacy.ShowAge, "Show age", "Shows your age on the profile page")
|
||||||
|
InputBool("Privacy.ShowLocation", user.Settings().Privacy.ShowLocation, "Show location", "Shows your location on the profile page")
|
||||||
|
|
||||||
|
.footer
|
||||||
|
p Can only be made visible to logged in members.
|
||||||
|
|
@ -10,9 +10,8 @@ component SettingsPersonal(user *arn.User)
|
|||||||
span Personal
|
span Personal
|
||||||
|
|
||||||
InputText("Nick", user.Nick, "Username", "Your username on notify.moe")
|
InputText("Nick", user.Nick, "Username", "Your username on notify.moe")
|
||||||
InputText("Website", user.Website, "Website", "Your homepage")
|
InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us about yourself")
|
||||||
InputTextArea("Introduction", user.Introduction, "Introduction", "Tell us about yourself (Markdown is allowed)")
|
|
||||||
|
|
||||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||||
h3.widget-title
|
h3.widget-title
|
||||||
Icon("camera")
|
Icon("camera")
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
component SettingsFormatting(user *arn.User)
|
component SettingsStyle(user *arn.User)
|
||||||
SettingsTabs
|
SettingsTabs
|
||||||
|
|
||||||
h1.page-title Formatting settings
|
h1.page-title Style settings
|
||||||
|
|
||||||
.settings
|
.settings
|
||||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||||
h3.widget-title
|
h3.widget-title
|
||||||
Icon("font")
|
Icon("font")
|
||||||
span Formatting
|
span Style
|
||||||
|
|
||||||
.widget-section
|
.widget-section
|
||||||
label(for="Theme")= "Theme:"
|
label(for="Theme")= "Theme:"
|
@ -1,8 +1,8 @@
|
|||||||
component SettingsTabs
|
component SettingsTabs
|
||||||
.tabs
|
.tabs
|
||||||
Tab("Personal", "user", "/settings")
|
Tab("Personal", "user", "/settings")
|
||||||
|
Tab("Info", "info-circle", "/settings/info")
|
||||||
Tab("Accounts", "cubes", "/settings/accounts")
|
Tab("Accounts", "cubes", "/settings/accounts")
|
||||||
Tab("Notifications", "bell", "/settings/notifications")
|
Tab("Notifications", "bell", "/settings/notifications")
|
||||||
Tab("Apps", "puzzle-piece", "/settings/apps")
|
Tab("Style", "font", "/settings/style")
|
||||||
Tab("Formatting", "font", "/settings/formatting")
|
|
||||||
Tab("Extras", "star", "/settings/extras")
|
Tab("Extras", "star", "/settings/extras")
|
@ -30,8 +30,8 @@ func main() {
|
|||||||
user.IP = ""
|
user.IP = ""
|
||||||
user.Accounts.Facebook.ID = ""
|
user.Accounts.Facebook.ID = ""
|
||||||
user.Accounts.Google.ID = ""
|
user.Accounts.Google.ID = ""
|
||||||
user.AgeRange = arn.UserAgeRange{}
|
|
||||||
user.Location = &arn.Location{}
|
user.Location = &arn.Location{}
|
||||||
|
user.BirthDay = ""
|
||||||
|
|
||||||
user.PushSubscriptions().Items = []*arn.PushSubscription{}
|
user.PushSubscriptions().Items = []*arn.PushSubscription{}
|
||||||
user.PushSubscriptions().Save()
|
user.PushSubscriptions().Save()
|
||||||
|
@ -466,9 +466,9 @@ var routeTests = map[string][]string{
|
|||||||
"/settings": nil,
|
"/settings": nil,
|
||||||
"/settings/accounts": nil,
|
"/settings/accounts": nil,
|
||||||
"/settings/notifications": nil,
|
"/settings/notifications": nil,
|
||||||
"/settings/apps": nil,
|
"/settings/info": nil,
|
||||||
"/settings/avatar": nil,
|
"/settings/avatar": nil,
|
||||||
"/settings/formatting": nil,
|
"/settings/style": nil,
|
||||||
"/settings/extras": nil,
|
"/settings/extras": nil,
|
||||||
"/shop": nil,
|
"/shop": nil,
|
||||||
"/shop/history": nil,
|
"/shop/history": nil,
|
||||||
|
Loading…
Reference in New Issue
Block a user