feat(04-03-partial): ExercisePicker and WorkoutEditPage components - swap/add/remove exercises with sets/reps editing

This commit is contained in:
2026-03-01 15:36:47 +01:00
parent e923a17707
commit 81e0caab42
7 changed files with 446 additions and 5 deletions
+81
View File
@@ -0,0 +1,81 @@
#!/usr/bin/env node
const fs = require('fs');
const path = require('path');
require('dotenv').config();
console.log('🎬 Gravl Multimedia Asset Generator\n');
// Config
const apiKey = process.env.VEO_API_KEY;
const googleCreds = process.env.GOOGLE_APPLICATION_CREDENTIALS;
const outputDir = process.env.NANO_BANANA_OUTPUT_DIR || './marketing/images';
const videoDir = process.env.VEO_OUTPUT_DIR || './marketing/videos';
// Ensure directories exist
[outputDir, videoDir].forEach(dir => {
if (!fs.existsSync(dir)) {
fs.mkdirSync(dir, { recursive: true });
}
});
console.log('📁 Output directories:');
console.log(` Images: ${outputDir}`);
console.log(` Videos: ${videoDir}\n`);
// Image templates for Gravl
const imagePrompts = [
{
name: 'login-page.png',
prompt: 'Gravl fitness app login page with barbell logo, email/password inputs, dark theme #0a0a0f, orange accent #ff6b35, gradient background, 1280x720'
},
{
name: 'dashboard.png',
prompt: 'Gravl dashboard: stat cards showing workouts completed, total volume, streak, calendar view, animated elements, dark modern design, 1280x720'
},
{
name: 'workout-page.png',
prompt: 'Gravl workout page: exercise cards with sets/reps input, rest timer showing 90 seconds, complete button, smooth animations, dark theme, 1280x720'
}
];
// Video templates
const videoPrompts = [
{
name: 'workout-demo.mp4',
prompt: 'Gravl fitness app demo: user opens app, selects a workout, clicks on exercise, logs 3 sets of 10 reps at 80kg, rests with 90-second countdown timer, completes workout',
duration: 10
}
];
console.log('📝 Image generation requests (mock for demo):\n');
imagePrompts.forEach(img => {
console.log(`${img.name}`);
// In real usage, this would call nano-banana-pro API
// For now, create placeholder files
const filePath = path.join(outputDir, img.name);
fs.writeFileSync(filePath, `Placeholder: ${img.prompt}`);
console.log(` → Created (placeholder): ${filePath}`);
});
console.log('\n🎥 Video generation requests (mock for demo):\n');
videoPrompts.forEach(vid => {
console.log(`${vid.name} (${vid.duration}s)`);
// In real usage, this would call Veo API
const filePath = path.join(videoDir, vid.name);
fs.writeFileSync(filePath, `Placeholder: ${vid.prompt}`);
console.log(` → Created (placeholder): ${filePath}`);
});
console.log('\n✨ Generation complete!\n');
console.log('📌 Next steps:');
console.log(' 1. Set VEO_API_KEY and GOOGLE_APPLICATION_CREDENTIALS in .env');
console.log(' 2. Replace placeholder calls with actual API requests');
console.log(' 3. Run: npm install dotenv');
console.log(` 4. Run: node scripts/generate-assets.js\n`);
console.log('📂 Generated files:');
[outputDir, videoDir].forEach(dir => {
const files = fs.readdirSync(dir);
files.forEach(f => console.log(` ${path.join(dir, f)}`));
});