רכיב ערכת נושא למחוון לא מקוון

סיכום מבוסס בינה מלאכותית

Don introduces the Offline Indicator Theme Component, a simple tool that displays a notification when users experience internet connection issues. The component is customizable, allowing administrators to adjust the icon (using FontAwesome), width (desktop only), and border radius. It also supports translations and displays in the bottom right corner on desktop.

During the discussion, Paracelsus asks if the indicator functions during forum rebuilds. JammyDodger initially clarifies that theme components do not require rebuilds to install, but Canapin points out the question was about whether the message appears during the rebuild process. Don confirms that this specific component does not show during rebuilds, as it relies on detecting local connection issues rather than server-side status. He suggests using a global notice for rebuild alerts to avoid confusing users about the source of the problem. Jagster reports a code update warning regarding the component, which Don addresses by linking to a GitHub commit that resolves the issue, thanking @davidkingham for the pull request.

Hello :wave: This theme component is a simple offline indicator which appears when user have internet connection problems.

On desktop the indicator shows on bottom right.

There are some settings which you can customize the indicator.

offline indicator icon
You can use FontAwesome icons. This icon appear before Oops…You’re offline title.

offline indicator width
This width is only affect on desktop view. On mobile it use width: calc(100% - 20px);

offline indicator rounding
This is the indicator border radius. You can make the corners rounded if increase the value.

And translations…

27 לייקים

Hi, does this work upon forum rebuilds (meaning the 5-6 minutes it usually takes)?

לייק 1

This is a theme component, so you can add it from the /admin/customize/themes page with no need for a rebuild. :+1:

לייק 1

I think he’s asking if the message is shown during a rebuild.

3 לייקים

Doh. :man_facepalming: Yes. That does indeed make much more sense. :slightly_smiling_face: My bad.

4 לייקים

Hello,

This one will not shown during rebuild. I used to create an offline indicator with offline.js that is always checks favicon, makes requests so that shown during rebuild too. But that seems to unnecessary to this feature for me and also can confuse users where is the problem? Server side or with their internet connection.

I believe you can do this with global notice too. Just add a notice before rebuild. :slightly_smiling_face:

3 לייקים

Thank you so much for this great component! :grinning:

לייק 1

FYI:

[Admin Notice] Theme 'Offline Indicator Theme Component' contains code which needs updating. (id:discourse.hbs-extension)
2 לייקים

Here is the update: Merge pull request #2 from davidkingham/convert-hbs-connector-to-gjs · VaperinaDEV/discourse-offline-indicator@29bde62 · GitHub

Thanks for the PR @davidkingham :heart:

3 לייקים