discourse/app/assets/javascripts/admin/addon/components/site-settings/string.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

29 lines
775 B
Text
Vendored

/* eslint-disable ember/no-classic-components */
import Component, { Input, Textarea } from "@ember/component";
import TextField from "discourse/components/text-field";
export default class String extends Component {
<template>
{{#if this.setting.textarea}}
<Textarea
@value={{this.value}}
class="input-setting-textarea"
@disabled={{@disabled}}
/>
{{else if this.isSecret}}
<Input
@type="password"
@value={{this.value}}
class="input-setting-string"
autocomplete="new-password"
@disabled={{@disabled}}
/>
{{else}}
<TextField
@value={{this.value}}
@classNames="input-setting-string"
@disabled={{@disabled}}
/>
{{/if}}
</template>
}