discourse/app/assets/javascripts/admin/addon/components/site-settings/enum.gjs
Martin Brennan 37286de6d2
FEATURE: Show themeable site settings in site setting lists (#34666)
This commit removes the filter that would remove themeable
site settings from all setting lists, so they are easier to
find for admins.

To do this, we show the value of the site's default theme
for that theme site setting, disable the setting component,
and provide a link to the site's default theme for quick
editing.

---------

Co-authored-by: awesomerobot <kris.aubuchon@discourse.org>
2025-09-22 10:55:23 +10:00

23 lines
662 B
Text
Vendored

/* eslint-disable ember/no-classic-components */
import Component from "@ember/component";
import { fn, hash } from "@ember/helper";
import ComboBox from "select-kit/components/combo-box";
export default class Enum extends Component {
<template>
<ComboBox
@content={{this.setting.validValues}}
@value={{this.value}}
@onChange={{fn (mut this.value)}}
@valueProperty={{this.setting.computedValueProperty}}
@nameProperty={{this.setting.computedNameProperty}}
@options={{hash
castInteger=true
allowAny=this.setting.allowsNone
disabled=@disabled
}}
/>
{{this.preview}}
</template>
}