mirror of
https://github.com/billsonnn/nitro-react.git
synced 2024-11-26 07:30:51 +01:00
pet package doesn't need masks
This commit is contained in:
parent
4bc9141ea3
commit
0f2df13395
@ -14,8 +14,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/gnome.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/gnome.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/gnome.png');
|
||||
}
|
||||
|
||||
.package-image-leprechaun_box
|
||||
@ -25,8 +23,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/leprechaun_box.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/leprechaun_box.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/leprechaun_box.png');
|
||||
}
|
||||
|
||||
.package-image-val11_present
|
||||
@ -36,8 +32,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/val11_present.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/val11_present.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/val11_present.png');
|
||||
}
|
||||
|
||||
.package-image-velociraptor_egg
|
||||
@ -47,8 +41,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/velociraptor_egg.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/velociraptor_egg.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/velociraptor_egg.png');
|
||||
}
|
||||
|
||||
.package-image-pterosaur_egg
|
||||
@ -58,8 +50,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/pterosaur_egg.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/pterosaur_egg.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/pterosaur_egg.png');
|
||||
}
|
||||
|
||||
.package-image-petbox_epic
|
||||
@ -69,8 +59,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/pets/pet-package/petbox_epic.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/pets/pet-package/petbox_epic.png');
|
||||
mask-image: url('@/assets/images/pets/pet-package/petbox_epic.png');
|
||||
}
|
||||
|
||||
.package-text-big
|
||||
@ -107,8 +95,6 @@
|
||||
position: relative;
|
||||
background-image: url('@/assets/images/infostand/pencil-icon.png');
|
||||
background-repeat: no-repeat;
|
||||
-webkit-mask-image: url('@/assets/images/infostand/pencil-icon.png');
|
||||
mask-image: url('@/assets/images/infostand/pencil-icon.png');
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -31,20 +31,21 @@ const usePetPackageWidgetState = () =>
|
||||
if (errorResult.length > 0) setErrorResult('');
|
||||
}
|
||||
|
||||
const getErrorResult = (errorCode: number) =>
|
||||
const getErrorResultForCode = (errorCode: number) =>
|
||||
{
|
||||
if (!errorCode || errorCode === 0) return;
|
||||
|
||||
switch(errorCode)
|
||||
{
|
||||
case 1:
|
||||
return setErrorResult(LocalizeText('catalog.alert.petname.long'));
|
||||
return LocalizeText('catalog.alert.petname.long');
|
||||
case 2:
|
||||
return setErrorResult(LocalizeText('catalog.alert.petname.short'));
|
||||
return LocalizeText('catalog.alert.petname.short');
|
||||
case 3:
|
||||
return setErrorResult(LocalizeText('catalog.alert.petname.chars'));
|
||||
return LocalizeText('catalog.alert.petname.chars');
|
||||
case 4:
|
||||
return setErrorResult(LocalizeText('catalog.alert.petname.bobba'));
|
||||
default:
|
||||
return LocalizeText('catalog.alert.petname.bobba');
|
||||
}
|
||||
}
|
||||
|
||||
@ -65,7 +66,7 @@ const usePetPackageWidgetState = () =>
|
||||
|
||||
if (event.nameValidationStatus === 0) onClose();
|
||||
|
||||
if (event.nameValidationStatus !== 0) getErrorResult(event.nameValidationStatus);
|
||||
if (event.nameValidationStatus !== 0) setErrorResult(getErrorResultForCode(event.nameValidationStatus));
|
||||
});
|
||||
|
||||
return { isVisible, errorResult, petName, objectType, onChangePetName, onConfirm, onClose };
|
||||
|
Loading…
Reference in New Issue
Block a user