-
+
{/* Header */}
@@ -161,7 +228,13 @@ function RepoHubAppContent({ cryptomusEnabled }: { cryptomusEnabled: boolean })
)}
diff --git a/src/contexts/LocaleContext.tsx b/src/contexts/LocaleContext.tsx
index 937a6ba..116ddbc 100644
--- a/src/contexts/LocaleContext.tsx
+++ b/src/contexts/LocaleContext.tsx
@@ -12,7 +12,9 @@ const translations = {
description: "Simplify software installation across Linux, Windows, and macOS with official repositories",
close: "Close",
next: "Next",
- back: "Back"
+ back: "Back",
+ select_all: "Select All",
+ deselect_all: "Deselect All"
},
platform: {
select: "Select Your Platform",
@@ -116,7 +118,8 @@ const translations = {
step1: {
title: "What do you want to use your computer for?",
description: "Select up to 3 categories that match your needs",
- selected: "{count} selected (max 3)"
+ selected: "{count} selected (max 3)",
+ all_selected: "All {count} categories selected"
},
step2: {
title: "Select your operating system",
@@ -194,7 +197,9 @@ const translations = {
description: "Linux, Windows ve macOS'te resmi depoları kullanarak yazılım kurulumunu basitleştirin",
close: "Kapat",
next: "İleri",
- back: "Geri"
+ back: "Geri",
+ select_all: "Tümünü Seç",
+ deselect_all: "Seçimi Kaldır"
},
platform: {
select: "Platformunuzu Seçin",
@@ -298,7 +303,8 @@ const translations = {
step1: {
title: "Bilgisayarınızı ne için kullanmak istiyorsunuz?",
description: "İhtiyaçlarınıza uygun en fazla 3 kategori seçin",
- selected: "{count} seçildi (max 3)"
+ selected: "{count} seçildi (max 3)",
+ all_selected: "Tüm {count} kategori seçildi"
},
step2: {
title: "İşletim sisteminizi seçin",
diff --git a/src/hooks/useRecommendationProfile.ts b/src/hooks/useRecommendationProfile.ts
index 2c99152..52a1f1d 100644
--- a/src/hooks/useRecommendationProfile.ts
+++ b/src/hooks/useRecommendationProfile.ts
@@ -91,7 +91,12 @@ export function useRecommendationProfile() {
// Handle version migration
if (!parsed.version || parsed.version < CURRENT_PROFILE_VERSION) {
- console.log("Migrating profile from version", parsed.version || 0, "to", CURRENT_PROFILE_VERSION);
+ console.log(
+ "Migrating profile from version",
+ parsed.version || 0,
+ "to",
+ CURRENT_PROFILE_VERSION
+ );
// Add migration logic here when schema changes in the future
parsed.version = CURRENT_PROFILE_VERSION;
}
@@ -125,13 +130,20 @@ export function useRecommendationProfile() {
const updated: UserProfile = {
...profile,
...newProfile,
+ version: CURRENT_PROFILE_VERSION,
lastUpdated: new Date().toISOString(),
};
+
+ console.log("💾 Saving profile:", updated);
+
setProfile(updated);
localStorage.setItem(STORAGE_KEY, JSON.stringify(updated));
+
+ console.log("✅ Profile saved successfully to localStorage");
+
return true;
} catch (error) {
- console.error("Error saving user profile:", error);
+ console.error("❌ Error saving user profile:", error);
return false;
}
},
diff --git a/src/services/recommendationService.ts b/src/services/recommendationService.ts
index c78c79a..7b19895 100644
--- a/src/services/recommendationService.ts
+++ b/src/services/recommendationService.ts
@@ -88,7 +88,7 @@ export class RecommendationService {
try {
// Fetch all preset packages in one query
const packages: Package[] = [];
-
+
// Search for each package name (case-insensitive)
// Note: Current API doesn't support bulk name filtering,
// so we optimize by fetching larger batches and filtering
@@ -105,7 +105,7 @@ export class RecommendationService {
const exactMatch = result.packages.find(
(pkg) => pkg.name.toLowerCase() === name.toLowerCase()
);
-
+
if (exactMatch) {
packages.push(exactMatch);
} else if (result.packages.length > 0) {
@@ -155,7 +155,9 @@ export class RecommendationService {
// This is a workaround until we add category name filtering to API
const result = await PackageService.getMany({
platform_id: platformId,
- limit: Math.ceil(limit / (categories.length * dbCategoryNames.length)),
+ limit: Math.ceil(
+ limit / (categories.length * dbCategoryNames.length)
+ ),
sort_by: "popularity_score",
sort_order: "desc",
});