Migrate to profile ids

This commit is contained in:
Theodor S. Midtlien
2026-06-08 14:50:25 +02:00
parent 60d2fa08b0
commit 33b1cc5449
20 changed files with 1138 additions and 349 deletions
+7 -7
View File
@@ -493,7 +493,7 @@ func (s *serviceClient) getConnectionForm() *widget.Form {
if err != nil {
log.Errorf("get active profile: %v", err)
} else {
activeProfName = activeProf.Name
activeProfName = activeProf.ID
}
return &widget.Form{
Items: []*widget.FormItem{
@@ -622,7 +622,7 @@ func (s *serviceClient) buildSetConfigRequest(iMngURL string, port, mtu int64) (
}
req := &proto.SetConfigRequest{
ProfileName: activeProf.Name,
ProfileName: activeProf.ID,
Username: currUser.Username,
}
@@ -789,11 +789,11 @@ func (s *serviceClient) login(ctx context.Context, openURL bool) (*proto.LoginRe
loginReq := &proto.LoginRequest{
IsUnixDesktopClient: runtime.GOOS == "linux" || runtime.GOOS == "freebsd",
ProfileName: &activeProf.Name,
ProfileName: &activeProf.ID,
Username: &currUser.Username,
}
profileState, err := s.profileManager.GetProfileState(activeProf.Name)
profileState, err := s.profileManager.GetProfileState(activeProf.ID)
if err != nil {
log.Debugf("failed to get profile state for login hint: %v", err)
} else if profileState.Email != "" {
@@ -1309,7 +1309,7 @@ func (s *serviceClient) getSrvConfig() {
}
srvCfg, err := conn.GetConfig(s.ctx, &proto.GetConfigRequest{
ProfileName: activeProf.Name,
ProfileName: activeProf.ID,
Username: currUser.Username,
})
if err != nil {
@@ -1533,7 +1533,7 @@ func (s *serviceClient) loadSettings() {
}
cfg, err := conn.GetConfig(s.ctx, &proto.GetConfigRequest{
ProfileName: activeProf.Name,
ProfileName: activeProf.ID,
Username: currUser.Username,
})
if err != nil {
@@ -1610,7 +1610,7 @@ func (s *serviceClient) updateConfig() error {
}
req := proto.SetConfigRequest{
ProfileName: activeProf.Name,
ProfileName: activeProf.ID,
Username: currUser.Username,
DisableAutoConnect: &disableAutoStart,
ServerSSHAllowed: &sshAllowed,