From 0b281b813a9ab00d7c69eb140ab5ac2952987316 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Fri, 23 Jul 2021 08:28:04 +0300 Subject: Roughly implemented account name change --- go-src/windows.go | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'go-src/windows.go') diff --git a/go-src/windows.go b/go-src/windows.go index f32d0a7..b88c224 100644 --- a/go-src/windows.go +++ b/go-src/windows.go @@ -249,8 +249,19 @@ func accountWindow(...string) { if !updatePassword(pass[0], pass[1]) { defer showError(invalidArgument, accountWindow) } else { - logoutUser() - defer StartupWindow() + defer accountWindow() + } + case 2: + newName := formWindow("Editing", accountWindow, + []formInput{ + {"Current password", inputBackSpec, nil}, + {"New name", "", stringValidName}, + }, + ) + if !updateName(newName[0], newName[1]) { + defer showError(invalidArgument, accountWindow) + } else { + defer accountWindow() } default: defer showError(invalidCommand, accountWindow) -- cgit v1.2.3