@tpitre/story-ui 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -502,7 +502,7 @@ const SourceCodePanel: React.FC<{ active?: boolean }> = ({ active }) => {
|
|
|
502
502
|
const handleDelete = useCallback(async () => {
|
|
503
503
|
if (!currentStoryId || !isGeneratedStory || isDeleting) return;
|
|
504
504
|
|
|
505
|
-
const confirmed = window.confirm('Delete this
|
|
505
|
+
const confirmed = window.confirm('Delete this story file and ALL its variants? This cannot be undone.');
|
|
506
506
|
if (!confirmed) return;
|
|
507
507
|
|
|
508
508
|
setIsDeleting(true);
|
|
@@ -757,7 +757,25 @@ const SourceCodePanel: React.FC<{ active?: boolean }> = ({ active }) => {
|
|
|
757
757
|
return (
|
|
758
758
|
<div style={styles.container}>
|
|
759
759
|
<div style={styles.header}>
|
|
760
|
-
<
|
|
760
|
+
<div style={{ display: 'flex', alignItems: 'center', gap: '12px' }}>
|
|
761
|
+
<span style={styles.title}>Source Code</span>
|
|
762
|
+
</div>
|
|
763
|
+
{isGeneratedStory && (
|
|
764
|
+
<button
|
|
765
|
+
style={{
|
|
766
|
+
...styles.deleteButton,
|
|
767
|
+
...(isDeleting ? styles.deleteButtonDeleting : {}),
|
|
768
|
+
...(deleteHover && !isDeleting ? styles.deleteButtonHover : {}),
|
|
769
|
+
}}
|
|
770
|
+
onClick={handleDelete}
|
|
771
|
+
onMouseEnter={() => setDeleteHover(true)}
|
|
772
|
+
onMouseLeave={() => setDeleteHover(false)}
|
|
773
|
+
disabled={isDeleting}
|
|
774
|
+
title="Delete this story file and all its variants"
|
|
775
|
+
>
|
|
776
|
+
{isDeleting ? 'Deleting...' : 'Delete Story'}
|
|
777
|
+
</button>
|
|
778
|
+
)}
|
|
761
779
|
</div>
|
|
762
780
|
<div style={styles.emptyState}>
|
|
763
781
|
<span>No source code available for this story</span>
|
|
@@ -816,9 +834,9 @@ const SourceCodePanel: React.FC<{ active?: boolean }> = ({ active }) => {
|
|
|
816
834
|
onMouseEnter={() => setDeleteHover(true)}
|
|
817
835
|
onMouseLeave={() => setDeleteHover(false)}
|
|
818
836
|
disabled={isDeleting}
|
|
819
|
-
title="Delete this
|
|
837
|
+
title="Delete this story file and all its variants"
|
|
820
838
|
>
|
|
821
|
-
{isDeleting ? 'Deleting...' : 'Delete'}
|
|
839
|
+
{isDeleting ? 'Deleting...' : 'Delete Story'}
|
|
822
840
|
</button>
|
|
823
841
|
)}
|
|
824
842
|
</div>
|