mirror of
https://github.com/wavetermdev/backup.git
synced 2026-08-05 13:57:07 -07:00
fix xterm.js versions and addon versions (#534)
* make xterm packages consistent * add serializeAddon, fix varsUpdated
This commit is contained in:
@@ -5851,15 +5851,13 @@ func ClientSetCommand(ctx context.Context, pk *scpacket.FeCommandPacketType) (sc
|
||||
}
|
||||
if webglStr, found := pk.Kwargs["webgl"]; found {
|
||||
webglVal := resolveBool(webglStr, false)
|
||||
if webglVal {
|
||||
varsUpdated = append(varsUpdated, "webgl")
|
||||
}
|
||||
clientOpts := clientData.ClientOpts
|
||||
clientOpts.WebGL = webglVal
|
||||
err = sstore.SetClientOpts(ctx, clientOpts)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("error updating client webgl: %v", err)
|
||||
}
|
||||
varsUpdated = append(varsUpdated, "webgl")
|
||||
}
|
||||
if len(varsUpdated) == 0 {
|
||||
return nil, fmt.Errorf("/client:set requires a value to set: %s", formatStrs([]string{"termfontsize", "termfontfamily", "openaiapitoken", "openaimodel", "openaibaseurl", "openaimaxtokens", "openaimaxchoices", "webgl"}, "or", false))
|
||||
|
||||
Reference in New Issue
Block a user