مكون تحميل دوار مخصص

While working on the Grogu theme I implemented a custom loading icon for that theme and thought it would be cool to have a standalone component to customize the loading spinner icon.

This component allows staff to customize the default spinning icon. There are three customization options available via theme settings:

  • icon name
  • icon size
  • icon color

The component only accepts FontAwesome icon name and I recommend picking one of these icons to get awesome spinning effect.

Enjoy, and do let me know how to further improve this component. :slight_smile:

25 إعجابًا

Hello just installed this! An improvement that you could make is to add another colour for dark theme as the colour you choose for light such as #000000 will not be seen on a dark theme.

6 إعجابات

That’s exactly why the color is customizable via theme setting custom icon color.

4 إعجابات

No what I mean is that is that the icon colour should invert depending on whether you are on a light or dark theme automatically.

My light theme background is #F0F0F0 and my dark theme background is #000000

Therefore it is difficult to find a colour that contrasts well. I want it to be a white icon on dark theme and a black one on light theme.
Thanks :wink:

4 إعجابات

For automatic icon colour switching based on theme colours – do not specify any value in custom icon color theme setting.

I have now made this default behaviour via:

12 إعجابًا

Brilliant! Thank you @meghna :heart_eyes:

9 إعجابات

I love this theme-component, and it works great on the home page. However, in some areas of my discourse instance, it shows the default loading spinner. For example, whenever I’m in the admin panel or user settings. @meghna Any way this can be fixed?

إعجاب واحد (1)

يرجى التحديث، لم يعد يعمل مع 3.2.0.beta2-dev.

يظهر خطأ في وحدة تحكم Chrome @meghna

الاختبار باستخدام Ubuntu مع أحدث متصفح Chrome، أحصل على الخطأ التالي على موقع التطوير المحلي الخاص بي:

component-templates.js:54 [discourse/theme-10/discourse/templates/components/conditional-loading-spinner] تم تأليف conditional-loading-spinner باستخدام gjs ولا يمكن تجاوز القالب الخاص به. تجاهل التجاوز.

على موقع الإنتاج الخاص بي، والذي تم اختباره أيضًا باستخدام أحدث متصفح Chrome على Ubuntu، لا أحصل على أخطاء، ولكني لا أرى أيضًا مؤشر تحميل.

أعتقد أنه تم إجراء بعض التغييرات على كيفية تجاوز القوالب في السمات منذ إصدار مكون السمة هذا: (not recommended) Overriding Discourse templates from a Theme or Plugin. أعتقد أن الطريقة التي يطبق بها Discourse مؤشر التحميل قد تغيرت أيضًا منذ ذلك الحين.

3 إعجابات

@meghna هل سيتم إصلاح هذا أم أنه معطل الآن؟ :thinking:

إعجاب واحد (1)

انتظر قليلاً. كان الفريق بعيدًا في اجتماعهم السنوي وقد تكون لديهم أولويات أخرى عندما يبدأون في العودة إلى العمل هذا الأسبوع.

إعجابَين (2)

يتطلب الإصلاح بعض التغييرات في النواة. نحن نعمل على ذلك وسنقوم بإصلاحه قريبًا.

3 إعجابات

شكرا على العمل الشاق :smiley: :heart:

تم تحديث مكون السمة هذا ليعمل على أحدث إصدار من Discourse (بفضل @cvx).

4 إعجابات

ما زال، لا يعمل معي. :confused:

تعديل؛ يعمل الآن بعد تحديث discourse اليوم.

أتساءل عن استخدام أيقونة SVG بدلاً من FontAwesome. شكرًا على أي حال.

توقف عن العمل مع أحدث إصدار. 3.2.0.beta4-dev

(24532653e6)

يبدو هذا جيدًا بالنسبة لي مع أحدث إصدار :thinking:

نعم، إنه يعمل في بعض الأماكن، ولكنه لا يعمل في المنشورات، عندما تنقر على منشور آخر لرؤيته. إنه لا يعمل الآن.

إعجابَين (2)