Commit Graph

10 Commits

Author SHA1 Message Date
Alan Guo Xiang Tan 167bc8cee9
FIX: Ensure that custom header links migration do not fail validation (#55)
This commit is a follow up to 73747938bd
where the migration will fail because the objects created by the
migration will end up failing to save because the objects will fail the
validation given the new schema. This commit updates the migration to
ensure that we do not end up with invalid objects.
2024-04-26 12:57:46 +08:00
Alan Guo Xiang Tan 73747938bd
DEV: Migrate custom header links to new objects setting type (#53)
Why this change?

Since discourse/discourse@a440e15, we have started to support objects typed theme setting so we are switching this theme component to use it instead as it provides a much better UX for configuring the settings required for the theme component.
2024-04-23 11:50:20 +08:00
Alan Guo Xiang Tan 601526cf77
DEV: Move setting translation to locale files instead. (#49)
Why this change?

This is the recommended way to add descriptions for a theme setting as
mixing translation for multiple locales in the settings file is not
recommended per
https://meta.discourse.org/t/add-localizable-strings-to-themes-and-theme-components/109867.
2024-03-13 14:04:03 +08:00
Alan Guo Xiang Tan 5006125483
DEV: Rename `Custom_header_links` settings to `custom_header_links` (#45)
Why this change?

Using uppercase in settings name is not part of our convention so
renaming it here.
2024-01-26 10:15:41 +08:00
Kris 9076bf8aae
UX: remove locale from default settings (#38) 2023-09-07 09:43:17 -04:00
Lena MONTENOT 0661c627cb
Add a locale filter to links (#30)
* Add a locale attribute to custom header links

This attribute is to be set to a language code like 'fr', 'en' or 'de'.

* Filter out links which locale is different from the html document's

* prettier

* more syntax

---------

Co-authored-by: Lena Montenot <lena.montenot@commown.coop>
Co-authored-by: Jordan Vidrine <jordan@jordanvidrine.com>
2023-04-21 08:30:07 -05:00
Penar Musaraj 10b9eabb28
Use list_type: simple for setting 2020-09-24 15:41:37 -04:00
Kris a99331c590 FEATURE: Add setting to show links on the left or right 2019-11-12 15:50:13 -05:00
Joe 459c594fbf
Update settings.yml 2018-06-24 15:33:36 +08:00
Joe fd5f5d6d22
Rename setting.yml to settings.yml 2018-06-24 15:29:44 +08:00