Reduced number of settings tabs
This commit is contained in:
parent
900148b788
commit
7ea735ac46
@ -96,7 +96,6 @@ func Configure(app *aero.Application) {
|
||||
l.Page("/settings/accounts", settings.Get(components.SettingsAccounts))
|
||||
l.Page("/settings/notifications", settings.Get(components.SettingsNotifications))
|
||||
l.Page("/settings/apps", settings.Get(components.SettingsApps))
|
||||
l.Page("/settings/avatar", settings.Get(components.SettingsAvatar))
|
||||
l.Page("/settings/formatting", settings.Get(components.SettingsFormatting))
|
||||
l.Page("/settings/pro", settings.Get(components.SettingsPro))
|
||||
|
||||
|
@ -4,7 +4,6 @@ component SettingsTabs
|
||||
Tab("Accounts", "cubes", "/settings/accounts")
|
||||
Tab("Notifications", "bell", "/settings/notifications")
|
||||
Tab("Apps", "puzzle-piece", "/settings/apps")
|
||||
Tab("Avatar", "picture-o", "/settings/avatar")
|
||||
Tab("Formatting", "font", "/settings/formatting")
|
||||
Tab("PRO", "star", "/settings/pro")
|
||||
|
||||
@ -23,6 +22,30 @@ component SettingsPersonal(user *arn.User)
|
||||
InputText("Tagline", user.Tagline, "Tagline", "Text that appears below your username")
|
||||
InputText("Website", user.Website, "Website", "Your homepage")
|
||||
|
||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||
h3.widget-title
|
||||
Icon("picture-o")
|
||||
span Avatar
|
||||
|
||||
.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
|
||||
|
||||
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 (" + user.Email + ")", title="Gravatar (" + user.Email + ")")
|
||||
|
||||
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")
|
||||
|
||||
component SettingsNotifications(user *arn.User)
|
||||
SettingsTabs
|
||||
|
||||
@ -87,36 +110,6 @@ component SettingsApps(user *arn.User)
|
||||
Icon("desktop")
|
||||
span Get the Desktop Web App
|
||||
|
||||
component SettingsAvatar(user *arn.User)
|
||||
SettingsTabs
|
||||
|
||||
h1.page-title Avatar settings
|
||||
|
||||
.settings
|
||||
.widget.mountable(data-api="/api/settings/" + user.ID)
|
||||
h3.widget-title
|
||||
Icon("picture-o")
|
||||
span Avatar
|
||||
|
||||
.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
|
||||
|
||||
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")
|
||||
|
||||
component SettingsFormatting(user *arn.User)
|
||||
SettingsTabs
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user