From e3f708fcbabe580072f03023ebc2c45bf443cff2 Mon Sep 17 00:00:00 2001 From: chn Date: Wed, 1 May 2024 11:02:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E4=B8=80=E7=82=B9=E6=8F=90?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index 2c8f8bd..fabf6a7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -171,10 +171,15 @@ int main(int argc, const char** argv) initdb(); else if (args[1] == "login") { + std::cout << "Checking your ssh certification..." << std::flush; if (auto key = authenticated(); !key) return 1; else if (auto session = session_id(); !session) return 1; - else writedb(LoginData - {.Key = key->first, .SessionId = *session, .Subaccount = subaccount(), .Interactive = interactive()}); + else + { + writedb(LoginData + {.Key = key->first, .SessionId = *session, .Subaccount = subaccount(), .Interactive = interactive()}); + std::cout << fmt::format("\33[2K\rLogged in as {}.\n", key->second); + } } else if (args[1] == "logout") {