Added title language setting

This commit is contained in:
Eduard Urbach 2017-10-20 18:04:30 +02:00
parent 5fbdcbfb6a
commit 4bbe0ea7d5
2 changed files with 10 additions and 2 deletions

View File

@ -16,7 +16,7 @@ component Anime(anime *arn.Anime, friends []*arn.User, listItems map[*arn.User]*
.space .space
.anime-info .anime-info
h1.anime-title(title=anime.Type)= anime.Title.Canonical h1.anime-title(title=anime.Type)= anime.Title.ByUser(user)
//- if user && user.titleLanguage === "japanese" //- if user && user.titleLanguage === "japanese"
//- span.second-title(title=anime.Title.English !== anime.Title.Romaji ? anime.Title.English : null)= anime.Title.Romaji //- span.second-title(title=anime.Title.English !== anime.Title.Romaji ? anime.Title.English : null)= anime.Title.Romaji

View File

@ -164,7 +164,15 @@ component Settings(user *arn.User)
span Formatting span Formatting
.widget-section .widget-section
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") 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="japanese") Japanese
option(value="romaji") Romaji
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")
//- .widget.mountable(data-api="/api/settings/" + user.ID) //- .widget.mountable(data-api="/api/settings/" + user.ID)
//- h3.widget-title //- h3.widget-title