UX: Add an icon to indicate if a plugin is official.
https://meta.discourse.org/t/improving-admin-plugins/84585
This commit is contained in:
parent
eb755dd2a7
commit
2ddcdf8704
|
@ -29,6 +29,12 @@
|
|||
{{else}}
|
||||
{{plugin.name}}
|
||||
{{/if}}
|
||||
|
||||
{{#if plugin.is_official}}
|
||||
{{d-icon "check-circle"
|
||||
title="admin.plugins.official"
|
||||
class="admin-plugins-official-badge"}}
|
||||
{{/if}}
|
||||
</td>
|
||||
<td>{{plugin.version}}</td>
|
||||
<td class="col-enabled">
|
||||
|
@ -58,4 +64,3 @@
|
|||
{{/if}}
|
||||
|
||||
<p><a href="https://meta.discourse.org/t/install-a-plugin/19157">{{i18n "admin.plugins.howto"}}</a></p>
|
||||
|
||||
|
|
|
@ -1327,6 +1327,10 @@ table.api-keys {
|
|||
width: 20px;
|
||||
}
|
||||
|
||||
.admin-plugins-official-badge {
|
||||
color: $success;
|
||||
}
|
||||
|
||||
// Backups
|
||||
// --------------------------------------------------
|
||||
|
||||
|
|
|
@ -5,7 +5,8 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||
:url,
|
||||
:admin_route,
|
||||
:enabled,
|
||||
:enabled_setting
|
||||
:enabled_setting,
|
||||
:is_official
|
||||
|
||||
def id
|
||||
object.metadata.name
|
||||
|
@ -51,4 +52,8 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||
def include_admin_route?
|
||||
admin_route.present?
|
||||
end
|
||||
|
||||
def is_official
|
||||
Plugin::Metadata::OFFICIAL_PLUGINS.include?(object.name)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -2981,6 +2981,7 @@ en:
|
|||
change_settings: "Change Settings"
|
||||
change_settings_short: "Settings"
|
||||
howto: "How do I install plugins?"
|
||||
official: "Offical Plugin"
|
||||
|
||||
backups:
|
||||
title: "Backups"
|
||||
|
|
|
@ -33,7 +33,9 @@ class Plugin::Metadata
|
|||
"discourse-translator",
|
||||
"discourse-patreon",
|
||||
"discourse-prometheus",
|
||||
"discourse-assign"
|
||||
"discourse-assign",
|
||||
"discourse-narrative-bot",
|
||||
"discourse-presence"
|
||||
])
|
||||
|
||||
FIELDS ||= [:name, :about, :version, :authors, :url, :required_version]
|
||||
|
|
Loading…
Reference in New Issue