2026-01-07 09:31:02 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Card } from '../../ui/card';
|
|
|
|
|
import { Button } from '../../ui/button';
|
|
|
|
|
import { Download, FileText, Shield } from 'lucide-react';
|
|
|
|
|
import { DataExportModal } from './DataExportModal';
|
|
|
|
|
|
|
|
|
|
export const DataExportView: React.FC = () => {
|
|
|
|
|
const [showModal, setShowModal] = useState(false);
|
2026-01-13 18:47:57 +00:00
|
|
|
|
2026-01-07 09:31:02 +00:00
|
|
|
// Mock History
|
|
|
|
|
const [exports] = useState([
|
2026-01-13 18:47:57 +00:00
|
|
|
{
|
|
|
|
|
id: 'e1',
|
|
|
|
|
date: 'Oct 10, 2023',
|
|
|
|
|
type: 'Full Archive (JSON)',
|
|
|
|
|
status: 'ready',
|
|
|
|
|
size: '45 MB',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
id: 'e2',
|
|
|
|
|
date: 'Jan 15, 2023',
|
|
|
|
|
type: 'Profile Only (CSV)',
|
|
|
|
|
status: 'expired',
|
|
|
|
|
size: '2 MB',
|
|
|
|
|
},
|
2026-01-07 09:31:02 +00:00
|
|
|
]);
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="max-w-4xl mx-auto space-y-8 animate-fadeIn pb-20">
|
2026-01-13 18:47:57 +00:00
|
|
|
<div>
|
|
|
|
|
<h2 className="text-2xl font-bold text-white mb-2">YOUR DATA</h2>
|
2026-01-16 00:56:27 +00:00
|
|
|
<p className="text-kodo-content-dim font-mono text-sm">
|
2026-01-13 18:47:57 +00:00
|
|
|
Manage, export, and control your personal information.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<Card variant="default">
|
|
|
|
|
<div className="flex items-start gap-4 mb-6">
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<div className="p-4 bg-kodo-steel/10 rounded-full text-kodo-steel">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Shield className="w-6 h-6" />
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<h3 className="font-bold text-white text-lg">
|
|
|
|
|
Request Data Archive
|
|
|
|
|
</h3>
|
2026-01-16 00:56:27 +00:00
|
|
|
<p className="text-kodo-content-dim text-sm mt-1 max-w-xl">
|
2026-01-13 18:47:57 +00:00
|
|
|
You can request a download of all the data Veza has associated
|
|
|
|
|
with your account. This includes your profile, uploaded content
|
|
|
|
|
metadata, comments, and purchase history.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<Button
|
|
|
|
|
variant="primary"
|
|
|
|
|
icon={<Download className="w-4 h-4" />}
|
|
|
|
|
onClick={() => setShowModal(true)}
|
|
|
|
|
>
|
|
|
|
|
Start New Export
|
|
|
|
|
</Button>
|
|
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<Card variant="default">
|
|
|
|
|
<h3 className="font-bold text-white mb-4">Export History</h3>
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<div className="space-y-4">
|
2026-01-13 18:47:57 +00:00
|
|
|
{exports.map((item) => (
|
|
|
|
|
<div
|
|
|
|
|
key={item.id}
|
|
|
|
|
className="flex flex-col md:flex-row items-center justify-between p-4 bg-kodo-ink rounded-lg border border-kodo-steel"
|
|
|
|
|
>
|
|
|
|
|
<div className="flex items-center gap-4 mb-2 md:mb-0 w-full md:w-auto">
|
2026-01-16 00:56:27 +00:00
|
|
|
<FileText className="w-5 h-5 text-kodo-content-dim" />
|
2026-01-07 09:31:02 +00:00
|
|
|
<div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="text-white font-bold text-sm">
|
|
|
|
|
{item.type}
|
|
|
|
|
</div>
|
2026-01-16 00:56:27 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim flex gap-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
<span>{item.date}</span>
|
|
|
|
|
<span>•</span>
|
|
|
|
|
<span>{item.size}</span>
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{item.status === 'ready' ? (
|
|
|
|
|
<Button
|
|
|
|
|
variant="secondary"
|
|
|
|
|
size="sm"
|
|
|
|
|
icon={<Download className="w-4 h-4" />}
|
|
|
|
|
>
|
|
|
|
|
Download
|
|
|
|
|
</Button>
|
|
|
|
|
) : (
|
aesthetic-improvements: align spacing to 8px grid (Action 11.2.1.3)
- Created automated script (scripts/align-8px-grid.py) to align all spacing to 8px grid
- Replaced non-8px-aligned spacing: gap-3/p-3/m-3 (12px) → gap-4/p-4/m-4 (16px), gap-5/p-5/m-5 (20px) → gap-6/p-6/m-6 (24px), gap-10/p-10/m-10 (40px) → gap-12/p-12/m-12 (48px), gap-20/p-20/m-20 (80px) → gap-24/p-24/m-24 (96px)
- Preserved: 4px values (gap-1, p-1, m-1) as they may be intentional fine-tuning, responsive breakpoints (sm:, md:, lg:), test files, documentation
- Modified files across all components to ensure consistent 8px grid alignment
- Action 11.2.1.3: Align all elements to 8px grid - COMPLETE
2026-01-16 10:50:46 +00:00
|
|
|
<span className="text-xs text-kodo-content-dim bg-kodo-graphite px-4 py-1 rounded">
|
2026-01-13 18:47:57 +00:00
|
|
|
Expired
|
|
|
|
|
</span>
|
|
|
|
|
)}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
))}
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{showModal && (
|
|
|
|
|
<DataExportModal
|
|
|
|
|
onClose={() => setShowModal(false)}
|
|
|
|
|
onRequest={() => {}}
|
|
|
|
|
/>
|
|
|
|
|
)}
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|