Custom user menu tab

This theme component allows you to add a custom tab containing links in the user dropdown menu.

Settings

You can customize the tab’s icon, set links to be visible to users/moderators/admins, and set a custom icon for each link.

Install this theme component

49 个赞

@awesomerobot, is it possible to request to have a menu item only showing to a specific group/tl ?

8 个赞

Yeah definitely possible, currently the component does:

 if (this.currentUser.moderator) {
          parseTabSettings(settings.moderator_only_tab_links);
          return items;
        }

…swap out this.currentUser.moderator to check for a group membership… and then settings.moderator_only_tab_links would be swapped out for the specific links for that group.

I can look into adding a setting that accepts various group names and links when I get a chance.

7 个赞

Thank you for the component. It is very helpful. A minor request - when I hover on the newly created tab, there is no description and there is no place to add a description.
Image from Gyazo

Am I missing something?

3 个赞

You’re not missing something, there was no way to add a description. I’ve just added the ability to add one, so if you update the component you should see the option at the bottom of the component’s settings.

8 个赞

Hi Kris :slightly_smiling_face: This is awesome :heart_eyes: thank you!

I have a question is that possible somehow to add target blank to the tab link? I have some extra part which points outside of the forum.

Thanks again! :slightly_smiling_face: Have a nice day! :heart:

1 个赞

Not to overload the requests, but Don’s request got me thinking about other enhancements. If it could, for example, position the custom tab icon to the rightmost, change the color of the icon and the tab’s background, with blank target links to my sister sites, it could replace my current horizontal header links… I mention different color of icon & background because that would help distinguish the menu separately from the current site.

嘿 Kris。有没有可能将其添加到 tc 的设置中?我们目前正计划为我们的高级用户实施这个额外的菜单 :slight_smile:

4 个赞

@awesomerobot,我们期待实现此功能。如果我们聘请开发人员将该功能添加到官方存储库,您是否接受 PR?

2 个赞

喜欢这个组件,但它似乎与新用户菜单的设置不兼容?是否有计划推出类似的组件来定制新菜单?

2 个赞

已经出现了一些想法……也许管理员甚至用户都可以开箱即用地自定义某些内容,而无需组件,但我们仍在试验初始版本和其他概念,然后再认真考虑如何实现。

因此,一旦我们将新的用户菜单设为默认设置,如果人们缺少此功能,则构建一个新组件可能是有意义的。这是否也比用户菜单选项卡更适合作为自定义侧边栏部分?

4 个赞

实际上,如果能有类似的选项来定制两者(通过主题组件或后端),我将觉得最有帮助。这样,作为管理员,我可以从任一处删除或添加部分,并且项目不会在另一个组件上重复。

例如,我想在某些社区上设置一个精简的菜单(但带有管理员选项卡):

那样的话,我将不需要侧边栏上的管理员部分。或者书签。而在其他情况下,将它们放在那里可能很有意义。

4 个赞

感谢这个很棒的功能。
我一直在尝试添加一个新图标,但似乎我遗漏了什么。
它适用于星形和婴儿图标,但不适用于 Font Awesome 图标。


2 个赞

我们尚未支持 Font Awesome 6,因此您需要在此处搜索 5.x 版本集中的可用图标:Find the Perfect Icon for Your Project in Font Awesome 5 | Font Awesome

看起来该图标在 6.x 版本中重命名为 shop,但在 5.x 版本中它有一个不同的名称:store-alt。因此,如果您将 additional iconscustom tab icon 更新为使用 store-alt,它应该可以工作!

3 个赞

我下载了这个主题,以便编辑用户个人资料下拉菜单。问题是,我不知道如何提交更改。它只在底部有一个预览选项,没有保存的地方。我曾尝试在主题帖子中寻求帮助,但我的帖子不知何故被删除了。任何帮助都将不胜感激!

我遵循了说明,像这样创建了我的新菜单项:

然后我像这样预览它以确认它有效:

但之后没有地方可以提交/保存更改!是我对主题的工作方式有什么不了解的地方吗?我是否必须编辑存储库代码本身?抱歉我太笨了,我对此非常陌生。

1 个赞

您是否将主题组件添加到了您的主题中?

2 个赞

搞定了,谢谢!:slight_smile:

2 个赞