mirror of
https://github.com/wavetermdev/waveterm.git
synced 2024-12-21 16:38:23 +01:00
fix: add conn prefix to askbeforewshinstall flag (#1013)
This commit is contained in:
parent
da0b8b044e
commit
1354c34921
3
frontend/types/gotypes.d.ts
vendored
3
frontend/types/gotypes.d.ts
vendored
@ -471,7 +471,8 @@ declare global {
|
||||
"window:disablehardwareacceleration"?: boolean;
|
||||
"telemetry:*"?: boolean;
|
||||
"telemetry:enabled"?: boolean;
|
||||
askbeforewshinstall?: boolean;
|
||||
"conn:*"?: boolean;
|
||||
"conn:askbeforewshinstall"?: boolean;
|
||||
};
|
||||
|
||||
// waveobj.StickerClickOptsType
|
||||
|
@ -315,11 +315,11 @@ func (conn *SSHConn) CheckAndInstallWsh(ctx context.Context, clientDisplayName s
|
||||
}
|
||||
if response.CheckboxStat {
|
||||
meta := waveobj.MetaMapType{
|
||||
wconfig.ConfigKey_AskBeforeWshInstall: false,
|
||||
wconfig.ConfigKey_ConnAskBeforeWshInstall: false,
|
||||
}
|
||||
err := wconfig.SetBaseConfigValue(meta)
|
||||
if err != nil {
|
||||
return fmt.Errorf("error setting askbeforewshinstall value: %w", err)
|
||||
return fmt.Errorf("error setting conn:askbeforewshinstall value: %w", err)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -438,7 +438,7 @@ func (conn *SSHConn) connectInternal(ctx context.Context) error {
|
||||
return err
|
||||
}
|
||||
config := wconfig.ReadFullConfig()
|
||||
installErr := conn.CheckAndInstallWsh(ctx, clientDisplayName, &WshInstallOpts{NoUserPrompt: !config.Settings.AskBeforeWshInstall})
|
||||
installErr := conn.CheckAndInstallWsh(ctx, clientDisplayName, &WshInstallOpts{NoUserPrompt: !config.Settings.ConnAskBeforeWshInstall})
|
||||
if installErr != nil {
|
||||
log.Printf("error: unable to install wsh shell extensions for %s: %v\n", conn.GetName(), err)
|
||||
return fmt.Errorf("conncontroller %s wsh install error: %v", conn.GetName(), installErr)
|
||||
|
@ -5,10 +5,10 @@
|
||||
"autoupdate:enabled": true,
|
||||
"autoupdate:installonquit": true,
|
||||
"autoupdate:intervalms": 3600000,
|
||||
"conn:askbeforewshinstall": true,
|
||||
"editor:minimapenabled": true,
|
||||
"web:defaulturl": "https://github.com/wavetermdev/waveterm",
|
||||
"web:defaultsearch": "https://www.google.com/search?q={query}",
|
||||
"window:tilegapsize": 3,
|
||||
"telemetry:enabled": true,
|
||||
"askbeforewshinstall": true
|
||||
"telemetry:enabled": true
|
||||
}
|
||||
|
@ -62,6 +62,7 @@ const (
|
||||
ConfigKey_TelemetryClear = "telemetry:*"
|
||||
ConfigKey_TelemetryEnabled = "telemetry:enabled"
|
||||
|
||||
ConfigKey_AskBeforeWshInstall = "askbeforewshinstall"
|
||||
ConfigKey_ConnClear = "conn:*"
|
||||
ConfigKey_ConnAskBeforeWshInstall = "conn:askbeforewshinstall"
|
||||
)
|
||||
|
||||
|
@ -96,7 +96,8 @@ type SettingsType struct {
|
||||
TelemetryClear bool `json:"telemetry:*,omitempty"`
|
||||
TelemetryEnabled bool `json:"telemetry:enabled,omitempty"`
|
||||
|
||||
AskBeforeWshInstall bool `json:"askbeforewshinstall,omitempty"`
|
||||
ConnClear bool `json:"conn:*,omitempty"`
|
||||
ConnAskBeforeWshInstall bool `json:"conn:askbeforewshinstall,omitempty"`
|
||||
}
|
||||
|
||||
type ConfigError struct {
|
||||
|
Loading…
Reference in New Issue
Block a user