mirror of
https://github.com/discourse/discourse.git
synced 2025-06-05 14:07:30 +08:00
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:
@ -29,6 +29,12 @@
|
|||||||
{{else}}
|
{{else}}
|
||||||
{{plugin.name}}
|
{{plugin.name}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
{{#if plugin.is_official}}
|
||||||
|
{{d-icon "check-circle"
|
||||||
|
title="admin.plugins.official"
|
||||||
|
class="admin-plugins-official-badge"}}
|
||||||
|
{{/if}}
|
||||||
</td>
|
</td>
|
||||||
<td>{{plugin.version}}</td>
|
<td>{{plugin.version}}</td>
|
||||||
<td class="col-enabled">
|
<td class="col-enabled">
|
||||||
@ -58,4 +64,3 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
<p><a href="https://meta.discourse.org/t/install-a-plugin/19157">{{i18n "admin.plugins.howto"}}</a></p>
|
<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;
|
width: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.admin-plugins-official-badge {
|
||||||
|
color: $success;
|
||||||
|
}
|
||||||
|
|
||||||
// Backups
|
// Backups
|
||||||
// --------------------------------------------------
|
// --------------------------------------------------
|
||||||
|
|
||||||
|
@ -5,7 +5,8 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||||||
:url,
|
:url,
|
||||||
:admin_route,
|
:admin_route,
|
||||||
:enabled,
|
:enabled,
|
||||||
:enabled_setting
|
:enabled_setting,
|
||||||
|
:is_official
|
||||||
|
|
||||||
def id
|
def id
|
||||||
object.metadata.name
|
object.metadata.name
|
||||||
@ -51,4 +52,8 @@ class AdminPluginSerializer < ApplicationSerializer
|
|||||||
def include_admin_route?
|
def include_admin_route?
|
||||||
admin_route.present?
|
admin_route.present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def is_official
|
||||||
|
Plugin::Metadata::OFFICIAL_PLUGINS.include?(object.name)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
@ -2981,6 +2981,7 @@ en:
|
|||||||
change_settings: "Change Settings"
|
change_settings: "Change Settings"
|
||||||
change_settings_short: "Settings"
|
change_settings_short: "Settings"
|
||||||
howto: "How do I install plugins?"
|
howto: "How do I install plugins?"
|
||||||
|
official: "Offical Plugin"
|
||||||
|
|
||||||
backups:
|
backups:
|
||||||
title: "Backups"
|
title: "Backups"
|
||||||
|
@ -33,7 +33,9 @@ class Plugin::Metadata
|
|||||||
"discourse-translator",
|
"discourse-translator",
|
||||||
"discourse-patreon",
|
"discourse-patreon",
|
||||||
"discourse-prometheus",
|
"discourse-prometheus",
|
||||||
"discourse-assign"
|
"discourse-assign",
|
||||||
|
"discourse-narrative-bot",
|
||||||
|
"discourse-presence"
|
||||||
])
|
])
|
||||||
|
|
||||||
FIELDS ||= [:name, :about, :version, :authors, :url, :required_version]
|
FIELDS ||= [:name, :about, :version, :authors, :url, :required_version]
|
||||||
|
Reference in New Issue
Block a user