frzyc / genshin-optimizer

An Artifact optimizer for Genshin Impact.
https://frzyc.github.io/genshin-optimizer/
MIT License
751 stars 219 forks source link

Add db import info for team/loadout/build #2145

Closed frzyc closed 1 month ago

frzyc commented 1 month ago

image Currently only shows art/weapon/char

For importing GO data on another GO data for team/loadout, I believe the current logic is the import data overwrite the existing data. I think I am fine with that, deduping would be unnecessarily complicated, the UI should just reflect this.

CordonZeus22 commented 1 month ago

I will work on it

CordonZeus22 commented 1 month ago

Actually, importing teams doesn't remove existing teams not in import. Even with the Delete items not in import option. Same for loadout. Is this behavior intended ?

nguyentvan7 commented 1 month ago

Seems so https://discord.com/channels/785153694478893126/1218906581593231540, tho i still feel like its weird that teams are not deleted with that setting enabled

CordonZeus22 commented 1 month ago

This thread has been marked as not a bug. So, this behavior shouldn't be changed ?

nguyentvan7 commented 1 month ago

Leaving @frzyc to give final say

frzyc commented 1 month ago

For importing GO data on another GO data for team/loadout, I believe the current logic is the import data overwrite the existing data. I think I am fine with that, deduping would be unnecessarily complicated, the UI should just reflect this.

Yeah i do not think its worth any developer's time to dedup/merge team/loadouts. The ask for this issue is basically just add a tally as a visual for users, and not to add any complex logic to db

CordonZeus22 commented 1 month ago

There is already a dedup/merge for team and loadouts I think

CordonZeus22 commented 1 month ago

If no dedup/merge should be done, what will be written on the card ?

frzyc commented 1 month ago

Just the number of team/loadout/builds before import, and after

CordonZeus22 commented 1 month ago

Also TC Builds ?

frzyc commented 1 month ago

Yes, and TC builds

CordonZeus22 commented 1 month ago

How the total amout of loadouts can be computed ?

frzyc commented 1 month ago

yeah loadouts are called teamChars(due to legacy naming) so it would be database.teamChars.values.length

CordonZeus22 commented 1 month ago

Thanks