36147f580c
Repositories displaying an "Add more..." tab on the header is a neat way to let people discover they can enable more units. However, displaying it all the time for repository owners, even when they deliberately do not want to enable more units gets noisy very fast. As such, this patch introduces a new setting which lets people disable this hint under the appearance settings. Fixes #2378. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
18 lines
338 B
Go
18 lines
338 B
Go
// Copyright 2024 The Forgejo Authors. All rights reserved.
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
package v1_22 //nolint
|
|
|
|
import (
|
|
"xorm.io/xorm"
|
|
)
|
|
|
|
func AddUserRepoUnitHintsSetting(x *xorm.Engine) error {
|
|
type User struct {
|
|
ID int64
|
|
EnableRepoUnitHints bool `xorm:"NOT NULL DEFAULT true"`
|
|
}
|
|
|
|
return x.Sync(&User{})
|
|
}
|