Skip to content

Commit 9808474

Browse files
committed
add drafts
1 parent a74f2a3 commit 9808474

File tree

5 files changed

+2513
-68
lines changed

5 files changed

+2513
-68
lines changed

components/ContentPlanList.tsx

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ export function ContentPlanList({
5555
const [draftsLoading, setDraftsLoading] = useState(true);
5656
const [publishingId, setPublishingId] = useState<string | null>(null);
5757
const [successMessage, setSuccessMessage] = useState<string | null>(null);
58+
const [lastGenerationUrl, setLastGenerationUrl] = useState<string | null>(
59+
null,
60+
);
5861

5962
// Load drafts on mount
6063
useEffect(() => {
@@ -238,9 +241,14 @@ export function ContentPlanList({
238241
);
239242

240243
// Navigate the new tab to the generation page
244+
const generationUrl = `/admin/generation/${chainData.generationId}`;
241245
if (newTab) {
242-
newTab.location.href = `/admin/generation/${chainData.generationId}`;
246+
newTab.location.href = generationUrl;
243247
}
248+
249+
// Show success message with link
250+
setSuccessMessage("Generated!");
251+
setLastGenerationUrl(generationUrl);
244252
setLoadingUrl(null);
245253
} catch (err) {
246254
// Close the blank tab on error
@@ -329,8 +337,27 @@ export function ContentPlanList({
329337
<div>
330338
{/* Success message */}
331339
{successMessage && (
332-
<div className="mb-4 p-4 bg-green-900/50 border border-green-700 rounded-lg text-green-300">
333-
{successMessage}
340+
<div className="mb-4 p-4 bg-green-900/50 border border-green-700 rounded-lg text-green-300 flex items-center gap-4">
341+
<span>{successMessage}</span>
342+
{lastGenerationUrl && (
343+
<a
344+
href={lastGenerationUrl}
345+
target="_blank"
346+
rel="noopener noreferrer"
347+
className="px-3 py-1 bg-green-600 hover:bg-green-500 text-white rounded transition-colors"
348+
>
349+
Open Generation →
350+
</a>
351+
)}
352+
<button
353+
onClick={() => {
354+
setSuccessMessage(null);
355+
setLastGenerationUrl(null);
356+
}}
357+
className="ml-auto text-green-400 hover:text-green-200"
358+
>
359+
360+
</button>
334361
</div>
335362
)}
336363

data/artists.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,5 +334,29 @@
334334
"title": "Papa Roach",
335335
"slug": "papa-roach",
336336
"description": "Papa Roach are an American rock band known for emotional lyrics, heavy riffs, and a blend of alternative metal, nu metal, and modern rock that defined the 2000s era."
337+
},
338+
{
339+
"id": 57,
340+
"title": "Michael Jackson",
341+
"slug": "michael-jackson",
342+
"description": "Michael Jackson was the King of Pop, known for groundbreaking music, iconic dance moves, and global influence that reshaped pop culture and modern music."
343+
},
344+
{
345+
"id": 58,
346+
"title": "Three Days Grace",
347+
"slug": "three-days-grace",
348+
"description": "Three Days Grace are a Canadian rock band known for dark, emotional lyrics, heavy guitar riffs, and a powerful alternative metal sound."
349+
},
350+
{
351+
"id": 59,
352+
"title": "Gorillaz",
353+
"slug": "gorillaz",
354+
"description": "Gorillaz are a virtual band blending alternative rock, hip hop, and electronic music, known for genre-crossing sound, collaborations, and animated personas."
355+
},
356+
{
357+
"id": 60,
358+
"title": "Cream",
359+
"slug": "cream",
360+
"description": "Cream are a legendary rock supergroup known for virtuosic musicianship, blues-rock foundations, and pioneering the power trio format."
337361
}
338362
]

data/content-plan-cleaned.json

Lines changed: 16 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@
5656
"songsterrUrl": "https://www.songsterr.com/a/wsa/nirvana-smells-like-teen-spirit-tab-s269t3",
5757
"trackIndex": 3
5858
},
59-
{
60-
"artist": "Foo Fighters",
61-
"song": "Everlong",
62-
"instrument": "Distortion Guitar",
63-
"part": "Lead Guitar",
64-
"songsterrUrl": "https://www.songsterr.com/a/wsa/foo-fighters-everlong-tab-s86505",
65-
"trackIndex": 0
66-
},
6759
{
6860
"artist": "Foo Fighters",
6961
"song": "Everlong",
@@ -88,14 +80,6 @@
8880
"songsterrUrl": "https://www.songsterr.com/a/wsa/foo-fighters-everlong-tab-s86505t3",
8981
"trackIndex": 3
9082
},
91-
{
92-
"artist": "Pink Floyd",
93-
"song": "Wish You Were Here",
94-
"instrument": "Acoustic Guitar (steel)",
95-
"part": "Lead Guitar",
96-
"songsterrUrl": "https://www.songsterr.com/a/wsa/pink-floyd-wish-you-were-here-tab-s153",
97-
"trackIndex": 0
98-
},
9983
{
10084
"artist": "Pink Floyd",
10185
"song": "Wish You Were Here",
@@ -120,14 +104,6 @@
120104
"songsterrUrl": "https://www.songsterr.com/a/wsa/pink-floyd-wish-you-were-here-tab-s153t3",
121105
"trackIndex": 3
122106
},
123-
{
124-
"artist": "Michael Jackson",
125-
"song": "Beat It",
126-
"instrument": "Distortion Guitar",
127-
"part": "Guitar Solo",
128-
"songsterrUrl": "https://www.songsterr.com/a/wsa/michael-jackson-beat-it-tab-s10259",
129-
"trackIndex": 0
130-
},
131107
{
132108
"artist": "Michael Jackson",
133109
"song": "Beat It",
@@ -360,14 +336,6 @@
360336
"songsterrUrl": "https://www.songsterr.com/a/wsa/system-of-a-down-aerials-tab-s3709t1",
361337
"trackIndex": 1
362338
},
363-
{
364-
"artist": "The Eagles",
365-
"song": "Hotel California Solo",
366-
"instrument": "Distortion Guitar",
367-
"part": "Guitar Solo",
368-
"songsterrUrl": "https://www.songsterr.com/a/wsa/the-eagles-hotel-california-solo-tab-s438376",
369-
"trackIndex": 0
370-
},
371339
{
372340
"artist": "The Eagles",
373341
"song": "Hotel California Solo",
@@ -400,14 +368,6 @@
400368
"songsterrUrl": "https://www.songsterr.com/a/wsa/the-eagles-hotel-california-solo-tab-s438376t4",
401369
"trackIndex": 4
402370
},
403-
{
404-
"artist": "Gorillaz",
405-
"song": "Feel Good Inc.",
406-
"instrument": "Acoustic Guitar (steel)",
407-
"part": "Acoustic Guitar #1",
408-
"songsterrUrl": "https://www.songsterr.com/a/wsa/gorillaz-feel-good-inc-tab-s549",
409-
"trackIndex": 0
410-
},
411371
{
412372
"artist": "Gorillaz",
413373
"song": "Feel Good Inc.",
@@ -648,14 +608,6 @@
648608
"songsterrUrl": "https://www.songsterr.com/a/wsa/nirvana-in-bloom-tab-s295t1",
649609
"trackIndex": 1
650610
},
651-
{
652-
"artist": "Eric Clapton",
653-
"song": "Tears In Heaven",
654-
"instrument": "Acoustic Guitar (nylon)",
655-
"part": "Extra Lead Nylon Guitar-Eric Clapton",
656-
"songsterrUrl": "https://www.songsterr.com/a/wsa/eric-clapton-tears-in-heaven-tab-s4",
657-
"trackIndex": 0
658-
},
659611
{
660612
"artist": "Eric Clapton",
661613
"song": "Tears In Heaven",
@@ -760,14 +712,6 @@
760712
"songsterrUrl": "https://www.songsterr.com/a/wsa/papa-roach-last-resort-tab-s264t1",
761713
"trackIndex": 1
762714
},
763-
{
764-
"artist": "Three Days Grace",
765-
"song": "Animal I Have Become",
766-
"instrument": "Distortion Guitar",
767-
"part": "Lead Guitar",
768-
"songsterrUrl": "https://www.songsterr.com/a/wsa/three-days-grace-animal-i-have-become-tab-s466",
769-
"trackIndex": 0
770-
},
771715
{
772716
"artist": "Three Days Grace",
773717
"song": "Animal I Have Become",
@@ -816,14 +760,6 @@
816760
"songsterrUrl": "https://www.songsterr.com/a/wsa/arctic-monkeys-r-u-mine-tab-s90203t3",
817761
"trackIndex": 3
818762
},
819-
{
820-
"artist": "Cream",
821-
"song": "Sunshine Of Your Love",
822-
"instrument": "Overdriven Guitar",
823-
"part": "Eric Clapton",
824-
"songsterrUrl": "https://www.songsterr.com/a/wsa/cream-sunshine-of-your-love-tab-s256",
825-
"trackIndex": 0
826-
},
827763
{
828764
"artist": "Cream",
829765
"song": "Sunshine Of Your Love",
@@ -904,6 +840,14 @@
904840
"songsterrUrl": "https://www.songsterr.com/a/wsa/system-of-a-down-lonely-day-tab-s443t3",
905841
"trackIndex": 3
906842
},
843+
{
844+
"artist": "Pink Floyd",
845+
"song": "Wish You Were Here",
846+
"instrument": "Acoustic Guitar (steel)",
847+
"part": "Lead Guitar",
848+
"songsterrUrl": "https://www.songsterr.com/a/wsa/pink-floyd-wish-you-were-here-tab-s153",
849+
"trackIndex": 0
850+
},
907851
{
908852
"artist": "System of a Down",
909853
"song": "Lonely Day",
@@ -2472,6 +2416,14 @@
24722416
"songsterrUrl": "https://www.songsterr.com/a/wsa/the-killers-mr-brightside-tab-s601",
24732417
"trackIndex": 0
24742418
},
2419+
{
2420+
"artist": "Foo Fighters",
2421+
"song": "Everlong",
2422+
"instrument": "Distortion Guitar",
2423+
"part": "Lead Guitar",
2424+
"songsterrUrl": "https://www.songsterr.com/a/wsa/foo-fighters-everlong-tab-s86505",
2425+
"trackIndex": 0
2426+
},
24752427
{
24762428
"artist": "The Killers",
24772429
"song": "Mr. Brightside",

0 commit comments

Comments
 (0)