mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
FIX: Further improvements for plugin list (#24622)
Followup e37fb3042d
* Automatically remove the prefix `Discourse ` from all the plugin titles to avoid repetition
* Remove the :discourse_dev: icon from the author. Consider a "By Discourse" with no labels as official
* We add a `label` metadata to plugin.rb
* Only plugins made by us in `discourse` and `discourse-org` GitHub organizations will show these in the list
* Make the plugin author font size a little smaller
* Make the commit sha look like a link so it's more obvious it goes to the code
Also I added some validation and truncation for plugin metadata
parsing since currently you can put absolutely anything in there
and it will show on the plugin list.
This commit is contained in:
@@ -11,8 +11,8 @@ class AdminPluginSerializer < ApplicationSerializer
|
||||
:enabled_setting,
|
||||
:has_settings,
|
||||
:is_official,
|
||||
:is_experimental,
|
||||
:is_discourse_owned,
|
||||
:label,
|
||||
:commit_hash,
|
||||
:commit_url,
|
||||
:meta_url,
|
||||
@@ -79,8 +79,13 @@ class AdminPluginSerializer < ApplicationSerializer
|
||||
Plugin::Metadata::OFFICIAL_PLUGINS.include?(object.name)
|
||||
end
|
||||
|
||||
def is_experimental
|
||||
object.metadata.experimental
|
||||
def include_label?
|
||||
is_discourse_owned
|
||||
end
|
||||
|
||||
def label
|
||||
return if !is_discourse_owned
|
||||
object.metadata.label
|
||||
end
|
||||
|
||||
def is_discourse_owned
|
||||
|
||||
Reference in New Issue
Block a user