|
|
@ -23,10 +23,16 @@ func SetEditorconfigIfExists(ctx *context.Context) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func SetDiffViewStyle(ctx *context.Context) {
|
|
|
|
func SetDiffViewStyle(ctx *context.Context) {
|
|
|
|
|
|
|
|
queryStyle := ctx.Query("style")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if !ctx.IsSigned {
|
|
|
|
|
|
|
|
ctx.Data["IsSplitStyle"] = queryStyle == "split"
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var (
|
|
|
|
var (
|
|
|
|
userStyle = ctx.User.DiffViewStyle
|
|
|
|
userStyle = ctx.User.DiffViewStyle
|
|
|
|
queryStyle = ctx.Query("style")
|
|
|
|
style string
|
|
|
|
style string
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
if queryStyle == "unified" || queryStyle == "split" {
|
|
|
|
if queryStyle == "unified" || queryStyle == "split" {
|
|
|
|