2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.model.length}}
|
2015-02-07 06:32:59 +08:00
|
|
|
<h3>{{i18n "admin.plugins.installed"}}</h3>
|
|
|
|
|
2018-07-03 11:14:53 +08:00
|
|
|
<table class="admin-plugins grid">
|
2015-05-14 00:13:25 +08:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2018-04-06 12:44:31 +08:00
|
|
|
<th></th>
|
2015-05-14 00:13:25 +08:00
|
|
|
<th>{{i18n "admin.plugins.name"}}</th>
|
|
|
|
<th>{{i18n "admin.plugins.version"}}</th>
|
2015-07-03 00:45:17 +08:00
|
|
|
<th>{{i18n "admin.plugins.enabled"}}</th>
|
|
|
|
<th></th>
|
2015-05-14 00:13:25 +08:00
|
|
|
</tr>
|
|
|
|
</thead>
|
2015-02-07 06:32:59 +08:00
|
|
|
<tbody>
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#each this.model as |plugin|}}
|
2022-11-11 19:43:20 +08:00
|
|
|
<tr data-plugin-name={{plugin.name}}>
|
2015-02-07 06:32:59 +08:00
|
|
|
<td>
|
2023-08-28 08:48:59 +08:00
|
|
|
{{#if plugin.isOfficial}}
|
2018-04-06 10:54:58 +08:00
|
|
|
{{d-icon
|
|
|
|
"check-circle"
|
|
|
|
title="admin.plugins.official"
|
|
|
|
class="admin-plugins-official-badge"
|
|
|
|
}}
|
|
|
|
{{/if}}
|
2015-02-07 06:32:59 +08:00
|
|
|
</td>
|
2018-04-06 12:44:31 +08:00
|
|
|
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="plugin-name">
|
2021-02-13 00:19:07 +08:00
|
|
|
<div class="name">
|
|
|
|
{{#if plugin.url}}
|
|
|
|
<a
|
|
|
|
href={{plugin.url}}
|
|
|
|
rel="noopener noreferrer"
|
|
|
|
target="_blank"
|
2023-08-03 22:19:33 +08:00
|
|
|
>{{plugin.name}} {{d-icon "external-link-alt"}}</a>
|
2021-02-13 00:19:07 +08:00
|
|
|
{{else}}
|
|
|
|
{{plugin.name}}
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="about">
|
|
|
|
{{plugin.about}}
|
|
|
|
</div>
|
2018-04-06 12:44:31 +08:00
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="version">
|
|
|
|
<div class="label">{{i18n "admin.plugins.version"}}</div>
|
2023-06-26 12:39:57 +08:00
|
|
|
{{plugin.version}}<br />
|
|
|
|
<PluginCommitHash @plugin={{plugin}} />
|
2018-07-03 11:14:53 +08:00
|
|
|
</td>
|
2015-07-03 00:45:17 +08:00
|
|
|
<td class="col-enabled">
|
2018-07-03 11:14:53 +08:00
|
|
|
<div class="label">{{i18n "admin.plugins.enabled"}}</div>
|
2023-08-28 08:48:59 +08:00
|
|
|
{{#if plugin.enabledSetting}}
|
2023-08-03 22:19:33 +08:00
|
|
|
<DToggleSwitch
|
|
|
|
@state={{plugin.enabled}}
|
|
|
|
{{on "click" (fn this.togglePluginEnabled plugin)}}
|
|
|
|
/>
|
2015-07-03 00:45:17 +08:00
|
|
|
{{else}}
|
2023-08-03 22:19:33 +08:00
|
|
|
<DToggleSwitch @state={{plugin.enabled}} disabled={{true}} />
|
2015-07-03 00:45:17 +08:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
2018-07-03 11:14:53 +08:00
|
|
|
<td class="settings">
|
2022-07-06 01:41:31 +08:00
|
|
|
{{#if this.currentUser.admin}}
|
2023-08-28 08:48:59 +08:00
|
|
|
{{#if plugin.hasSettings}}
|
|
|
|
<LinkTo
|
|
|
|
class="btn-default btn btn-icon-text"
|
|
|
|
@route="adminSiteSettingsCategory"
|
|
|
|
@model={{plugin.settingCategoryName}}
|
|
|
|
@query={{hash filter=(concat "plugin:" plugin.name)}}
|
|
|
|
data-plugin-setting-button={{plugin.name}}
|
|
|
|
>
|
|
|
|
{{d-icon "cog"}}
|
|
|
|
{{i18n "admin.plugins.change_settings_short"}}
|
|
|
|
</LinkTo>
|
2015-09-28 22:23:41 +08:00
|
|
|
{{/if}}
|
2015-07-03 00:45:17 +08:00
|
|
|
{{/if}}
|
|
|
|
</td>
|
2015-02-07 06:32:59 +08:00
|
|
|
</tr>
|
|
|
|
{{/each}}
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
{{else}}
|
|
|
|
<p>{{i18n "admin.plugins.none_installed"}}</p>
|
|
|
|
{{/if}}
|
2015-02-07 07:08:57 +08:00
|
|
|
|
2018-06-06 05:47:30 +08:00
|
|
|
<p class="admin-plugins-howto"><a
|
|
|
|
href="https://meta.discourse.org/t/install-a-plugin/19157"
|
|
|
|
>{{i18n "admin.plugins.howto"}}</a></p>
|
|
|
|
|
2023-01-31 19:33:26 +08:00
|
|
|
<span>
|
|
|
|
<PluginOutlet
|
|
|
|
@name="admin-below-plugins-index"
|
|
|
|
@connectorTagName="div"
|
2023-01-31 20:58:31 +08:00
|
|
|
@outletArgs={{hash model=this.model}}
|
2023-01-31 19:33:26 +08:00
|
|
|
/>
|
|
|
|
</span>
|