diff --git a/conf/users/admin.json b/conf/users/admin.json index c6065ed..518ca8b 100644 --- a/conf/users/admin.json +++ b/conf/users/admin.json @@ -8,7 +8,7 @@ "GoFormat": "gofmt", "FontFamily": "Helvetica", "FontSize": "13px", - "Theme": "black", + "Theme": "default", "Editor": { "FontFamily": "Consolas, 'Courier New', monospace", "FontSize": "13px", @@ -17,9 +17,7 @@ "TabSize": "4" }, "LatestSessionContent": { - "FileTree": [ - "D:\\GoGoGo\\src" - ], + "FileTree": [], "Files": [], "CurrentFile": "" } diff --git a/conf/wide.go b/conf/wide.go index b7ff045..071cfab 100644 --- a/conf/wide.go +++ b/conf/wide.go @@ -287,31 +287,6 @@ func GetUser(username string) *User { return nil } -// Save saves Wide and all users' configurations. -func Save() bool { - // Wide, XXX: does we need to save wide.json? - bytes, err := json.MarshalIndent(Wide, "", " ") - - if nil != err { - logger.Error(err) - - return false - } - - if err = ioutil.WriteFile("conf/wide.json", bytes, 0644); nil != err { - logger.Error(err) - - return false - } - - // Users - for _, user := range Users { - user.Save() - } - - return true -} - // initCustomizedConfs initializes the user customized configurations. func initCustomizedConfs() { for _, user := range Users { diff --git a/session/users.go b/session/users.go index 4fbb0e0..2d15abc 100644 --- a/session/users.go +++ b/session/users.go @@ -334,7 +334,7 @@ func addUser(username, password, email string) string { newUser := conf.NewUser(username, password, email, workspace) conf.Users = append(conf.Users, newUser) - if !conf.Save() { + if !newUser.Save() { return userCreateError } diff --git a/views/login.html b/views/login.html index 6048e5e..baba04a 100644 --- a/views/login.html +++ b/views/login.html @@ -18,7 +18,7 @@