Remove Piwik support (#8835)
* Remove all mentions of Piwik * Kill off all consumer of the old Piwik Analytics module * Simplify ModalManager interface * i18n * Attempt to fix old e2e tests * Remove unused component * Iterate PR
This commit is contained in:
parent
7d14d15ba6
commit
3c5c2bef6d
142 changed files with 446 additions and 1412 deletions
|
@ -15,14 +15,13 @@ limitations under the License.
|
|||
*/
|
||||
|
||||
import React from "react";
|
||||
import { Optional } from "matrix-events-sdk";
|
||||
|
||||
import BaseDialog from "./BaseDialog";
|
||||
import { _t } from "../../../languageHandler";
|
||||
import DialogButtons from "../elements/DialogButtons";
|
||||
import Modal from "../../../Modal";
|
||||
import SdkConfig from "../../../SdkConfig";
|
||||
import { SnakedObject } from "../../../utils/SnakedObject";
|
||||
import { getPolicyUrl } from "../../../toasts/AnalyticsToast";
|
||||
|
||||
export enum ButtonClicked {
|
||||
Primary,
|
||||
|
@ -98,19 +97,13 @@ const AnalyticsLearnMoreDialog: React.FC<IProps> = ({
|
|||
};
|
||||
|
||||
export const showDialog = (props: Omit<IProps, "cookiePolicyUrl" | "analyticsOwner">): void => {
|
||||
const piwikConfig = SdkConfig.get("piwik");
|
||||
let privacyPolicyUrl: Optional<string>;
|
||||
if (piwikConfig && typeof piwikConfig === "object") {
|
||||
privacyPolicyUrl = (new SnakedObject(piwikConfig)).get("policy_url");
|
||||
}
|
||||
const privacyPolicyUrl = getPolicyUrl();
|
||||
const analyticsOwner = SdkConfig.get("analytics_owner") ?? SdkConfig.get("brand");
|
||||
Modal.createTrackedDialog(
|
||||
"Analytics Learn More",
|
||||
"",
|
||||
AnalyticsLearnMoreDialog,
|
||||
{ privacyPolicyUrl, analyticsOwner, ...props },
|
||||
"mx_AnalyticsLearnMoreDialog_wrapper",
|
||||
);
|
||||
Modal.createDialog(AnalyticsLearnMoreDialog, {
|
||||
privacyPolicyUrl,
|
||||
analyticsOwner,
|
||||
...props,
|
||||
}, "mx_AnalyticsLearnMoreDialog_wrapper");
|
||||
};
|
||||
|
||||
export default AnalyticsLearnMoreDialog;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue