Skip to content

Commit

Permalink
Merge branch 'remove-PassWindowsDownload-feature-flag' into 'main'
Browse files Browse the repository at this point in the history
Remove PassWindowsDownload feature flag

See merge request web/clients!9310
  • Loading branch information
MargeBot committed Feb 29, 2024
2 parents bd484ac + 9ce89fd commit a1c6016
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { c } from 'ttag';

import { ButtonLike, Card } from '@proton/atoms';
import { DownloadClientCard, SettingsLink } from '@proton/components/components';
import { SettingsParagraph, SettingsSectionWide, useFlag } from '@proton/components/containers';
import { SettingsParagraph, SettingsSectionWide } from '@proton/components/containers';
import { usePlans, useUser } from '@proton/components/hooks';
import { PASS_APP_NAME, PLANS } from '@proton/shared/lib/constants';
import { getDownloadablePassClients } from '@proton/shared/lib/pass/constants';
import { clients } from '@proton/shared/lib/pass/constants';
import clsx from '@proton/utils/clsx';

const UpgradeBanner = ({ className }: { className?: string }) => {
Expand Down Expand Up @@ -38,10 +38,6 @@ const UpgradeBanner = ({ className }: { className?: string }) => {
};

const PassDownloadsSettingsPage = () => {
const passWindowsDownloadEnabled = useFlag('PassWindowsDownload');

const clients = getDownloadablePassClients({ includeWindows: passWindowsDownloadEnabled });

return (
<SettingsSectionWide>
<UpgradeBanner className="mb-6" />
Expand Down
1 change: 0 additions & 1 deletion packages/components/containers/unleash/UnleashContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ enum AccountFlag {
ChargebeeSignups = 'ChargebeeSignups',
ChargebeeMigration = 'ChargebeeMigration',
ChargebeeFreeToPaid = 'ChargebeeFreeToPaid',
PassWindowsDownload = 'PassWindowsDownload',
}

// enum CalendarFeatureFlag {}
Expand Down
82 changes: 37 additions & 45 deletions packages/shared/lib/pass/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,48 +21,40 @@ export enum Clients {
Edge,
}

export const getDownloadablePassClients = ({
includeWindows = true,
}: {
includeWindows?: boolean;
} = {}): { [key in Clients]: Client } => {
return {
[Clients.Windows]: {
title: 'Windows',
link: includeWindows ? 'https://proton.me/download/PassDesktop/win32/x64/ProtonPass_Setup.exe' : '',
icon: 'brand-windows',
},
[Clients.Android]: {
title: 'Android',
link: 'https://play.google.com/store/apps/details?id=proton.android.pass',
icon: 'brand-android',
},
[Clients.iOS]: {
title: 'iOS',
link: 'https://apps.apple.com/us/app/id6443490629',
icon: 'brand-apple',
},
[Clients.Chrome]: {
title: 'Chrome',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-chrome',
},
[Clients.Brave]: {
title: 'Brave',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-brave',
},
[Clients.Edge]: {
title: 'Edge',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-edge',
},
[Clients.Firefox]: {
title: 'Firefox',
link: 'https://addons.mozilla.org/en-US/firefox/addon/proton-pass',
icon: 'brand-firefox',
},
} as const;
};

export const clients = getDownloadablePassClients();
export const clients: { [key in Clients]: Client } = {
[Clients.Windows]: {
title: 'Windows',
link: 'https://proton.me/download/PassDesktop/win32/x64/ProtonPass_Setup.exe',
icon: 'brand-windows',
},
[Clients.Android]: {
title: 'Android',
link: 'https://play.google.com/store/apps/details?id=proton.android.pass',
icon: 'brand-android',
},
[Clients.iOS]: {
title: 'iOS',
link: 'https://apps.apple.com/us/app/id6443490629',
icon: 'brand-apple',
},
[Clients.Chrome]: {
title: 'Chrome',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-chrome',
},
[Clients.Brave]: {
title: 'Brave',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-brave',
},
[Clients.Edge]: {
title: 'Edge',
link: 'https://chrome.google.com/webstore/detail/proton-pass/ghmbeldphafepmbegfdlkpapadhbakde',
icon: 'brand-edge',
},
[Clients.Firefox]: {
title: 'Firefox',
link: 'https://addons.mozilla.org/en-US/firefox/addon/proton-pass',
icon: 'brand-firefox',
},
} as const;

0 comments on commit a1c6016

Please sign in to comment.