Skip to content

Commit

Permalink
Merge pull request #243 from vtex-apps/feature/IDCS-792/remove-leftovers
Browse files Browse the repository at this point in the history
Feature/idcs 792/remove leftovers
  • Loading branch information
rafarubim authored Nov 9, 2021
2 parents e60be1b + 659d6ff commit 3980230
Show file tree
Hide file tree
Showing 17 changed files with 9 additions and 588 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Removed

- All unused messages from project
- **authentication.hideMyAuthentication** app setting
- "Redefine Password" feature from "Profile" tab

## [1.23.0] - 2021-11-01

### Added
Expand Down
1 change: 0 additions & 1 deletion graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ type AppSettings {
showGenders: Boolean
showMyCards: Boolean
showMyOrders: Boolean
hideMyAuthentication: Boolean
}
34 changes: 0 additions & 34 deletions messages/context.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,12 @@
"[email protected]::pages.addressEdit": "Edit address",
"[email protected]::pages.profile": "Profile",
"[email protected]::pages.profileEdit": "Edit Profile",
"[email protected]::pages.myAccount": "My account",
"[email protected]::pages.logout": "Logout",
"[email protected]::logoutModal.cancel": "Cancel",
"[email protected]::logoutModal.title": "Do you really want to logout?",
"[email protected]::personalData.redefinePassword": "Redefine password",
"[email protected]::personalData.saveData": "Save changes",
"[email protected]::personalData.password": "Password",
"[email protected]::personalData.currentPassword": "Current password",
"[email protected]::personalData.newPassword": "New password",
"[email protected]::personalData.confirmPassword": "Confirm new password",
"[email protected]::personalData.savePassword": "Save password",
"[email protected]::personalData.yourPasswordMust": "Your password must have at least:",
"[email protected]::personalData.8chars": "8 characters",
"[email protected]::personalData.1number": "1 number",
"[email protected]::personalData.1upLetter": "1 uppercase letter",
"[email protected]::personalData.1lowLetter": "1 lowercase letter",
"[email protected]::personalData.sendAccessCode.title": "Send access code to your email",
"[email protected]::personalData.sendCode": "Send code",
"[email protected]::personalData.confirmCode": "Confirm code",
"[email protected]::personalData.code": "Code",
"[email protected]::personalData.definePassword": "Set password",
"[email protected]::personalData.noPassword": "You do not have a password defined yet.",
"[email protected]::personalData.definePassword.title": "Set Password",
"[email protected]::personalData.editPassword.title": "Edit Password",
"[email protected]::personalData.resendCode": "Resend code",
"[email protected]::personalData.newsletterOptIn": "I want to receive the newsletter.",
"[email protected]::personalData.newsletter": "Newsletter",
"[email protected]::personalData.newsletterQuestion": "Do you want to receive promotional emails?",
"[email protected]::upload.loading": "Loading…",
"[email protected]::upload.choosePhoto": "Choose a Picture",
"[email protected]::upload.chooseAgain": "Choose another Picture",
"[email protected]::upload.save": "Save",
"[email protected]::upload.dragYourPhoto": "Drag your new profile picture here",
"[email protected]::upload.photoUpdated": "Your profile picture was successfully updated.",
"[email protected]::upload.or": "or",
"[email protected]::addresses.addAddress": "Add address",
"[email protected]::addresses.saveAddress": "Save address",
"[email protected]::addresses.deleteAddress": "Delete address",
Expand All @@ -48,11 +19,6 @@
"[email protected]::commons.edit": "Edit",
"[email protected]::alert.addressNotFound": "The selected address was not found.",
"[email protected]::alert.success": "Your information was successfully saved.",
"[email protected]::alert.fileTooBig": "This image is above the 4MB limit, choose a smaller one.",
"[email protected]::alert.passwordMismatch": "Passwords do not match.",
"[email protected]::alert.wrongPassword": "Current password is wrong.",
"[email protected]::alert.wrongAndAboutToBlock": "Current password is wrong. One more invalid attempt will block your account for one hour.",
"[email protected]::alert.blockedUser": "You have been blocked, try again later.",
"[email protected]::editor.defaultRoute.name": "My Account - Home",
"[email protected]::editor.defaultRoute.description": "My Account's default page",
"[email protected]::editor.defaultRoute.field": "My Account's default path",
Expand Down
2 changes: 0 additions & 2 deletions node/resolvers/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ async function settings(_: unknown, __: unknown, ctx: ServiceContext) {
showGenders: result.profile && result.profile.showGenders,
showMyCards: result.cards && result.cards.showMyCards,
showMyOrders: result.orders && result.orders.showMyOrders,
hideMyAuthentication: (result.authentication && result.authentication.hideMyAuthentication) || false,
}
}

Expand All @@ -25,7 +24,6 @@ interface Settings {
profile?: { showGenders: boolean }
cards?: { showMyCards: boolean }
orders?: { showMyOrders: boolean }
authentication?: { hideMyAuthentication: boolean }
}

export default settings
14 changes: 2 additions & 12 deletions react/components/Menu/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,11 @@ const CSS_HANDLES = ['css', 'menu', 'menuLinks', 'menuLink'] as const
interface RenderLinksOptions {
showMyCards: boolean | null
showMyOrders: boolean | null
hideMyAuthentication?: boolean | null
}

function renderLinks(
links: Link[],
{ showMyCards, showMyOrders, hideMyAuthentication }: RenderLinksOptions
{ showMyCards, showMyOrders }: RenderLinksOptions
) {
const linksToDisplay = links.filter(link => {
if (showMyCards === false && link.path === '/cards') {
Expand All @@ -35,10 +34,6 @@ function renderLinks(
return false
}

if (hideMyAuthentication === true && link.path === '/authentication') {
return false
}

return true
})

Expand All @@ -56,11 +51,7 @@ class Menu extends Component<Props, { isModalOpen: boolean }> {

public render() {
const { cssHandles, intl, settings } = this.props
const {
showMyCards = false,
showMyOrders = false,
hideMyAuthentication = false,
} = settings || {}
const { showMyCards = false, showMyOrders = false } = settings || {}

return (
<aside
Expand All @@ -74,7 +65,6 @@ class Menu extends Component<Props, { isModalOpen: boolean }> {
renderLinks(links, {
showMyCards,
showMyOrders,
hideMyAuthentication,
})
}
/>
Expand Down
56 changes: 0 additions & 56 deletions react/components/Profile/PasswordBox.tsx

This file was deleted.

Loading

0 comments on commit 3980230

Please sign in to comment.