Hi,
I am trying to understand the solved plugin to get a better idea of creating plugins. I had a few questions about code snippets from the solved plugin.
https://github.com/discourse/discourse-solved/blob/master/assets/javascripts/discourse/solved-route-map.js.es6
In the tutorial for developing plugins, there was a path field, why isn’t there one in the solved route-map?
In the plugin.rb file, I couldn’t find the solved plugin version of
add_admin_route 'purple_tentacle.title', 'purple-tentacle'
How does the solved plugin, achieve the solved interface in the user activity? How are the notifications linked to this interface?
Thank you
2 Mi Piace
post "upload" => "backups#upload_backup_chunk"
get "upload_url" => "backups#create_upload_url"
end
end
resources :badges,
only: %i[index new show create update destroy],
constraints: AdminConstraint.new do
collection do
get "/award/:badge_id" => "badges#award"
post "/award/:badge_id" => "badges#mass_award"
get "types" => "badges#badge_types"
post "badge_groupings" => "badges#save_badge_groupings"
post "preview" => "badges#preview"
end
end
resources :groups, only: %i[index], constants: AdminConstraint.new do
collection { get "settings" => "site_settings#index" }
end
As per the above code a common filter path is already available in Discourse core. So we don’t need to add the solved activity filter u/:username/activity/solved again in plugin code.
5 Mi Piace