mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 04:01:18 +08:00
FEATURE: Show diff of local changes before updating remote theme (#7443)
This commit is contained in:
@ -250,6 +250,15 @@ class Admin::ThemesController < Admin::AdminController
|
||||
exporter.cleanup!
|
||||
end
|
||||
|
||||
def diff_local_changes
|
||||
theme = Theme.find_by(id: params[:id])
|
||||
raise Discourse::InvalidParameters.new(:id) unless theme
|
||||
changes = theme.remote_theme&.diff_local_changes
|
||||
respond_to do |format|
|
||||
format.json { render json: changes || {} }
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def update_default_theme
|
||||
|
Reference in New Issue
Block a user