Add placeholder screenshots and boost super like recommendations

Add screenshot functionality to desktop environment cards, specify a directory for screenshots, and significantly increase the recommendation weight for "super liked" desktop environments.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: c4fc7b07-53a2-4929-bc12-f392104bb085
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Event-Id: 936a3981-c2af-4a9b-b975-bbce46d12e05
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/55e426a8-5a2b-421b-8bd4-30481ae0063b/c4fc7b07-53a2-4929-bc12-f392104bb085/OOak6Ts
Replit-Helium-Checkpoint-Created: true
This commit is contained in:
yusufipk
2025-12-17 14:25:20 +00:00
parent 3429df4273
commit 2e230b781a
4 changed files with 100 additions and 66 deletions
+11 -10
View File
@@ -57,20 +57,21 @@ export function calculateDistroScores(preferences: UserPreferences): ScoredDistr
});
preferences.superLikedDEs.forEach(de => {
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '');
const matchingDistros = DE_SCORES[deKey] || [];
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '').replace('/', '');
const matchingDistros = DE_SCORES[deKey] || DE_SCORES[de.toLowerCase()] || [];
matchingDistros.forEach(distroId => {
scores[distroId] = (scores[distroId] || 0) + 15;
scores[distroId] = (scores[distroId] || 0) + 50;
if (!matchReasons[distroId]) matchReasons[distroId] = [];
matchReasons[distroId].push(`${de} masaüstü ortamını çok beğendin`);
matchReasons[distroId].push(`${de} masaüstü ortamını bayıldın!`);
});
});
preferences.likedDEs.forEach(de => {
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '');
const matchingDistros = DE_SCORES[deKey] || [];
if (preferences.superLikedDEs.includes(de)) return;
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '').replace('/', '');
const matchingDistros = DE_SCORES[deKey] || DE_SCORES[de.toLowerCase()] || [];
matchingDistros.forEach(distroId => {
scores[distroId] = (scores[distroId] || 0) + 8;
scores[distroId] = (scores[distroId] || 0) + 10;
if (!matchReasons[distroId]?.some(r => r.includes(de))) {
matchReasons[distroId]?.push(`${de} desteği mevcut`);
}
@@ -78,10 +79,10 @@ export function calculateDistroScores(preferences: UserPreferences): ScoredDistr
});
preferences.dislikedDEs.forEach(de => {
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '');
const matchingDistros = DE_SCORES[deKey] || [];
const deKey = de.toLowerCase().replace(/\s+/g, '').replace('plasma', '').replace('/', '');
const matchingDistros = DE_SCORES[deKey] || DE_SCORES[de.toLowerCase()] || [];
matchingDistros.forEach(distroId => {
scores[distroId] = (scores[distroId] || 0) - 5;
scores[distroId] = (scores[distroId] || 0) - 15;
});
});