Add WTT & WTTF list
Closed this issue · 13 comments
Hi,
I want to add a feature to generate WTT & WTTF image like below
In catalog page
In wishlist page
Now I'm stucking at the API, it's does not support to generate the trade items that I just added. The structure is same as items
{
"settings": {
"titleText": "Nyabby#0478",
"extraText": "WTTF",
"bg": "Black",
"titleColor": "Red",
"titlePolice": "RedRock",
"textColor": "White",
"extraTextColor": "White",
"capsPerLine": 3
},
"items": [
{
"id": "1110f26e",
"prio": false,
"chosen": false,
"selected": false
},
{
"id": "48001571",
"prio": false
}
],
"tradeItems": [
{
"id": "40ed0684",
"prio": false,
"chosen": false,
"selected": false
}
]
}
Could you pls update the generate image API to support this? Or guide me if you think this is good to go.
the changes updated in my forked repo: https://github.com/anhthang/website/tree/tradelist
This has been discussed severals times indeed. I can add the feature in the API, also there is a spec for the v2 of the API which is not currently used in the website yet. See: https://github.com/keycap-archivist/app/blob/master/src/assets/v2-spec.yaml
I can add trade-caps
field in the wishlist post for example. I also need to do the drawing of it on the image processor. What do you think?
I think tradeCaps
is better (same style as others), like below, so you don't need to change much on the image processor
{
"settings": {},
"capsPerLine": 3,
"ids": [],
"priorities": [],
"tradeCaps": {
"ids": [],
"priorities": [],
}
}
I will look at the v2 specs and improve the website if possible (eg: submit a new colorway by image URL...)
It would be the occasion to deprecate the v1 and add this to the v2 API. If you can work on the migration it would be top notch. I can work on the API side
I have not tested the v2 /wishlist yet, but I can update it to v2. I will try to test with current wishlist first and try trade-caps
once you done the API.
Current wishlist generation don't have tradeCaps
and will not because there is lot of refactor in this part, i'd like to deprecate it once the UI is migrated to use the v2. Also we have to work on a localStorage migration from v1 to v2
I updated the localStorage for trade items and posted in the issue description. Now I will work on the migration to the v2 and wait for the update.
@zekth i have tested v2 API, wishlist settings is not working. you might need to update it too.
v1 object is not working for v2 API version. That's why there will be a transition phase.
v1 object is not working for v2 API version. That's why there will be a transition phase.
np. once you done the API, pls update specs, i will follow that and update the UI
Server and API have been updated: https://app.keycap-archivist.com/api/v2/documentation/static/index.html
@zekth i have created a PR for this, UI and API is updated. But the priority setting seems not working, pls check at the API and server side
great! Will check on the priority thing. Thanks! 👍
PR merged