[בתשלום] הוסף מתג ערכת נושא כהה לתפריט המשתמש

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

In a [PAID] Marketplace thread titled ‘Add dark theme toggle to user menu,’ jrgong seeks a custom solution allowing users to manually override dark mode via the user avatar dropdown menu — mimicking the ‘Do Not Disturb’ toggle — with a deadline of May 15 and a budget of $100–300 USD. Moin suggests an alternative using an existing theme-switcher component, but jrgong notes it’s outdated and incompatible with Discourse’s core dark mode, especially given space constraints on mobile headers. th21 clarifies that the current header toggle doesn’t use Discourse’s built-in dark mode, instead applying custom CSS rules — a point manuel confirms, explaining it only switches to the ‘Alien’ theme’s dark colors, not the admin-defined scheme. th21 adds that the toggle is inspired by the Header Theme Toggle plugin and allows switching between the current theme and the admin-defined dark scheme. Finally, Ahmed_Gagan expresses interest in taking on the task and sends a private message to jrgong. The consensus is that no generic component currently exists for this functionality, suggesting it would need to be built using Discourse’s color-scheme-picker library.

What would you like done?

I would like to give my users the ability to override the dark mode setting manually from the user avatar dropdown menu.

The idea is to use the exact same behaviour as the “Do not Disturb” Toggle.

When do you need it done?

May 15

What is your budget, in $ USD that you can offer for this task?

100-300 USD

3 לייקים

Not in a dropdown menu. But maybe an alternative.

לייק 1

As far as I am concerned, that component is outdated and doesn’t support the new dark theme feature.
Also in our use case we don’t have any extra space in our mobile header, so we prefer the user menu.

לייק 1

What do you mean by overriding? We have a toggle on the header bar that allow user to switch between current theme and dark mode

image

לייק 1

That toggle doesn’t make use of the core dark mode functionality, doesn’t it? See the corresponding topic here, the component hasn’t been updated in a while:

לייק 1

No, it doesn’t make use of the dark color scheme you can set in the admin backend. It uses new css rules for it’s own dark scheme. So the name is a bit misleading, because it switches only to the Alien theme dark colors.

I’m not aware there’s a generic theme component to toggle color schemes right now. I guess it could be written similar to the Header Theme Toggle and using functions from discourse/lib/color-scheme-picker. Can’t code it myself either though :roll_eyes:

3 לייקים

it’s inspired by the theme switcher and

https://meta.discourse.org/t/header-theme-toggle/113496

so you can switch between whatever theme you are on and the drak theme (scheme defined in admin tool

לייק 1

I am interested to take this up. Sending you a PM

לייק 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.