mirror of
https://github.com/MadeBaruna/paimon-moe.git
synced 2025-03-21 14:28:59 +01:00
Change export column order to match history page
This commit is contained in:
parent
8217a2bf14
commit
f4675d1bb9
1 changed files with 10 additions and 9 deletions
|
@ -1,8 +1,9 @@
|
||||||
import { Workbook } from 'exceljs';
|
import { Workbook } from 'exceljs';
|
||||||
|
import dayjs from 'dayjs';
|
||||||
|
|
||||||
import { bannerTypes } from '../data/bannerTypes';
|
import { bannerTypes } from '../data/bannerTypes';
|
||||||
import { banners } from '../data/banners';
|
import { banners } from '../data/banners';
|
||||||
|
|
||||||
import dayjs from 'dayjs';
|
|
||||||
import { getTimeOffset } from '../stores/server';
|
import { getTimeOffset } from '../stores/server';
|
||||||
import { process } from './wish';
|
import { process } from './wish';
|
||||||
|
|
||||||
|
@ -132,11 +133,11 @@ async function addWishHistory(workbook, icons) {
|
||||||
|
|
||||||
const sheet = workbook.getWorksheet(category);
|
const sheet = workbook.getWorksheet(category);
|
||||||
sheet.columns = [
|
sheet.columns = [
|
||||||
{ header: 'Time', width: 22, style: { alignment: { horizontal: 'left' } } },
|
|
||||||
{ header: 'Pity', width: 4, style: { alignment: { horizontal: 'center' } } },
|
|
||||||
{ header: 'Name', width: 32 },
|
|
||||||
{ header: '⭐', width: 2.5, style: { alignment: { horizontal: 'center' } } },
|
|
||||||
{ header: 'Type', width: 9 },
|
{ header: 'Type', width: 9 },
|
||||||
|
{ header: 'Name', width: 32 },
|
||||||
|
{ header: 'Time', width: 22, style: { alignment: { horizontal: 'left' } } },
|
||||||
|
{ header: '⭐', width: 2.5, style: { alignment: { horizontal: 'center' } } },
|
||||||
|
{ header: 'Pity', width: 4, style: { alignment: { horizontal: 'center' } } },
|
||||||
{ header: '#Roll', width: 7, style: { alignment: { horizontal: 'center' } } },
|
{ header: '#Roll', width: 7, style: { alignment: { horizontal: 'center' } } },
|
||||||
{ header: 'Group', width: 7, style: { alignment: { horizontal: 'center' } } },
|
{ header: 'Group', width: 7, style: { alignment: { horizontal: 'center' } } },
|
||||||
{ header: 'Banner', width: 24 },
|
{ header: 'Banner', width: 24 },
|
||||||
|
@ -164,11 +165,11 @@ async function addWishHistory(workbook, icons) {
|
||||||
lastTime = pull.time;
|
lastTime = pull.time;
|
||||||
|
|
||||||
const row = sheet.addRow([
|
const row = sheet.addRow([
|
||||||
dayjs.unix(pull.time).toDate(),
|
pull.type[0].toUpperCase() + pull.type.slice(1),
|
||||||
pull.pity,
|
|
||||||
pull.name,
|
pull.name,
|
||||||
|
dayjs.unix(pull.time).toDate(),
|
||||||
pull.rarity,
|
pull.rarity,
|
||||||
pull.type,
|
pull.pity,
|
||||||
pull.at,
|
pull.at,
|
||||||
groupCount,
|
groupCount,
|
||||||
pull.banner.name,
|
pull.banner.name,
|
||||||
|
@ -183,7 +184,7 @@ async function addWishHistory(workbook, icons) {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
row.getCell(1).numFmt = 'yyyy-mm-dd hh:mm:ss';
|
row.getCell(3).numFmt = 'yyyy-mm-dd hh:mm:ss';
|
||||||
|
|
||||||
row.font = {
|
row.font = {
|
||||||
color: { argb: pull.rarity === 5 ? 'FFCC9832' : pull.rarity === 4 ? 'FF8A6995' : 'FF000000' },
|
color: { argb: pull.rarity === 5 ? 'FFCC9832' : pull.rarity === 4 ? 'FF8A6995' : 'FF000000' },
|
||||||
|
|
Loading…
Add table
Reference in a new issue