Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
chore: update user session section
Steven59eae4465a87
diff --git a/server/router/api/v1/auth_service.go b/server/router/api/v1/auth_service.goindex 416d02d98..259cc76e8 100644--- a/server/router/api/v1/auth_service.go+++ b/server/router/api/v1/auth_service.go@@ -178,15 +178,6 @@ func (s *APIV1Service) CreateSession(ctx context.Context, request *v1pb.CreateSe}func (s *APIV1Service) doSignIn(ctx context.Context, user *store.User, expireTime time.Time) error {- // Generate JWT access token for API use- accessToken, err := GenerateAccessToken(user.Email, user.ID, expireTime, []byte(s.Secret))- if err != nil {- return status.Errorf(codes.Internal, "failed to generate access token, error: %v", err)- }- if err := s.UpsertAccessTokenToStore(ctx, user, accessToken, "user login"); err != nil {- return status.Errorf(codes.Internal, "failed to upsert access token to store, error: %v", err)- }-// Generate unique session ID for web usesessionID, err := GenerateSessionID()if err != nil {diff --git a/web/src/components/Settings/MyAccountSection.tsx b/web/src/components/Settings/MyAccountSection.tsxindex 1ce983fec..4b8ba4a38 100644--- a/web/src/components/Settings/MyAccountSection.tsx+++ b/web/src/components/Settings/MyAccountSection.tsx@@ -48,8 +48,8 @@ const MyAccountSection = () => {</Popover></div>- <AccessTokenSection /><UserSessionsSection />+ <AccessTokenSection /></div>);};diff --git a/web/src/components/Settings/UserSessionsSection.tsx b/web/src/components/Settings/UserSessionsSection.tsxindex e95fb2a16..56af2b70e 100644--- a/web/src/components/Settings/UserSessionsSection.tsx+++ b/web/src/components/Settings/UserSessionsSection.tsx@@ -50,15 +50,6 @@ const UserSessionsSection = () => {}};- const formatLocation = (clientInfo: UserSession["clientInfo"]) => {- if (!clientInfo) return "Unknown";-- const parts = [];- if (clientInfo.ipAddress) parts.push(clientInfo.ipAddress);-- return parts.length > 0 ? parts.join(" • ") : "Unknown";- };-const formatDeviceInfo = (clientInfo: UserSession["clientInfo"]) => {if (!clientInfo) return "Unknown Device";@@ -97,9 +88,6 @@ const UserSessionsSection = () => {<th scope="col" className="px-3 py-2 text-left text-sm font-semibold text-gray-900 dark:text-gray-400">{t("setting.user-sessions-section.device")}</th>- <th scope="col" className="py-2 pl-4 pr-3 text-left text-sm font-semibold text-gray-900 dark:text-gray-400">- {t("setting.user-sessions-section.location")}- </th><th scope="col" className="px-3 py-2 text-left text-sm font-semibold text-gray-900 dark:text-gray-400">{t("setting.user-sessions-section.last-active")}</th>@@ -131,9 +119,6 @@ const UserSessionsSection = () => {</div></div></td>- <td className="whitespace-nowrap py-2 pl-4 pr-3 text-sm text-gray-900 dark:text-gray-400">- {formatLocation(userSession.clientInfo)}- </td><td className="whitespace-nowrap px-3 py-2 text-sm text-gray-500 dark:text-gray-400"><div className="flex items-center space-x-1"><ClockIcon className="w-4 h-4" />