Bugs theme-component 主题组件问题

Bugs:一个 Discourse 主题组件

你知道吗?果蝇是第一批被送入太空的生物?除了南极洲,蜘蛛遍布世界各大洲 :spider:

本主题组件是 Auzbugs 仓库的移植和更新。它最初只是一个愚人节玩笑,后来经过多次改编。我在此组件中加入了一个新的“与虫子互动”功能。

这只是一点娱乐 :stuck_out_tongue_winking_eye::建议您谨慎使用,也许只在万圣节 :ghost: 使用,或者用来开个熟人玩笑 :nerd_face:。您可以在主题设置中将其针对特定用户组和用户。

我个人喜欢让一个小虫子朋友在屏幕上陪伴我 :ant:。如果它开始烦我,我就把它拍走!是的,您可以消灭它们 :skull: :flushed_face:

想了解更多?试试下面的预览…

Discourse Bugs 主题组件

:eyeglasses: 演示:预览此主题组件

:hammer_and_wrench: Git 仓库:https://github.com/naidihr/discourse-bug-theme

:thinking: 如何安装主题或主题组件?

设置

我在主题设置中包含了一些选项。其中包括仅向特定用户和用户组显示。

有几种方法可以让用户自行开启或关闭该功能。

创建可由用户选择加入的虫子用户组

通过创建用户组,您可以允许用户随时加入或退出。

设置一个名为“虫子”(Bugs)的用户组。在用户组设置中,允许他们自由加入和退出。

这将使他们在加入前后拥有这些选项。

记得设置主题选项,以便该用户组能看到虫子!

"将该组件转换为可由用户选择的主题”

要使此主题组件可由用户选择,您可以将其转换为一个主题。为此,请单击主题设置底部的“转换”按钮。

一旦它成为主题,请将其设为可由用户选择,选择浅色配色方案,并包含您已安装的任何其他组件。如果您愿意,也可以重命名它。

如果您已安装 主题选择器组件,用户则可以在站点菜单中切换他们的主题。

22 个赞

Really cool !

Just another suggestion:
Can you please add an option to enable this theme-component only at a certain time interval in a day.
For example, it would be fun if a user who visits the forum at midnight sees this :wink:

4 个赞

Happy to look at this unless anyone else fancies a go?

I’ve included the JavaScript code in the header file so admins can make their own customisations (that’s currently not possible if I include it as a linked js file).

I’m open to pull requests on the repo.

Great theme component! This kept me laughing! It would be useful if there was a visual check-box somewhere so the user can easily toggle it off-on.

Good point.

One way to make it so users can toggle it on and off is to convert it to a theme, as opposed to a theme component. I’ve added that to in the instructions at the top of the page.

You can also do it by setting up a group that users can freely join and leave. This takes advantage of the theme setting that can be set to only show it to specified users and groups. I’ve also added that option to the instructions at the top.

4 个赞

启用后没有看到任何错误。只有我这样吗?

不,你并不孤单。我不确定问题是出在 Safari、DiscourseHub 还是 iOS 设备本身,但我在任何地方都无法复现任何类型的 bug。是的,我知道我应该检查是否存在某些错误,但我懒得去做了。

抱歉,现在它“有bug”了,但意思不对——我会检查一下。该组件本身没有更改,但看起来其他地方的某些变更需要更新。它之前在 Safari 中是可以正常工作的。

4 个赞

这真是个“充满漏洞”的TC!:drum: :clown_face:

1 个赞