This commit is contained in:
Liang Ding 2014-12-19 17:44:50 +08:00
parent 2bb0a92ddb
commit 524d022787
5 changed files with 5 additions and 32 deletions

View File

@ -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": ""
}

View File

@ -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 {

View File

@ -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
}

View File

@ -18,7 +18,7 @@
<li><a href="https://www.gitbook.io/book/88250/wide-user-guide" target="_blank">{{.i18n.help}}</a></li>
<li><a href="https://github.com/b3log/wide/issues/new" target="_blank">{{.i18n.report_issues}}</a></li>
<li><button class="btn btn-red" onclick="window.open('http://b3log.org/services')">{{.i18n.pricing}}</button></li>
<li><button class="btn" onclick="window.open('/signup')">{{.i18n.sign_up}}</button></li>
<li><button class="btn" onclick="window.location.href = '/signup'">{{.i18n.sign_up}}</button></li>
</ul>
</div>
</div>

View File

@ -18,7 +18,7 @@
<li><a href="https://www.gitbook.io/book/88250/wide-user-guide" target="_blank">{{.i18n.help}}</a></li>
<li><a href="https://github.com/b3log/wide/issues/new" target="_blank">{{.i18n.report_issues}}</a></li>
<li><button class="btn btn-red" onclick="window.open('http://b3log.org/services')">{{.i18n.pricing}}</button></li>
<li><button class="btn" onclick="window.open('/login')">{{.i18n.sign_up}}</button></li>
<li><button class="btn" onclick="window.location.href = '/login'">{{.i18n.login}}</button></li>
</ul>
</div>
</div>