Cropping mostly done

This commit is contained in:
Roman Krček
2025-07-17 18:08:26 +02:00
parent 3ea48272b2
commit 735e13731c
12 changed files with 1270 additions and 35 deletions

View File

@@ -55,34 +55,6 @@
recentSheets = [];
}
}
function saveToRecentSheets(sheet) {
// Create a copy of the sheet object with just the properties we need
const sheetToSave = {
id: sheet.id,
name: sheet.name,
url: sheet.webViewLink || sheet.url,
iconLink: sheet.iconLink
};
// Remove this sheet if it already exists in the list
recentSheets = recentSheets.filter(s => s.id !== sheetToSave.id);
// Add the sheet to the beginning of the list
recentSheets = [sheetToSave, ...recentSheets];
// Keep only up to 3 recent sheets
if (recentSheets.length > 3) {
recentSheets = recentSheets.slice(0, 3);
}
// Save to localStorage
try {
localStorage.setItem(RECENT_SHEETS_KEY, JSON.stringify(recentSheets));
} catch (err) {
console.error('Error saving recent sheets:', err);
}
}
function handleSelectSheet(sheet) {
const sheetData = {
@@ -92,7 +64,6 @@
};
selectedSheet.set(sheetData);
saveToRecentSheets(sheet);
}
function handleContinue() {