From 7da8df332ffe16eed0c6d2eb2fd1721efdcfafa4 Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 20 Dec 2024 15:34:06 +0100 Subject: [PATCH] Show last activity in user card --- com.woltlab.wcf/templates/userCard.tpl | 21 +++++++++++++++++++ wcfsetup/install/files/style/ui/userCard.scss | 6 ++++++ wcfsetup/install/lang/de.xml | 2 +- wcfsetup/install/lang/en.xml | 2 +- 4 files changed, 29 insertions(+), 2 deletions(-) diff --git a/com.woltlab.wcf/templates/userCard.tpl b/com.woltlab.wcf/templates/userCard.tpl index baa13e251f..deee068de1 100644 --- a/com.woltlab.wcf/templates/userCard.tpl +++ b/com.woltlab.wcf/templates/userCard.tpl @@ -101,6 +101,27 @@ {/hascontent} {event name='afterButtons'} + + {hascontent} +
+
+ {content} + {event name='beforeDetails'} + + {if $user->canViewOnlineStatus() && $user->getLastActivityTime()} +
{lang}wcf.user.usersOnline.lastActivity{/lang}
+
{time time=$user->getLastActivityTime()}
+ {if $user->getCurrentLocation()} +
{lang}wcf.user.usersOnline.location{/lang}
+
{unsafe:$user->getCurrentLocation()}
+ {/if} + {/if} + + {event name='afterDetails'} + {/content} +
+
+ {/hascontent} {hascontent} diff --git a/wcfsetup/install/files/style/ui/userCard.scss b/wcfsetup/install/files/style/ui/userCard.scss index 92291c780f..70f3a3e367 100644 --- a/wcfsetup/install/files/style/ui/userCard.scss +++ b/wcfsetup/install/files/style/ui/userCard.scss @@ -138,6 +138,12 @@ } } +.userCard__details { + @include wcfFontSmall; + margin-top: auto; + padding-top: 5px; +} + .popoverContainer[data-identifier="com.woltlab.wcf.user"] { --padding: 0; --maxHeight: none; diff --git a/wcfsetup/install/lang/de.xml b/wcfsetup/install/lang/de.xml index 13e4b84f09..710a8b76ef 100644 --- a/wcfsetup/install/lang/de.xml +++ b/wcfsetup/install/lang/de.xml @@ -5131,7 +5131,7 @@ Sobald {if LANGUAGE_USE_INFORMAL_VARIANT}dein{else}Ihr{/if} Benutzerkonto freige - + diff --git a/wcfsetup/install/lang/en.xml b/wcfsetup/install/lang/en.xml index 770ce9fd83..cfdcb026b5 100644 --- a/wcfsetup/install/lang/en.xml +++ b/wcfsetup/install/lang/en.xml @@ -5130,7 +5130,7 @@ You also received a list of backup codes to use when your second factor becomes - + -- 2.20.1