mirror of
https://github.com/discourse/discourse.git
synced 2024-12-14 12:43:41 +08:00
782f43cc55
Previously if a specific plugin route was not available (e.g. there was an error loading the plugin's JS due to an ad blocker), the entire page would fail to load. This commit updates the behavior to catch this kind of issue and display a user-friendly message at the top of the screen.
30 lines
875 B
Handlebars
30 lines
875 B
Handlebars
<div class="admin-controls">
|
|
<div class="controls">
|
|
<DButton @action={{action "toggleMenu"}} @class="menu-toggle" @icon="bars" />
|
|
|
|
{{#if this.currentUser.admin}}
|
|
<DButton @label="admin.plugins.change_settings" @icon="cog" @class="btn-default settings-button" @action={{route-action "showSettings"}} />
|
|
{{/if}}
|
|
</div>
|
|
</div>
|
|
|
|
<div class="admin-nav pull-left">
|
|
<ul class="nav nav-stacked">
|
|
<NavItem @route="adminPlugins.index" @label="admin.plugins.title" />
|
|
|
|
{{#each this.adminRoutes as |route|}}
|
|
<NavItem @route={{route.full_location}} @label={{route.label}} />
|
|
{{/each}}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="admin-detail pull-left mobile-closed">
|
|
{{#each this.brokenAdminRoutes as |route|}}
|
|
<div class="alert alert-error">
|
|
{{i18n "admin.plugins.broken_route" name=(i18n route.label)}}
|
|
</div>
|
|
{{/each}}
|
|
|
|
{{outlet}}
|
|
</div>
|