"最后登录" 用户卡

此主题组件允许您在用户资料卡中包含“最后活跃时间”统计信息。

\u003e 仓库: GitHub - tshenry/discourse-last-seen-user-card-theme-component

\u003ch4\u003e之前\u003c/h4\u003e

\u003ch4\u003e之后\u003c/h4\u003e

\u003ch2\u003e关于\u003c/h2\u003e

除了我本人希望将此统计信息添加到用户卡片之外,此处的一些讨论也启发了该主题组件的创建:

\u003ch2\u003e安装\u003c/h2\u003e

请按照以下指南操作:

如有任何疑问、问题或建议,欢迎随时发帖!

46 个赞

This is fantastic. I will use this function a lot as I assess new members’ engagement and chase particular people down who I work with closely.

2 个赞

This has had a minor update:

  • Reduced the amount of code by switching from a full template override to using the existing plugin outlet to achieve the same positioning.

For anyone that uses this or is interested in using it, there are four metadata positions on the user card. Currently, starting from the left it goes last post, date joined, last seen, and time read. Which position would you prefer the "last seen" metadata to be displayed?
  • First
  • Second
  • Third (where it is currently)
  • Fourth

0 voters

I imagine it’s not extremely important to most, but I’m curious if there is a preference that I can consider for a future update.

4 个赞

I don’t mind where it is so long as it is there.

1 个赞

I’ve update this to position “Last Seen” first in the list. Thanks to all that voiced their opinion :grin:

8 个赞

@tshenry 它与最新版的 Discourse 兼容吗?已安装但无法正常运行。

我刚刚检查过了,它在最新的测试通过版本中运行正常。添加组件到主主题后,你确定刷新了页面吗?

3 个赞

您也检查过移动端的显示效果吗?

1 个赞

啊,好问题!有个趣闻——这个组件是在移动端用户卡片出现之前创建的!因此,它最初只针对桌面端进行了配置。

我刚刚推送了一个更新,应该能同时支持这两种环境:

8 个赞

我已经收到更新,谢谢。

2 个赞

重新提起这个话题:只是想确认它依然运行得完美无缺,而且超级实用!

这让检查用户是否确实仍是活跃成员变得极其快捷简便。以前,我总得打开完整个人资料,才能判断是否值得花时间给该用户发送私信。

非常希望能在核心功能中看到它!

4 个赞

是的!!依我看,这绝对应该包含在核心中。在此之前,非常感谢 @tshenry

3 个赞

我注意到自从上次 Discourse 更新以来,用户卡片中的“最后 seen”文本比其他文本大得多,而且是粗体。我检查了一下,发现它被包裹在 <h3> 中,所以我通过在主题 CSS 中添加以下内容来撤销了这一点:

#user-card .last-seen-metadata h3 {
    font-size: unset;
    font-weight: unset;
}

我不知道这是预期的效果,所以我想分享一下我的经历。

2 个赞

可能不会。

4 个赞

我已在此处为组件添加了一个拉取请求,以删除标题标签以匹配 Discourse 的更改:

8 个赞

非常感谢您的解释以及拉取请求!:slight_smile:

2 个赞

非常感谢您的修复!它会进入 3.3.x stable 分支吗?

主题组件更新与核心更新完全分开,您可以随时从管理员界面更新它们,而无需考虑核心更新。

2 个赞

哎呀,抱歉,我忘了这是一个主题组件,而不是核心部分。

2 个赞

运行效果很好,但不知何故,它在我这里显示为列表中的最后一个(在“cheers”之后)。

1 个赞