TASK 18: manual rename modal for finished recordings
RenameRecordingDialog (themed, mirrors GoLiveWindow chrome): pre-fills the auto stem, Enter/OK saves, Esc/Cancel keeps the auto name, strips stray .mp4, rejects invalid filename chars. FinalizeRecordingAsync shows it before UniquePath rename. Naming logic still covered by RecordingFileTests; UI shell is pure. verify.sh gate: 0 warnings, 244/246 (2 known).
This commit is contained in:
@@ -3380,9 +3380,17 @@ public class MainViewModel : ViewModelBase
|
||||
return;
|
||||
}
|
||||
_recordLength = _liveElapsed;
|
||||
var finalName = RecordingFile.BuildFinalName(_recordStartTime, _recordLength) + ".mp4";
|
||||
var autoStem = RecordingFile.BuildFinalName(_recordStartTime, _recordLength);
|
||||
var dir = Path.GetDirectoryName(startPath)!;
|
||||
var finalPath = UniquePath(Path.Combine(dir, finalName));
|
||||
|
||||
// Manual rename modal: give the creator a chance to name the recording;
|
||||
// null = keep the auto name (or the default recorded above).
|
||||
string stem = autoStem;
|
||||
var dialog = new RenameRecordingDialog(autoStem);
|
||||
if (dialog.ShowDialog() == true && !string.IsNullOrEmpty(dialog.ResultFileName))
|
||||
stem = dialog.ResultFileName;
|
||||
|
||||
var finalPath = UniquePath(Path.Combine(dir, stem + ".mp4"));
|
||||
File.Move(startPath, finalPath);
|
||||
AppLog.Write($"Recording saved: {finalPath}");
|
||||
_notifications.Info("Recording saved",
|
||||
|
||||
Reference in New Issue
Block a user