index int64 0 0 | repo_id stringlengths 16 181 | file_path stringlengths 28 270 | content stringlengths 1 11.6M | __index_level_0__ int64 0 10k |
|---|---|---|---|---|
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/gmailSyncModal/GmailSyncModalAnimation.tsx | import { c } from 'ttag';
import { Icon, Logo, useUser } from '@proton/components';
import envelope from '@proton/styles/assets/img/illustrations/envelope.svg';
import gmailLogo from '@proton/styles/assets/img/illustrations/gmail-logo.svg';
import key from '@proton/styles/assets/img/illustrations/key.svg';
import stop... | 6,300 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/gmailSyncModal/SignInWithGoogle.scss | .google-button {
--button-default-background-color: #4285f4;
--button-hover-background-color: #3265d2;
--button-active-background-color: #2245b0;
}
| 6,301 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/gmailSyncModal/SignInWithGoogle.tsx | import { c } from 'ttag';
import { Button } from '@proton/atoms/Button';
import googleLogo from '@proton/styles/assets/img/import/providers/google.svg';
import './SignInWithGoogle.scss';
interface Props {
loading: boolean;
disabled?: boolean;
onClick: () => void;
}
const SignInWithGoogle = ({ loading, d... | 6,302 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/gmailSyncModal/index.ts | export { default as GmailSyncModal } from './GmailSyncModal';
| 6,303 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/heading/PrivateHeader.tsx | import { ReactNode } from 'react';
import { APP_NAMES } from '@proton/shared/lib/constants';
import clsx from '@proton/utils/clsx';
import { Hamburger } from '../../components';
import Header, { Props as HeaderProps } from '../../components/header/Header';
import { TopNavbar, TopNavbarList, TopNavbarListItem, TopNavb... | 6,304 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/heading/TopNavbarListItemFeedbackButton.tsx | import { c } from 'ttag';
import Icon from '../../components/icon/Icon';
import TopNavbarListItemButton from '../../components/topnavbar/TopNavbarListItemButton';
interface Props {
onClick: () => void;
}
const TopNavbarListItemFeedbackButton = ({ onClick }: Props) => {
return (
<TopNavbarListItemButt... | 6,305 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/heading/UserDropdown.tsx | import { MouseEvent, useEffect, useMemo, useState } from 'react';
import { useLocation } from 'react-router';
import { addDays, fromUnixTime } from 'date-fns';
import { c } from 'ttag';
import { Button, ButtonLike, NotificationDot } from '@proton/atoms';
import { ThemeColor } from '@proton/colors';
import {
Confi... | 6,306 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/heading/UserDropdownButton.tsx | import { ButtonHTMLAttributes, DetailedHTMLProps, Ref, forwardRef } from 'react';
import { c } from 'ttag';
import { NotificationDot } from '@proton/atoms';
import { ThemeColor } from '@proton/colors';
import { getInitials } from '@proton/shared/lib/helpers/string';
import { UserModel } from '@proton/shared/lib/inter... | 6,307 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/heading/index.ts | export { default as UserDropdown } from './UserDropdown';
export { default as PrivateHeader } from './PrivateHeader';
export { default as Header } from '../../components/header/Header';
export { default as TopNavbarListItemFeedbackButton } from './TopNavbarListItemFeedbackButton';
| 6,308 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/illustration/IllustrationPlaceholder.tsx | import { ReactNode } from 'react';
import clsx from '@proton/utils/clsx';
interface Props {
className?: string;
illustrationClassName?: string;
title?: string;
url: string;
uppercase?: boolean;
children?: ReactNode;
titleSize?: 'regular' | 'big';
}
const IllustrationPlaceholder = ({
c... | 6,309 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/illustration/index.ts | export { default as IllustrationPlaceholder } from './IllustrationPlaceholder';
| 6,310 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/importExportApp/ImportExportAppSection.tsx | import { c } from 'ttag';
import { ButtonLike, Href } from '@proton/atoms';
import { getImportExportAppUrl } from '@proton/shared/lib/helpers/url';
import { SettingsParagraph, SettingsSection } from '../account';
const ImportExportAppSection = () => {
return (
<SettingsSection>
<SettingsParag... | 6,311 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/importExportApp/index.ts | export { default as ImportExportAppSection } from './ImportExportAppSection';
| 6,312 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoiceActions.tsx | import { c } from 'ttag';
import { useLoading } from '@proton/hooks';
import { queryPaymentMethodStatus } from '@proton/shared/lib/api/payments';
import { INVOICE_STATE } from '@proton/shared/lib/constants';
import isTruthy from '@proton/utils/isTruthy';
import { DropdownActions } from '../../components';
import { us... | 6,313 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoiceAmount.tsx | import { INVOICE_STATE } from '@proton/shared/lib/constants';
import { Price } from '../../components';
import { Invoice } from './interface';
interface Props {
invoice: Invoice;
}
const format = ({ State, AmountCharged = 0, AmountDue = 0 }: Invoice) => {
return State === INVOICE_STATE.UNPAID ? AmountDue : A... | 6,314 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoiceState.tsx | import { c } from 'ttag';
import { INVOICE_STATE } from '@proton/shared/lib/constants';
import { Badge } from '../../components';
import { Invoice } from './interface';
const TYPES = {
[INVOICE_STATE.UNPAID]: 'error',
[INVOICE_STATE.PAID]: 'success',
[INVOICE_STATE.VOID]: 'default',
[INVOICE_STATE.BI... | 6,315 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoiceTextModal.tsx | import { useState } from 'react';
import PropTypes from 'prop-types';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { updateInvoiceText } from '@proton/shared/lib/api/settings';
import {
Form,
InputFieldTwo,
ModalProps,
ModalTwo,
ModalTwoContent,
ModalTwoFooter,
... | 6,316 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoiceType.tsx | import { c } from 'ttag';
import { INVOICE_TYPE } from '@proton/shared/lib/constants';
import { Invoice } from './interface';
const getType = (type: INVOICE_TYPE) => {
switch (type) {
case INVOICE_TYPE.OTHER:
return c('Invoice type display as badge').t`Other`;
case INVOICE_TYPE.SUBSCR... | 6,317 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoicesPreview.tsx | import { Ref, forwardRef, useImperativeHandle, useRef, useState } from 'react';
import { getInvoice } from '@proton/shared/lib/api/payments';
import { useApi } from '../../hooks';
import { FilePreview, NavigationControl } from '../filePreview';
import { Invoice } from './interface';
export interface InvoicesPreviewC... | 6,318 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoicesSection.test.tsx | import { render } from '@testing-library/react';
import { useSubscribeEventManager } from '../../hooks';
import InvoicesSection from './InvoicesSection';
jest.mock('../../hooks/useHandler', () => {
return {
__esModule: true,
...jest.requireActual('../../hooks/useHandler'),
useSubscribeEven... | 6,319 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/InvoicesSection.tsx | import { useRef, useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { getInvoice, queryInvoices } from '@proton/shared/lib/api/payments';
import { ELEMENTS_PER_PAGE, INVOICE_OWNER, INVOICE_STATE, MAIL_APP_NAME } from '@proton/shared/lib/constants';
import downloadFile fr... | 6,320 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/PayInvoiceModal.tsx | import { c } from 'ttag';
import { usePaymentFacade } from '@proton/components/payments/client-extensions';
import { PAYMENT_METHOD_TYPES } from '@proton/components/payments/core';
import { PaymentProcessorHook } from '@proton/components/payments/react-extensions/interface';
import { useLoading } from '@proton/hooks';... | 6,321 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/index.ts | export { default as PayInvoiceModal } from './PayInvoiceModal';
export { default as InvoiceState } from './InvoiceState';
export { default as InvoiceType } from './InvoiceType';
export { default as InvoiceAmount } from './InvoiceAmount';
export { default as InvoiceTextModal } from './InvoiceTextModal';
export { default... | 6,322 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/invoices/interface.ts | import { INVOICE_STATE } from '@proton/shared/lib/constants';
import { Currency } from '@proton/shared/lib/interfaces';
export interface Invoice {
ID: string;
Type: number;
State: INVOICE_STATE;
Currency: Currency;
AmountDue: number;
AmountCharged: number;
CreateTime: number;
ModifyTime... | 6,323 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/ItemCheckbox.tsx | import { ChangeEvent, FocusEventHandler, MouseEventHandler } from 'react';
import { DENSITY } from '@proton/shared/lib/constants';
import clsx from '@proton/utils/clsx';
import { Checkbox, Icon, IconName } from '../../components';
import { useUserSettings } from '../../hooks';
import { ContactImage } from '../contact... | 6,324 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/constants.ts | /**
* ID used in the drag DataTransfer object to store items ids currently dragged
*/
export const DRAG_ITEM_KEY = 'drag-item';
/**
* ID used in the drag DataTransfer object to store the HTML id of the dragged element
*/
export const DRAG_ITEM_ID_KEY = 'drag-item-id';
| 6,325 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/index.ts | export { default as useItemsSelection } from './useItemsSelection';
export { default as useItemsDraggable } from './useItemsDraggable';
export { default as useItemsDroppable } from './useItemsDroppable';
export { default as ItemCheckbox } from './ItemCheckbox';
| 6,326 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/items.scss | .drag-element {
position: absolute;
background-color: white;
color: black;
font-weight: var(--font-weight-bold);
z-index: -1;
inset-block-start: 0;
inset-inline-start: 0;
}
.item-dragging {
opacity: 0.5;
}
.navigation__dragover {
background: var(--interaction-default-hover);
}
| 6,327 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/useItemsDraggable.ts | import { DragEvent, useCallback, useEffect, useState } from 'react';
import { generateUID } from '../../helpers';
import useHandler from '../../hooks/useHandler';
import { DRAG_ITEM_ID_KEY, DRAG_ITEM_KEY } from './constants';
import './items.scss';
type AbstractItem = { ID?: string };
/**
* Implement the draggable... | 6,328 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/useItemsDroppable.ts | import { DragEvent } from 'react';
import { useDragOver } from '../../hooks';
import { DRAG_ITEM_ID_KEY, DRAG_ITEM_KEY } from './constants';
/**
* Implement the logic of receiving the drop of items from the item list
* Prepare all drag handlers for receiving zones and parse events to get items ids
* @param dragFil... | 6,329 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/items/useItemsSelection.ts | import { ChangeEvent, DependencyList, useEffect, useMemo, useState } from 'react';
import useHandler from '../../hooks/useHandler';
/**
* Implement the selection logic shared between mail and contacts
* You have an active id which represents the selection if there is no checked items
* As soon as you have checked ... | 6,330 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/KeyTransparencyManager.tsx | import { ReactNode, useEffect, useState } from 'react';
import useApiStatus from '@proton/components/hooks/useApiStatus';
import { ktSentryReportError } from '@proton/key-transparency/lib';
import { APP_NAMES, SECOND } from '@proton/shared/lib/constants';
import { KeyTransparencyActivation, KeyTransparencyState } from... | 6,331 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/createKeyMigrationKTVerifier.ts | import {
KeyTransparencyError,
fetchLatestEpoch,
ktSentryReport,
ktSentryReportError,
verifyAddressIsAbsent,
verifyAddressIsObsolete,
} from '@proton/key-transparency/lib';
import {
Api,
FetchedSignedKeyList,
KeyMigrationKTVerifier,
KeyTransparencyActivation,
} from '@proton/shar... | 6,332 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/createPreAuthKTVerifier.ts | import { serverTime } from '@proton/crypto';
import { commitSKLToLS, fetchSignedKeyLists, ktSentryReport, ktSentryReportError } from '@proton/key-transparency';
import {
Address,
Api,
DecryptedKey,
KeyTransparencyActivation,
PreAuthKTVerifier,
PreAuthKTVerify,
SignedKeyList,
} from '@proton/... | 6,333 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/index.ts | export { default as KeyTransparencyManager } from './KeyTransparencyManager';
export { default as createPreAuthKTVerifier } from './createPreAuthKTVerifier';
export { default as useKTVerifier } from './useKTVerifier';
export { default as useKeyMigrationKTVerifier } from './useKeyMigrationKTVerifier';
export { default a... | 6,334 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/ktContext.ts | import {
KeyTransparencyActivation,
KeyTransparencyState,
VerifyOutboundPublicKeys,
} from '@proton/shared/lib/interfaces';
import { defaultKeyTransparencyState } from '@proton/shared/lib/keyTransparency';
export interface KTContext {
verifyOutboundPublicKeys: VerifyOutboundPublicKeys;
ktActivation... | 6,335 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/ktStatus.ts | import { KT_DOMAINS, getBaseDomain } from '@proton/key-transparency';
import { isIos11, isSafari11 } from '@proton/shared/lib/helpers/browser';
export enum KtFeatureEnum {
DISABLE,
ENABLE_CORE,
ENABLE_UI,
}
export type KT_FF = KtFeatureEnum | undefined;
export const isKTActive = (feature: KT_FF) => {
... | 6,336 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useGetLatestEpoch.ts | import { useCallback } from 'react';
import { getPromiseValue } from '@proton/components/hooks/useCachedModelResult';
import { fetchLatestEpoch } from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import { HOUR } from '@proton/shared/lib/constants';
import ... | 6,337 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useKTActivation.ts | import { useEffect, useState } from 'react';
import { APPS, APP_NAMES } from '@proton/shared/lib/constants';
import { KeyTransparencyActivation, MailSettings } from '@proton/shared/lib/interfaces';
import { KEY_TRANSPARENCY_SETTING } from '@proton/shared/lib/mail/mailSettings';
import { useAuthentication, useConfig, ... | 6,338 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useKTVerifier.ts | import { useRef } from 'react';
import { serverTime } from '@proton/crypto';
import {
commitSKLToLS,
fetchSignedKeyLists,
getKTLocalStorage,
ktSentryReport,
ktSentryReportError,
} from '@proton/key-transparency';
import {
Address,
Api,
DecryptedKey,
KeyTransparencyActivation,
Ke... | 6,339 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useKeyMigrationKTVerifier.ts | import { KeyMigrationKTVerifier } from '@proton/shared/lib/interfaces';
import useApi from '../../hooks/useApi';
import createKeyMigrationKTVerifier from './createKeyMigrationKTVerifier';
import useKTActivation from './useKTActivation';
const useKeyMigrationKTVerifier = () => {
const ktActivation = useKTActivatio... | 6,340 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useKeyTransparencyContext.ts | import { createContext, useContext } from 'react';
import { KTContext, defaultKTContext } from './ktContext';
export const KeyTransparencyContext = createContext<KTContext>(defaultKTContext);
export const useKeyTransparencyContext = () => useContext(KeyTransparencyContext);
| 6,341 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useReportSelfAuditErrors.ts | import { useCallback } from 'react';
import { AddressAuditStatus, SelfAuditResult, ktSentryReport } from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import {
TelemetryKeyTransparencyErrorEvents,
TelemetryMeasurementGroups,
TelemetryReport,
} f... | 6,342 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useResetSelfAudit.ts | import {
VerifiedEpoch,
fetchLatestEpoch,
ktSentryReportError,
uploadVerifiedEpoch,
} from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import { getIsAddressDisabled } from '@proton/shared/lib/helpers/address';
import { Address, KeyTranspare... | 6,343 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useResignSKLWithPrimaryKey.ts | import {
fetchSignedKeyLists,
fetchVerifiedEpoch,
ktSentryReportError,
updateSignedKeyListSignature,
verifySKLSignature,
} from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import {
KeyTransparencyActivation,
ResignSKLWithPrimary... | 6,344 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useRunSelfAudit.ts | import { useCallback } from 'react';
import { CryptoProxy, serverTime } from '@proton/crypto';
import {
SelfAuditResult,
StaleEpochError,
getAuditResult,
getKTLocalStorage,
getSelfAuditInterval,
ktSentryReportError,
selfAudit,
storeAuditResult,
} from '@proton/key-transparency/lib';
imp... | 6,345 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useSaveSKLToLS.ts | import { CryptoProxy, serverTime } from '@proton/crypto';
import { KTBlobContent, commitSKLToLS, getKTLocalStorage } from '@proton/key-transparency/lib';
import { encodeBase64URL, stringToUint8Array, uint8ArrayToString } from '@proton/shared/lib/helpers/encoding';
import { SaveSKLToLS } from '@proton/shared/lib/interfa... | 6,346 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useUploadMissingSKL.ts | import {
Epoch,
fetchProof,
throwKTError,
updateSignedKeyList,
verifyProofOfAbsenceForAllRevision,
} from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import { Address, SaveSKLToLS, UploadMissingSKL } from '@proton/shared/lib/interfaces'... | 6,347 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keyTransparency/useVerifyOutboundPublicKeys.ts | import { ktSentryReportError, verifyPublicKeysAddressAndCatchall } from '@proton/key-transparency/lib';
import { getSilentApi } from '@proton/shared/lib/api/helpers/customConfig';
import {
FetchedSignedKeyList,
KeyTransparencyActivation,
KeyTransparencyVerificationResult,
ProcessedApiAddressKey,
Ver... | 6,348 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/AddressKeysHeaderActions.tsx | import { ChangeEvent } from 'react';
import { c } from 'ttag';
import { Address } from '@proton/shared/lib/interfaces';
import isTruthy from '@proton/utils/isTruthy';
import { DropdownActions, Select } from '../../components';
interface Props {
addresses: Address[];
addressIndex: number;
onAddKey?: () =... | 6,349 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/AddressKeysSection.tsx | import { ChangeEvent, useEffect, useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { AlgorithmInfo } from '@proton/crypto';
import { EncryptionConfig } from '@proton/shared/lib/interfaces';
import {
OnKeyImportCallback,
addAddressKeysProcess,
deleteAddressKe... | 6,350 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/KeysActions.tsx | import { c } from 'ttag';
import isTruthy from '@proton/utils/isTruthy';
import { DropdownActions } from '../../components';
import { KeyActions } from './shared/interface';
interface Props extends Partial<KeyActions> {
isLoading: boolean;
ID: string;
}
const KeysActions = ({
isLoading,
ID,
onExp... | 6,351 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/KeysStatus.tsx | import { c } from 'ttag';
import { MAIL_APP_NAME } from '@proton/shared/lib/constants';
import isTruthy from '@proton/utils/isTruthy';
import { Badge } from '../../components';
import { KeyStatus, KeyType } from './shared/interface';
const KeysStatus = ({
type,
isPrimary,
isDecrypted,
isCompromised,
... | 6,352 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/KeysTable.tsx | import { c } from 'ttag';
import Copy from '../../components/button/Copy';
import PersonalKeyWarningIcon from '../../components/icon/PersonalKeyWarningIcon';
import { Table, TableBody, TableCell, TableRow } from '../../components/table';
import KeysActions from './KeysActions';
import KeysStatus from './KeysStatus';
i... | 6,353 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/UserKeysSection.tsx | import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { AlgorithmInfo } from '@proton/crypto';
import { EncryptionConfig } from '@proton/shared/lib/interfaces';
import { addUserKeysProcess } from '@proton/shared/lib/keys';
import { Loader, useModalState } from '../../components';
import {
useAp... | 6,354 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/index.ts | export { default as AddressKeysSection } from './AddressKeysSection';
export { default as UserKeysSection } from './UserKeysSection';
export { default as SelectKeyFiles } from './shared/SelectKeyFiles';
| 6,355 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/addKey/AddKeyModal.tsx | import { useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { AlgorithmInfo } from '@proton/crypto';
import { DEFAULT_ENCRYPTION_CONFIG, ENCRYPTION_CONFIGS, ENCRYPTION_TYPES } from '@proton/shared/lib/constants';
import { EncryptionConfig } from '@proton/shared/lib/inter... | 6,356 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/addKey/SelectEncryption.tsx | import { Dispatch, SetStateAction } from 'react';
import { c } from 'ttag';
import { ENCRYPTION_TYPES } from '@proton/shared/lib/constants';
import { Radio, Row } from '../../../components';
const { RSA4096, CURVE25519 } = ENCRYPTION_TYPES;
interface Props {
encryptionType: string;
setEncryptionType: Dispa... | 6,357 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/deleteKey/DeleteKeyModal.tsx | import { useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { useLoading } from '@proton/hooks';
import { BRAND_NAME } from '@proton/shared/lib/constants';
import noop from '@proton/utils/noop';
import { Prompt, PromptProps } from '../../../components';
import { useNoti... | 6,358 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/exportKey/ExportPrivateKeyModal.tsx | import { useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { useLoading } from '@proton/hooks';
import { KEY_FILE_EXTENSION } from '@proton/shared/lib/constants';
import downloadFile from '@proton/shared... | 6,359 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/exportKey/ExportPublicKeyModal.tsx | import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { CryptoProxy, PublicKeyReference } from '@proton/crypto';
import { useLoading } from '@proton/hooks';
import { KEY_FILE_EXTENSION } from '@proton/shared/lib/constants';
import downloadFile from '@proton/shared/lib/helpers/downloadFile';
import n... | 6,360 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/importKeys/ImportKeyModal.tsx | import { useRef, useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { ArmoredKeyWithInfo } from '@proton/shared/lib/keys';
import { OnKeyImportCallback } from '@proton/shared/lib/keys';
import getRandomSt... | 6,361 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/importKeys/ImportKeysList.tsx | import { c } from 'ttag';
import { Badge, LoaderIcon, Table, TableBody, TableHeader, TableRow } from '../../../components';
import { ImportKey, Status } from './interface';
interface Props {
keys: ImportKey[];
}
const ImportKeysList = ({ keys }: Props) => {
const list = keys.map(({ status, fingerprint, resul... | 6,362 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/importKeys/interface.ts | import { PrivateKeyReference } from '@proton/crypto';
export enum Status {
SUCCESS = 1,
LOADING = 2,
ERROR = 3,
}
export interface ImportKey {
id: string;
fingerprint: string;
privateKey: PrivateKeyReference;
status: Status;
result?: 'ok' | Error;
}
| 6,363 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/importKeys/state.ts | import { ImportKey } from './interface';
export const updateKey = (oldKeys: ImportKey[], id: string, newKey: Partial<ImportKey>): ImportKey[] => {
return oldKeys.map((oldKey) => {
if (oldKey.id !== id) {
return oldKey;
}
return { ...oldKey, ...newKey };
});
};
| 6,364 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/KeyUploadContent.tsx | import { ComponentType, Dispatch, ReactNode, SetStateAction, useRef } from 'react';
import { c } from 'ttag';
import { Button, ButtonProps } from '@proton/atoms';
import { CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { ArmoredKeyWithInfo } from '@proton/shared/lib/keys';
import removeItem from '@p... | 6,365 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/ReactivateKeysModal.tsx | import { useEffect, useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { useLoading } from '@proton/hooks';
import { getKeySalts } from '@proton/shared/lib/api/keys';
import { MnemonicKeyResponse, getMnem... | 6,366 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/RecoveryFileTabContent.tsx | import { Dispatch, SetStateAction } from 'react';
import { c } from 'ttag';
import { PrivateKeyReference } from '@proton/crypto';
import { KeyWithRecoverySecret } from '@proton/shared/lib/interfaces';
import KeyUploadContent from './KeyUploadContent';
import SelectRecoveryFiles, { Props as SelectRecoveryFilesProps }... | 6,367 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/SelectRecoveryFiles.tsx | import { ReactNode, Ref, forwardRef, useEffect, useRef } from 'react';
import { c, msgid } from 'ttag';
import { ButtonProps } from '@proton/atoms';
import { useCombinedRefs } from '@proton/hooks';
import { KEY_FILE_EXTENSION } from '@proton/shared/lib/constants';
import { readFileAsString } from '@proton/shared/lib/... | 6,368 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/getAllKeysToReactive.ts | import { Address, DecryptedKey, Key, User } from '@proton/shared/lib/interfaces';
import isTruthy from '@proton/utils/isTruthy';
import { KeyReactivationRequest } from './interface';
const getKeysToReactivate = (Keys: Key[] = [], keys: DecryptedKey[] = []) => {
const set = new Set(keys.map(({ ID }) => ID));
r... | 6,369 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/getLikelyHasKeysToReactivate.ts | import { Address, User } from '@proton/shared/lib/interfaces';
const getLikelyHasKeysToReactivate = (user: User, addresses: Address[]) => {
return (
user?.Keys?.some((Key) => !Key.Active) || addresses?.some((address) => address.Keys?.some((Key) => !Key.Active))
);
};
export default getLikelyHasKeysToR... | 6,370 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/interface.ts | import { Address, DecryptedKey, Key, User } from '@proton/shared/lib/interfaces';
export interface KeyReactivationRequestStateData {
id: string;
Key: Key;
fingerprint: string;
result?: 'ok' | Error;
}
export type KeyReactivationRequestState =
| {
user: User;
address: undefined;... | 6,371 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/reactivateHelper.ts | import { c } from 'ttag';
import { KeySalt } from '@proton/shared/lib/interfaces';
import { decryptPrivateKeyWithSalt, getHasMigratedAddressKey } from '@proton/shared/lib/keys';
import { KeyReactivationData } from '@proton/shared/lib/keys/reactivation/interface';
import { KeyReactivationRequestStateData } from './int... | 6,372 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/reactivateKeys/state.ts | import { CryptoProxy } from '@proton/crypto';
import getRandomString from '@proton/utils/getRandomString';
import { KeyReactivationRequest, KeyReactivationRequestState, KeyReactivationRequestStateData } from './interface';
export const getInitialStates = async (initial: KeyReactivationRequest[]): Promise<KeyReactivat... | 6,373 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/DecryptFileKeyModal.tsx | import { useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { CryptoProxy, PrivateKeyReference } from '@proton/crypto';
import { useLoading } from '@proton/hooks';
import { requiredValidator } from '@proton/shared/lib/helpers/formValidators';
import { ArmoredKeyWithInfo ... | 6,374 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/SelectKeyFiles.tsx | import { ReactNode, Ref, forwardRef, useEffect, useRef } from 'react';
import { c } from 'ttag';
import { ButtonLikeShape } from '@proton/atoms';
import { ThemeColorUnion } from '@proton/colors';
import { useCombinedRefs } from '@proton/hooks';
import { ArmoredKeyWithInfo, parseKeyFiles } from '@proton/shared/lib/key... | 6,375 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/flags.ts | import { KEY_FLAG } from '@proton/shared/lib/constants';
import { clearBit, setBit } from '@proton/shared/lib/helpers/bitset';
import { FlagAction } from './interface';
export const getNewKeyFlags = (Flags = 0, action: FlagAction) => {
if (action === FlagAction.MARK_OBSOLETE) {
return clearBit(Flags, KEY_... | 6,376 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/getDisplayKey.ts | import type { AlgorithmInfo } from '@proton/crypto';
import { KEY_FLAG } from '@proton/shared/lib/constants';
import { hasBit } from '@proton/shared/lib/helpers/bitset';
import { Address, Key, SignedKeyListItem, UserModel } from '@proton/shared/lib/interfaces';
import { SimpleMap } from '@proton/shared/lib/interfaces/u... | 6,377 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/getPermissions.test.ts | import getPermissions from './getPermissions';
describe('getPermissions', () => {
describe('when isForwarding is true', () => {
it('should return the correct permissions', () => {
const permissions = getPermissions({
canModify: false,
isDecrypted: false,
... | 6,378 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/getPermissions.ts | import { KeyStatus } from './interface';
interface Arguments extends KeyStatus {
canModify: boolean;
canEncryptAndSign: boolean;
isAddressKey: boolean;
hasUserPermission: boolean;
canDeleteForwarding: boolean;
}
const getPermissions = ({
canModify,
isDecrypted,
isAddressDisabled,
i... | 6,379 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/helper.ts | export const getKeyByID = <T extends { ID: string }>(keys: T[], ID: string): T | undefined => {
return keys.find(({ ID: otherID }) => otherID === ID);
};
| 6,380 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/interface.ts | import type { AlgorithmInfo } from '@proton/crypto';
export interface KeyPermissions {
canExportPublicKey: boolean;
canExportPrivateKey: boolean;
canSetPrimary: boolean;
canSetObsolete: boolean;
canSetNotObsolete: boolean;
canSetCompromised: boolean;
canSetNotCompromised: boolean;
canDe... | 6,381 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys | petrpan-code/ProtonMail/WebClients/packages/components/containers/keys/shared/useDisplayKeys.ts | import { useEffect, useMemo, useRef, useState } from 'react';
import { AlgorithmInfo, CryptoProxy, PrivateKeyReference, PublicKeyReference } from '@proton/crypto';
import { Address, DecryptedKey, Key, UserModel } from '@proton/shared/lib/interfaces';
import { getParsedSignedKeyList, getSignedKeyListMap } from '@proton... | 6,382 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/ActionsLabel.tsx | import { c } from 'ttag';
import { Label } from '@proton/shared/lib/interfaces/Label';
import { DropdownActions, useModalState } from '../../components';
import DeleteLabelModal from './modals/DeleteLabelModal';
import EditLabelModal from './modals/EditLabelModal';
interface Props {
label: Label;
}
function Act... | 6,383 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/FolderIcon.tsx | import { FolderWithSubFolders } from '@proton/shared/lib/interfaces/Folder';
import { Icon } from '../../components';
import { IconName, IconProps } from '../../components/icon/Icon';
import { useFolderColor } from '../../hooks';
interface Props extends Omit<IconProps, 'name'> {
folder: FolderWithSubFolders;
... | 6,384 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/FolderTreeViewList.tsx | import { DragEvent, useEffect, useRef, useState } from 'react';
import { c } from 'ttag';
import { useLoading } from '@proton/hooks';
import { orderFolders, updateLabel } from '@proton/shared/lib/api/labels';
import { ROOT_FOLDER } from '@proton/shared/lib/constants';
import { getParents, order } from '@proton/shared... | 6,385 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/FoldersSection.tsx | import { c } from 'ttag';
import { Button, Scroll } from '@proton/atoms';
import { useLoading } from '@proton/hooks';
import { orderFolders } from '@proton/shared/lib/api/labels';
import { MAIL_UPSELL_PATHS, ROOT_FOLDER } from '@proton/shared/lib/constants';
import { hasReachedFolderLimit } from '@proton/shared/lib/he... | 6,386 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/LabelSortableItem.tsx | import { Label } from '@proton/shared/lib/interfaces/Label';
import { Icon, OrderableTableRow } from '../../components';
import ActionsLabel from './ActionsLabel';
interface Props {
label: Label;
index: number;
}
function LabelItem({ label, ...rest }: Props) {
const { Name, Color } = label;
return (... | 6,387 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/LabelSortableList.tsx | import { SortableContainerProps } from 'react-sortable-hoc';
import { c } from 'ttag';
import { Scroll } from '@proton/atoms/Scroll';
import { Label } from '@proton/shared/lib/interfaces/Label';
import clsx from '@proton/utils/clsx';
import { Icon, OrderableTable, OrderableTableBody, OrderableTableHeader } from '../... | 6,388 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/LabelsSection.tsx | import { useEffect, useState } from 'react';
import { arrayMove } from 'react-sortable-hoc';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { useLoading } from '@proton/hooks';
import { orderLabels } from '@proton/shared/lib/api/labels';
import { MAIL_UPSELL_PATHS } from '@proton/shared/lib/... | 6,389 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/NewLabelForm.tsx | import { c } from 'ttag';
import { getColorName } from '@proton/shared/lib/colors';
import { LABEL_TYPE } from '@proton/shared/lib/constants';
import { requiredValidator } from '@proton/shared/lib/helpers/formValidators';
import { Folder } from '@proton/shared/lib/interfaces/Folder';
import { Label as tsLabel } from '... | 6,390 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/ParentFolderSelector.tsx | import { c } from 'ttag';
import { ROOT_FOLDER } from '@proton/shared/lib/constants';
import { buildTreeview, formatFolderName } from '@proton/shared/lib/helpers/folder';
import { FolderWithSubFolders } from '@proton/shared/lib/interfaces/Folder';
import { InputFieldTwo, Loader, Option, SelectTwo } from '../../compon... | 6,391 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/ToggleEnableFolderColor.tsx | import { ChangeEvent } from 'react';
import { c } from 'ttag';
import { useLoading } from '@proton/hooks';
import { updateEnableFolderColor } from '@proton/shared/lib/api/mailSettings';
import { Toggle } from '../../components';
import { useApi, useEventManager, useMailSettings, useNotifications } from '../../hooks'... | 6,392 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/ToggleInheritParentFolderColor.tsx | import { ChangeEvent } from 'react';
import { c } from 'ttag';
import { useLoading } from '@proton/hooks';
import { updateInheritParentFolderColor } from '@proton/shared/lib/api/mailSettings';
import { Toggle } from '../../components';
import { useApi, useEventManager, useMailSettings, useNotifications } from '../..... | 6,393 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/ToggleNotify.tsx | import { ChangeEvent } from 'react';
import { c } from 'ttag';
import { useLoading } from '@proton/hooks';
import { updateLabel } from '@proton/shared/lib/api/labels';
import { Folder } from '@proton/shared/lib/interfaces/Folder';
import { Toggle, Tooltip } from '../../components';
import { useApi, useEventManager, ... | 6,394 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/index.ts | export { default as LabelsSection } from './LabelsSection';
export { default as FoldersSection } from './FoldersSection';
export { default as LabelModal } from './modals/EditLabelModal';
export { default as FolderIcon } from './FolderIcon';
| 6,395 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/modals/DeleteLabelModal.tsx | import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { useApi, useEventManager, useNotifications } from '@proton/components/hooks';
import { deleteLabel } from '@proton/shared/lib/api/labels';
import { LABEL_TYPE } from '@proton/shared/lib/constants';
import { Label } from '@proton/shared/lib/inter... | 6,396 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels | petrpan-code/ProtonMail/WebClients/packages/components/containers/labels/modals/EditLabelModal.tsx | import { FormEvent, useEffect, useState } from 'react';
import { c } from 'ttag';
import { Button } from '@proton/atoms';
import { useLoading } from '@proton/hooks';
import { checkLabelAvailability, create as createLabel, updateLabel } from '@proton/shared/lib/api/labels';
import { getRandomAccentColor } from '@proto... | 6,397 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/layout/PrivateMainArea.tsx | import { HTMLAttributes, ReactNode, Ref, forwardRef } from 'react';
import clsx from '@proton/utils/clsx';
import { useTheme } from '../themes';
interface Props extends HTMLAttributes<HTMLDivElement> {
className?: string;
children?: ReactNode;
hasToolbar?: boolean;
hasRowMode?: boolean;
drawerSid... | 6,398 |
0 | petrpan-code/ProtonMail/WebClients/packages/components/containers | petrpan-code/ProtonMail/WebClients/packages/components/containers/layout/PrivateMainAreaLoading.tsx | import {
PrivateMainArea,
SettingsPageTitle,
SettingsParagraph,
SettingsSection,
SettingsSectionTitle,
} from '@proton/components';
const PrivateMainAreaLoading = () => {
return (
<PrivateMainArea>
<div className="container-section-sticky">
<SettingsPageTitle... | 6,399 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.