Aggiunge i18n IT/EN/FR/DE/ES, pagine pubbliche squadre e UX archivio.

Il selettore lingua funziona sul web e sulle app native; su Android la preferenza è persistita e applicata al riavvio. Incluse anche eliminazione replay a scope e campi pagina pubblica squadra.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-07-23 19:30:44 +02:00
co-authored by Cursor
parent 7d5d66840f
commit 1d97271555
71 changed files with 3509 additions and 197 deletions
+42 -3
View File
@@ -1,11 +1,33 @@
module Recordings
class Delete
def initialize(recording, reason: :manual)
SCOPES = %w[both site youtube].freeze
def initialize(recording, reason: :manual, scope: :both)
@recording = recording
@reason = reason
@scope = normalize_scope(scope)
end
def call
case @scope
when "youtube"
delete_youtube_only!
when "site"
delete_site_only!
else
delete_both!
end
@recording
end
private
def normalize_scope(scope)
value = scope.to_s.presence || "both"
SCOPES.include?(value) ? value : "both"
end
def delete_both!
delete_youtube_video
delete_storage_object if @recording.storage_key.present?
cleanup_local_artifacts
@@ -18,10 +40,27 @@ module Recordings
youtube_video_id: nil,
youtube_published_at: nil
)
@recording
end
private
def delete_site_only!
delete_storage_object if @recording.storage_key.present?
cleanup_local_artifacts
@recording.update!(
status: "expired",
deleted_at: Time.current,
storage_key: nil,
thumbnail_storage_key: nil
)
end
def delete_youtube_only!
delete_youtube_video
@recording.update!(
youtube_video_id: nil,
youtube_published_at: nil
)
end
def delete_youtube_video
return if @recording.youtube_video_id.blank?