Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent user from altering the pin state of 'fixed' items as per api spec #15360

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

ByteZent
Copy link

@ByteZent ByteZent commented Nov 9, 2024

Changes

Restrict users from pinning or unpinning items that the API does not allow to be toggled. This prevents confusion for web application users, as there is currently no feedback or message provided when such actions are attempted.

Old visual (Current live version of web client)

image

New visual (As per commit)

image

(The hover effect for the icon has also been disabled -> cursor default => not really possible to screenshot on this device)


UUID: f0c0dd64-8826-4848-a9ca-e770f4ecd17a

@@ -37,6 +37,13 @@ function isItemSuggested (officialPinnedItems, itemInfo) {
}) > -1;
}

function pinIsTogglable (itemInfo) {
if (itemInfo.path === 'armoire' || itemInfo.path === 'potion' || itemInfo.type === 'debuffPotion') {
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is also referenced in the api.
Maybe this could be centralised.

API:

if (path === 'armoire' || path === 'potion' || type === 'debuffPotion') {
// @TODO: take into considertation debuffPotion type in message
throw new BadRequest(i18n.t('cannotUnpinItem', req.language));

@ByteZent ByteZent changed the title Prevent user from chaning the pin state of 'fixed' items as per api spec Prevent user from altering the pin state of 'fixed' items as per api spec Nov 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant