mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-12-15 15:35:07 +00: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
17 lines
360 B
Go
17 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))
|
|
}
|