mirror of
https://github.com/go-gitea/gitea.git
synced 2024-11-04 08:17:24 -05:00
8d2c24f7f9
* add migration and basic UI for changing a user's theme * update user themem * use right text on button * load theme based on users' selection * load theme based on users' selection in pwa too * update sample config * delete older theme loading * implement AfterLoad to set users' theme properly * set up default theme when creating a user. This uses the installation wide theme * use flash messages for error * set default theme when creating a user from the cli * fix @lunny review
18 lines
360 B
Go
18 lines
360 B
Go
// Copyright 2019 The Gitea Authors. All rights reserved.
|
|
// Use of this source code is governed by a MIT-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
package migrations
|
|
|
|
import (
|
|
"github.com/go-xorm/xorm"
|
|
)
|
|
|
|
func addUserDefaultTheme(x *xorm.Engine) error {
|
|
type User struct {
|
|
Theme string `xorm:"VARCHAR(30)"`
|
|
}
|
|
|
|
return x.Sync2(new(User))
|
|
}
|