mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 03:21:12 +08:00
FEATURE: Admin plugin list redesign (#24363)
* Remove checkmark for official plugins * Add author for plugin, which is By Discourse for all discourse and discourse-org github plugins * Link to meta topic instead of github repo * Add experimental flag for plugin metadata and show this as a badge on the plugin list if present --------- Co-authored-by: chapoi <101828855+chapoi@users.noreply.github.com>
This commit is contained in:
@ -11,9 +11,12 @@ class AdminPluginSerializer < ApplicationSerializer
|
||||
:enabled_setting,
|
||||
:has_settings,
|
||||
:is_official,
|
||||
:is_experimental,
|
||||
:is_discourse_owned,
|
||||
:commit_hash,
|
||||
:commit_url,
|
||||
:meta_url
|
||||
:meta_url,
|
||||
:authors
|
||||
|
||||
def id
|
||||
object.directory_name
|
||||
@ -35,6 +38,10 @@ class AdminPluginSerializer < ApplicationSerializer
|
||||
object.metadata.url
|
||||
end
|
||||
|
||||
def authors
|
||||
object.metadata.authors
|
||||
end
|
||||
|
||||
def enabled
|
||||
object.enabled?
|
||||
end
|
||||
@ -72,6 +79,14 @@ class AdminPluginSerializer < ApplicationSerializer
|
||||
Plugin::Metadata::OFFICIAL_PLUGINS.include?(object.name)
|
||||
end
|
||||
|
||||
def is_experimental
|
||||
object.metadata.experimental
|
||||
end
|
||||
|
||||
def is_discourse_owned
|
||||
object.discourse_owned?
|
||||
end
|
||||
|
||||
def commit_hash
|
||||
object.commit_hash
|
||||
end
|
||||
|
Reference in New Issue
Block a user