diff --git a/crates/handlers/src/oauth2/discovery.rs b/crates/handlers/src/oauth2/discovery.rs
index 56b51af50..3c39a1036 100644
--- a/crates/handlers/src/oauth2/discovery.rs
+++ b/crates/handlers/src/oauth2/discovery.rs
@@ -183,6 +183,7 @@ pub(crate) async fn get(
"org.matrix.sessions_list".to_owned(),
"org.matrix.session_view".to_owned(),
"org.matrix.session_end".to_owned(),
+ "org.matrix.cross_signing_reset".to_owned(),
],
})
}
diff --git a/crates/router/src/endpoints.rs b/crates/router/src/endpoints.rs
index d7807e066..17527b487 100644
--- a/crates/router/src/endpoints.rs
+++ b/crates/router/src/endpoints.rs
@@ -475,6 +475,9 @@ pub enum AccountAction {
OrgMatrixSessionEnd { device_id: String },
#[serde(rename = "session_end")]
SessionEnd { device_id: String },
+
+ #[serde(rename = "org.matrix.cross_signing_reset")]
+ OrgMatrixCrossSigningReset,
}
/// `GET /account/`
diff --git a/frontend/src/components/ButtonLink.tsx b/frontend/src/components/ButtonLink.tsx
new file mode 100644
index 000000000..4a03372eb
--- /dev/null
+++ b/frontend/src/components/ButtonLink.tsx
@@ -0,0 +1,45 @@
+// Copyright 2024 The Matrix.org Foundation C.I.C.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+import { LinkComponent, useLinkProps } from "@tanstack/react-router";
+import { Button } from "@vector-im/compound-web";
+import { forwardRef } from "react";
+
+type Props = {
+ kind?: "primary" | "secondary" | "tertiary";
+ size?: "sm" | "lg";
+ Icon?: React.ComponentType>;
+ destructive?: boolean;
+};
+
+export const ButtonLink: LinkComponent = forwardRef<
+ HTMLAnchorElement,
+ Parameters[0] & Props
+>(({ children, kind, size, destructive, Icon, ...props }, ref) => {
+ const linkProps = useLinkProps(props);
+
+ return (
+
+ );
+}) as LinkComponent;
diff --git a/frontend/src/components/Link/Link.tsx b/frontend/src/components/Link.tsx
similarity index 65%
rename from frontend/src/components/Link/Link.tsx
rename to frontend/src/components/Link.tsx
index 2d6de97f4..07a1d5b47 100644
--- a/frontend/src/components/Link/Link.tsx
+++ b/frontend/src/components/Link.tsx
@@ -14,24 +14,21 @@
import { LinkComponent, useLinkProps } from "@tanstack/react-router";
import { Link as CompoundLink } from "@vector-im/compound-web";
-import cx from "classnames";
import { forwardRef } from "react";
-import styles from "./Link.module.css";
+type Props = {
+ kind?: "primary" | "critical";
+};
-export const Link: LinkComponent = forwardRef<
+export const Link: LinkComponent = forwardRef<
HTMLAnchorElement,
- Parameters[0]
->(({ children, ...props }, ref) => {
- const { className, ...newProps } = useLinkProps(props);
+ Parameters[0] & Props
+>(({ children, kind, ...props }, ref) => {
+ const linkProps = useLinkProps(props);
return (
-
+
+ {children}
+
);
-}) as LinkComponent;
+}) as LinkComponent;
diff --git a/frontend/src/components/Link/Link.module.css b/frontend/src/components/Link/Link.module.css
deleted file mode 100644
index 757988dd8..000000000
--- a/frontend/src/components/Link/Link.module.css
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Copyright 2023 The Matrix.org Foundation C.I.C.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-.link-button {
- display: inline-block;
- text-decoration: underline;
- color: var(--cpd-color-text-primary);
- font-weight: var(--cpd-font-weight-medium);
- border-radius: var(--cpd-radius-pill-effect);
- padding-inline: 0.25rem;
-}
-
-.link-button:hover {
- background: var(--cpd-color-gray-300);
-}
-
-.link-button:active {
- color: var(--cpd-color-text-on-solid-primary);
-}
diff --git a/frontend/src/components/Link/index.ts b/frontend/src/components/Link/index.ts
deleted file mode 100644
index 7389ee401..000000000
--- a/frontend/src/components/Link/index.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-// Copyright 2023 The Matrix.org Foundation C.I.C.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-export { Link } from "./Link";
diff --git a/frontend/src/components/UnverifiedEmailAlert/__snapshots__/UnverifiedEmailAlert.test.tsx.snap b/frontend/src/components/UnverifiedEmailAlert/__snapshots__/UnverifiedEmailAlert.test.tsx.snap
index cb149f96f..3cbca6f8f 100644
--- a/frontend/src/components/UnverifiedEmailAlert/__snapshots__/UnverifiedEmailAlert.test.tsx.snap
+++ b/frontend/src/components/UnverifiedEmailAlert/__snapshots__/UnverifiedEmailAlert.test.tsx.snap
@@ -36,7 +36,7 @@ exports[` > renders a warning when there are unverified
You have 2 unverified email addresses.
= ({ userId }) => {
- const { t } = useTranslation();
- const [result, allowReset] = useMutation(ALLOW_CROSS_SIGING_RESET_MUTATION);
-
- const onClick = (): void => {
- allowReset({ userId });
- };
-
- return (
-
-