element-web-synapse01pim.gr.jp

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

2600.js.map (4857B)


      1 {"version":3,"file":"bundles/78cd486dc4f7ffb56898/2600.js","mappings":"ozBAoCe,SAASA,GAAwBC,WAAEA,IAC9C,MAAMC,GAAeC,EAAAA,EAAAA,OACdC,EAAoBC,IAAyBC,EAAAA,EAAAA,WAAS,GAmB7D,OAlBAC,EAAAA,EAAAA,WAAU,KACqBC,WACvB,MAAMC,EAASP,EAAaQ,YAC5BL,EAAsBM,QAAQF,GAA6D,aAA5CA,EAAOG,mCAG1DC,IACD,CAACX,IAYAY,EAAAA,cAACC,EAAAA,EAAU,CACPC,UAAU,2BACVf,WAAYA,EACZgB,MACIH,EAAAA,cAAA,QAAME,UAAU,kCACZF,EAAAA,cAACI,EAAAA,EAAS,OACTC,EAAAA,EAAAA,IAAG,mDAIZL,EAAAA,cAAA,UAAIK,EAAAA,EAAAA,IAAG,0DACNf,GAAsBU,EAAAA,cAAA,UAAIK,EAAAA,EAAAA,IAAG,0DAC9BL,EAAAA,cAAA,UAAQE,UAAU,YAAWG,EAAAA,EAAAA,IAAG,oDAChCL,EAAAA,cAACM,EAAAA,EAAa,CACVC,eAAeF,EAAAA,EAAAA,IAAG,gCAClBG,qBAzBZ,WACI,GAAIlB,EACAH,QACG,CACH,MAAMsB,SAAEA,GAAaC,EAAAA,GAAMC,aAAaC,EAAAA,EAAwB,CAAC,OAAGC,GAAW,GAAO,GACtFJ,EAASK,KAAK3B,EAClB,CACJ,EAmBY4B,cAAcV,EAAAA,EAAAA,IAAG,yBACjBW,SAAUA,KACN7B,IACA8B,EAAAA,EAAIC,KAAKC,EAAAA,EAAOC,qBAKpC","sources":["webpack://element-web/./src/async-components/views/dialogs/security/NewRecoveryMethodDialog.tsx"],"sourcesContent":["/*\nCopyright 2024 New Vector Ltd.\nCopyright 2020 The Matrix.org Foundation C.I.C.\nCopyright 2018, 2019 New Vector Ltd\n\nSPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial\nPlease see LICENSE files in the repository root for full details.\n*/\n\nimport React, { type JSX, useEffect, useState } from \"react\";\nimport { ErrorIcon } from \"@vector-im/compound-design-tokens/assets/web/icons\";\n\nimport dis from \"../../../../dispatcher/dispatcher\";\nimport { _t } from \"../../../../languageHandler\";\nimport Modal from \"../../../../Modal\";\nimport RestoreKeyBackupDialog from \"../../../../components/views/dialogs/security/RestoreKeyBackupDialog\";\nimport { Action } from \"../../../../dispatcher/actions\";\nimport DialogButtons from \"../../../../components/views/elements/DialogButtons\";\nimport BaseDialog from \"../../../../components/views/dialogs/BaseDialog\";\nimport { useMatrixClientContext } from \"../../../../contexts/MatrixClientContext.tsx\";\n\n/**\n * Properties for {@link NewRecoveryMethodDialog}.\n */\ninterface NewRecoveryMethodDialogProps {\n    /**\n     * Callback when the dialog is dismissed.\n     */\n    onFinished(this: void): void;\n}\n\n// Export as default instead of a named export so that it can be dynamically imported with React lazy\n\n/**\n * Dialog to inform the user that a new recovery method has been detected.\n */\nexport default function NewRecoveryMethodDialog({ onFinished }: NewRecoveryMethodDialogProps): JSX.Element {\n    const matrixClient = useMatrixClientContext();\n    const [isKeyBackupEnabled, setIsKeyBackupEnabled] = useState(false);\n    useEffect(() => {\n        const checkBackupEnabled = async (): Promise<void> => {\n            const crypto = matrixClient.getCrypto();\n            setIsKeyBackupEnabled(Boolean(crypto && (await crypto.getActiveSessionBackupVersion()) !== null));\n        };\n\n        checkBackupEnabled();\n    }, [matrixClient]);\n\n    function onClick(): void {\n        if (isKeyBackupEnabled) {\n            onFinished();\n        } else {\n            const { finished } = Modal.createDialog(RestoreKeyBackupDialog, {}, undefined, false, true);\n            finished.then(onFinished);\n        }\n    }\n\n    return (\n        <BaseDialog\n            className=\"mx_KeyBackupFailedDialog\"\n            onFinished={onFinished}\n            title={\n                <span className=\"mx_KeyBackupFailedDialog_title\">\n                    <ErrorIcon />\n                    {_t(\"encryption|new_recovery_method_detected|title\")}\n                </span>\n            }\n        >\n            <p>{_t(\"encryption|new_recovery_method_detected|description_1\")}</p>\n            {isKeyBackupEnabled && <p>{_t(\"encryption|new_recovery_method_detected|description_2\")}</p>}\n            <strong className=\"warning\">{_t(\"encryption|new_recovery_method_detected|warning\")}</strong>\n            <DialogButtons\n                primaryButton={_t(\"common|setup_secure_messages\")}\n                onPrimaryButtonClick={onClick}\n                cancelButton={_t(\"common|go_to_settings\")}\n                onCancel={() => {\n                    onFinished();\n                    dis.fire(Action.ViewUserSettings);\n                }}\n            />\n        </BaseDialog>\n    );\n}\n"],"names":["NewRecoveryMethodDialog","onFinished","matrixClient","useMatrixClientContext","isKeyBackupEnabled","setIsKeyBackupEnabled","useState","useEffect","async","crypto","getCrypto","Boolean","getActiveSessionBackupVersion","checkBackupEnabled","React","BaseDialog","className","title","ErrorIcon","_t","DialogButtons","primaryButton","onPrimaryButtonClick","finished","Modal","createDialog","RestoreKeyBackupDialog","undefined","then","cancelButton","onCancel","dis","fire","Action","ViewUserSettings"],"sourceRoot":""}