2026-01-07 09:31:02 +00:00
|
|
|
import React, { useState } from 'react';
|
|
|
|
|
import { Card } from '../ui/card';
|
|
|
|
|
import { Button } from '../ui/button';
|
|
|
|
|
import { ProgressBar } from '../ui/progress';
|
|
|
|
|
import { HardDrive, Trash2, Clock, MapPin, AlertCircle } from 'lucide-react';
|
2026-01-26 13:12:17 +00:00
|
|
|
import { useToast } from '../../components/feedback/ToastProvider';
|
2026-01-07 09:31:02 +00:00
|
|
|
|
|
|
|
|
export const CloudSettingsView: React.FC = () => {
|
|
|
|
|
const { addToast } = useToast();
|
|
|
|
|
const [retention, setRetention] = useState('30');
|
|
|
|
|
const [region, setRegion] = useState('us-east-1');
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="h-full flex flex-col gap-8 animate-fadeIn">
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Quota */}
|
2026-01-26 13:12:17 +00:00
|
|
|
<Card variant="glass">
|
2026-01-13 18:47:57 +00:00
|
|
|
<h3 className="font-bold text-white mb-6 flex items-center gap-2">
|
aesthetic-improvements: reduce decorative cyan across multiple component categories (80/20 rule, batch 11)
- Social: FeedView, ConnectionsView, GroupsView, ExploreView, GroupDetailView loading spinners and decorative text, CreatePostModal decorative select text and hashtag links, PostCard decorative tag links and waveform bars and view comments link, CreateGroupModal decorative icon (9 instances)
- Settings: DataExportModal decorative icon, LoginHistory decorative IP text, AppearanceSettingsView decorative icon and selected theme checkmark, BackupsView decorative icon, CloudIntegrationView decorative icon, AccessibilitySettingsView decorative icon, SecuritySettings decorative icon, PasskeyModal decorative icon and loading spinner (8 instances)
- Studio: ProjectsManager loading spinner and progress percentage text, CloudFileBrowser decorative music icons, AIToolsView decorative music icon, ConnectivityView decorative icon, CreateProjectModal decorative icon, CloudSettingsView decorative icon (6 instances)
- Admin: AdminDashboardView loading spinner and decorative chart bars and icon, AdminSettingsView decorative icon, AdminModerationView loading spinner, AdminUsersView loading spinner (5 instances)
- Inventory: InventoryView loading spinner, EquipmentCard decorative price icon, EquipmentDetailView loading spinner and decorative icons and price text, AddEquipmentView decorative icon (5 instances)
- Seller: CreateProductView decorative icon, SellerDashboardView loading spinner and decorative icon and sales text (3 instances)
- Live: LiveStreamDetailView decorative streamer name text (1 instance)
- Developer: DeveloperDashboardView loading spinner, WebhooksView decorative icon (2 instances)
- Upload: BulkUploadModal decorative icon, FilePreviewCard decorative audio file icon, MetadataForm decorative button text, CoverArtUploadModal decorative icon, LyricsEditorModal decorative icon (5 instances)
- Notifications: NotificationItem decorative follow icon and mark as read button, NotificationBell decorative mark all read link (3 instances)
- Total: ~46 files, ~46 instances replaced
- Preserved: Active/selected states (CloudFileBrowser selected files checkmarks, CreatePostModal post type active state, GroupCard/GroupDetailView public/private badges - semantic indicators, DataExportModal checkbox accents - focus/interaction, AppearanceSettingsView selected theme - active state, PasskeyModal checkbox accent - focus/interaction, LyricsEditorModal checkbox accent - focus/interaction, FileUploadZone drag active state - active state, EquipmentDetailView support link - functional link, FlashSaleModal link - functional link, EquipmentDetailView image indicator dots - active state), primary actions, design system variants
- Action 11.3.1.3 in progress (eleventh batch: social, settings, studio, admin, inventory, seller, live, developer, upload, notifications components)
2026-01-16 10:26:33 +00:00
|
|
|
<HardDrive className="w-5 h-5 text-kodo-steel" /> Storage Quota
|
2026-01-13 18:47:57 +00:00
|
|
|
</h3>
|
|
|
|
|
<div className="text-center mb-6">
|
|
|
|
|
<div className="text-5xl font-display font-bold text-white mb-2">
|
|
|
|
|
65.4 GB
|
|
|
|
|
</div>
|
2026-01-16 00:56:34 +00:00
|
|
|
<div className="text-sm text-kodo-content-dim">used of 100 GB (Pro Plan)</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
|
|
|
|
<ProgressBar value={65.4} color="cyan" />
|
|
|
|
|
<div className="grid grid-cols-3 gap-4 mt-8 text-center">
|
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-ink rounded border border-kodo-steel/50">
|
2026-01-16 00:56:34 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim uppercase font-bold">
|
2026-01-13 18:47:57 +00:00
|
|
|
Audio
|
|
|
|
|
</div>
|
|
|
|
|
<div className="text-lg font-bold text-white">45 GB</div>
|
|
|
|
|
</div>
|
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-ink rounded border border-kodo-steel/50">
|
2026-01-16 00:56:34 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim uppercase font-bold">
|
2026-01-13 18:47:57 +00:00
|
|
|
Projects
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="text-lg font-bold text-white">15 GB</div>
|
|
|
|
|
</div>
|
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-ink rounded border border-kodo-steel/50">
|
2026-01-16 00:56:34 +00:00
|
|
|
<div className="text-xs text-kodo-content-dim uppercase font-bold">
|
2026-01-13 18:47:57 +00:00
|
|
|
Other
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="text-lg font-bold text-white">5.4 GB</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<Button
|
|
|
|
|
variant="primary"
|
|
|
|
|
className="w-full mt-6"
|
|
|
|
|
onClick={() => addToast('Upgrade flow opened')}
|
|
|
|
|
>
|
|
|
|
|
Increase Storage
|
|
|
|
|
</Button>
|
|
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
{/* Preferences */}
|
|
|
|
|
<Card variant="default">
|
|
|
|
|
<h3 className="font-bold text-white mb-6">Preferences</h3>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div className="space-y-6">
|
|
|
|
|
<div>
|
2026-01-16 00:56:34 +00:00
|
|
|
<label className="block text-sm font-bold text-kodo-content-dim mb-2 flex items-center gap-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
<Clock className="w-4 h-4" /> Trash Retention Policy
|
|
|
|
|
</label>
|
|
|
|
|
<select
|
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
|
|
|
className="w-full bg-kodo-ink border border-kodo-steel rounded p-4 text-white outline-none focus:border-kodo-steel"
|
2026-01-13 18:47:57 +00:00
|
|
|
value={retention}
|
|
|
|
|
onChange={(e) => setRetention(e.target.value)}
|
|
|
|
|
>
|
|
|
|
|
<option value="7">7 Days</option>
|
|
|
|
|
<option value="30">30 Days</option>
|
|
|
|
|
<option value="90">90 Days</option>
|
|
|
|
|
<option value="forever">Never Delete</option>
|
|
|
|
|
</select>
|
2026-01-16 00:56:34 +00:00
|
|
|
<p className="text-xs text-kodo-content-dim mt-1">
|
2026-01-13 18:47:57 +00:00
|
|
|
Deleted files are permanently removed after this period.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
2026-01-07 09:31:02 +00:00
|
|
|
|
2026-01-13 18:47:57 +00:00
|
|
|
<div>
|
2026-01-16 00:56:34 +00:00
|
|
|
<label className="block text-sm font-bold text-kodo-content-dim mb-2 flex items-center gap-2">
|
2026-01-13 18:47:57 +00:00
|
|
|
<MapPin className="w-4 h-4" /> Storage Region
|
|
|
|
|
</label>
|
|
|
|
|
<select
|
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
|
|
|
className="w-full bg-kodo-ink border border-kodo-steel rounded p-4 text-white outline-none focus:border-kodo-steel"
|
2026-01-13 18:47:57 +00:00
|
|
|
value={region}
|
|
|
|
|
onChange={(e) => setRegion(e.target.value)}
|
|
|
|
|
>
|
|
|
|
|
<option value="us-east-1">US East (N. Virginia)</option>
|
|
|
|
|
<option value="eu-west-1">Europe (Ireland)</option>
|
|
|
|
|
<option value="ap-northeast-1">Asia Pacific (Tokyo)</option>
|
|
|
|
|
</select>
|
|
|
|
|
<div className="flex items-start gap-2 mt-2 text-xs text-kodo-gold bg-kodo-gold/10 p-2 rounded">
|
|
|
|
|
<AlertCircle className="w-3 h-3 mt-0.5" />
|
|
|
|
|
Changing regions requires data migration which may take up to 24
|
|
|
|
|
hours.
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
2026-01-13 18:47:57 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div className="pt-4 border-t border-kodo-steel">
|
|
|
|
|
<Button
|
|
|
|
|
variant="ghost"
|
|
|
|
|
className="text-kodo-red hover:bg-kodo-red/10 border border-kodo-red/30 w-full"
|
|
|
|
|
onClick={() => addToast('Trash emptied')}
|
|
|
|
|
>
|
|
|
|
|
<Trash2 className="w-4 h-4 mr-2" /> Empty Trash Now
|
|
|
|
|
</Button>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</Card>
|
2026-01-07 09:31:02 +00:00
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|