diff --git a/res/css/_components.pcss b/res/css/_components.pcss index c4a5d6a434..552e71675f 100644 --- a/res/css/_components.pcss +++ b/res/css/_components.pcss @@ -324,6 +324,7 @@ @import "./views/toasts/_IncomingCallToast.pcss"; @import "./views/toasts/_NonUrgentEchoFailureToast.pcss"; @import "./views/typography/_Heading.pcss"; +@import "./views/user-onboarding/_UserOnboardingFeedback.pcss"; @import "./views/user-onboarding/_UserOnboardingHeader.pcss"; @import "./views/user-onboarding/_UserOnboardingList.pcss"; @import "./views/user-onboarding/_UserOnboardingPage.pcss"; diff --git a/res/css/views/user-onboarding/_UserOnboardingFeedback.pcss b/res/css/views/user-onboarding/_UserOnboardingFeedback.pcss new file mode 100644 index 0000000000..92aaac2cbd --- /dev/null +++ b/res/css/views/user-onboarding/_UserOnboardingFeedback.pcss @@ -0,0 +1,41 @@ +/* +Copyright 2022 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. +*/ + +.mx_UserOnboardingFeedback { + display: flex; + flex-direction: row; + padding: $spacing-32; + border-radius: 8px; + background: $system; + gap: $spacing-64; + + .mx_UserOnboardingFeedback_content { + display: flex; + flex-direction: column; + margin-right: auto; + gap: 6px; + + .mx_UserOnboardingFeedback_text { + color: $secondary-content; + } + } + + .mx_UserOnboardingFeedback_action.mx_AccessibleButton { + background: transparent; + min-width: 180px; + align-self: center; + } +} diff --git a/src/components/views/user-onboarding/UserOnboardingFeedback.tsx b/src/components/views/user-onboarding/UserOnboardingFeedback.tsx new file mode 100644 index 0000000000..6aabb50f2a --- /dev/null +++ b/src/components/views/user-onboarding/UserOnboardingFeedback.tsx @@ -0,0 +1,54 @@ +/* +Copyright 2022 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 React from "react"; + +import { _t } from "../../../languageHandler"; +import Modal from "../../../Modal"; +import SdkConfig from "../../../SdkConfig"; +import AccessibleButton from "../../views/elements/AccessibleButton"; +import Heading from "../../views/typography/Heading"; +import FeedbackDialog from "../dialogs/FeedbackDialog"; + +export function UserOnboardingFeedback() { + if (!SdkConfig.get().bug_report_endpoint_url) { + return null; + } + + return ( +