discourse/app/assets/javascripts/admin/addon/components/admin-config-area-sidebar-experiment.hbs
Martin Brennan d50fccfcaf
DEV: Do not auto-generate plugin routes for admin experimental sidebar (#24211)
Followup to b53449eac9, we cannot
generate the links to plugin admin pages in this way because it
depends on which plugins are installed; we would need to somehow
do it at runtime. Leaving it out for now, for people who need to
find these admin routes the Ember Inspector extension for Chrome
can be used in the meantime.
2023-11-02 12:13:20 +10:00

36 lines
1.0 KiB
Handlebars

<div
class="admin-config-area-sidebar-experiment"
{{did-insert this.loadDefaultNavConfig}}
>
<h4>Sidebar Experiment</h4>
<p>Changes you make here will be applied to the admin sidebar and persist
between reloads
<em>on this device only</em>. Note that in addition to the
<code>text</code>
and
<code>route</code>
options, you can also specify a
<code>icon</code>
or a
<code>href</code>, if you want to link to a specific page but don't know the
Ember route. You can also use the Ember Inspector extension to find route
names, for example for plugin routes which are not auto-generated here.</p>
<DButton
@action={{this.resetToDefault}}
@translatedLabel="Reset to Default"
/>
<DButton
class="btn-primary"
@action={{this.applyConfig}}
@translatedLabel="Apply Config"
/>
<div class="admin-config-area-sidebar-experiment__editor">
<AceEditor
@content={{this.editedNavConfig}}
@editorId="admin-config-area-sidebar-experiment"
@save={{this.applyNav}}
/>
</div>
</div>