From 8e01ec7cd0df49159ed89ba65afaa00258233670 Mon Sep 17 00:00:00 2001 From: Made Baruna Date: Tue, 20 Sep 2022 01:34:49 +0700 Subject: [PATCH] Update excel import --- src/functions/export.js | 6 +- src/locales/en.json | 3 +- src/routes/wish/_excelImport.svelte | 102 +++++++++++++++++++--------- src/service-worker.js | 5 +- 4 files changed, 76 insertions(+), 40 deletions(-) diff --git a/src/functions/export.js b/src/functions/export.js index 11fe17f9..3f8a4437 100644 --- a/src/functions/export.js +++ b/src/functions/export.js @@ -141,7 +141,8 @@ async function addWishHistory(workbook) { { header: 'Pity', width: 4, style: { alignment: { horizontal: 'center' } } }, { header: '#Roll', width: 7, style: { alignment: { horizontal: 'center' } } }, { header: 'Group', width: 7, style: { alignment: { horizontal: 'center' } } }, - { header: 'Banner', width: 24 }, + { header: 'Banner', width: 30 }, + { header: 'Part', width: 9 }, // { header: 'Icon', width: 5.5 }, ]; @@ -175,10 +176,11 @@ async function addWishHistory(workbook) { pull.at, groupCount, pull.code === '400' ? bannersDual[pull.banner.fullName][1].name : pull.banner.name, + pull.code === '400' ? 'Wish 2' : '', ]); const bgColor = pull.striped ? 'ffeeeeee' : 'ffffffff'; - for (let i = 1; i <= 8; i++) { + for (let i = 1; i <= 9; i++) { row.getCell(i).fill = { type: 'pattern', pattern: 'solid', diff --git a/src/locales/en.json b/src/locales/en.json index 72b2433a..9bbaa478 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -364,7 +364,8 @@ "This feature is still in BETA! Please make a backup first by going to the Settings menu then Export to Excel.", "Wishes with the same timestamp and reward name will NOT be touched (existing wishes will not be rewritten)", "This feature will only append and prepend wishes (nothing will be inserted in the middle of the list)", - "Currently, the importer can only support excel files with an ENGLISH reward name" + "Currently, the importer can only support excel files with an ENGLISH reward name", + "Please change the website language first according to your excel file language" ], "selectFile": { "default": "Drag & drop Paimon.moe excel file here, or click here to select", diff --git a/src/routes/wish/_excelImport.svelte b/src/routes/wish/_excelImport.svelte index 652e842c..e0f5ffef 100644 --- a/src/routes/wish/_excelImport.svelte +++ b/src/routes/wish/_excelImport.svelte @@ -1,5 +1,5 @@