PLT-2992 Added the ability to use different themes for each team (#3411)

* Cleaned up user_settings_theme.jsx and import_theme_modal.jsx

* Made ImportThemeModal use a callback to return the theme to the user settings modal instead of saving it directly

* Moved user theme from model to preferences

* Added serverside API to delete preferences TODO update package with client stuff

* Changed constants.jsx so that Preferences and ActionTypes can be imported on their own

* Updated ThemeProps migration code to properly rename solarized code themes

* Fixed warnings thrown by AppDispatcher

* Added clientside UI to support team-specific themes

* Removed debugging code from test

* Fixed setting a user's theme when they haven't set their theme before
Этот коммит содержится в:
Harrison Healey
2016-07-14 10:08:36 -04:00
коммит произвёл Christopher Speller
родитель 8e810bc2eb
Коммит caabfbcdd5
23 изменённых файлов: 671 добавлений и 273 удалений

Просмотреть файл

@@ -39,19 +39,6 @@ func TestUserPreSave(t *testing.T) {
func TestUserPreUpdate(t *testing.T) {
user := User{Password: "test"}
user.PreUpdate()
user.ThemeProps = StringMap{
"codeTheme": "github",
"awayIndicator": "#cdbd4e",
"buttonColor": "invalid",
}
user.PreUpdate()
if user.ThemeProps["codeTheme"] != "github" || user.ThemeProps["awayIndicator"] != "#cdbd4e" {
t.Fatal("shouldn't have changed valid theme props")
} else if user.ThemeProps["buttonColor"] != "#ffffff" {
t.Fatal("should've changed invalid theme prop")
}
}
func TestUserUpdateMentionKeysFromUsername(t *testing.T) {