diff --git a/webapp/channels/package.json b/webapp/channels/package.json index 37c7eddc5b..498782e401 100644 --- a/webapp/channels/package.json +++ b/webapp/channels/package.json @@ -178,7 +178,7 @@ "jest-junit": "12.2.0", "jest-styled-components": "7.1.1", "jest-watch-typeahead": "0.6.4", - "mmjstool": "github:mattermost/mattermost-utilities#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "mmjstool": "github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", "nock": "13.2.8", "prettier": "2.3.2", "react-router-enzyme-context": "1.2.0", diff --git a/webapp/channels/src/components/admin_console/__snapshots__/schema_admin_settings.test.jsx.snap b/webapp/channels/src/components/admin_console/__snapshots__/schema_admin_settings.test.jsx.snap index 745c806e1d..ad14dae5ec 100644 --- a/webapp/channels/src/components/admin_console/__snapshots__/schema_admin_settings.test.jsx.snap +++ b/webapp/channels/src/components/admin_console/__snapshots__/schema_admin_settings.test.jsx.snap @@ -44,11 +44,12 @@ exports[`components/admin_console/SchemaAdminSettings should match snapshot with
- + + +
diff --git a/webapp/channels/src/components/admin_console/admin_settings.tsx b/webapp/channels/src/components/admin_console/admin_settings.tsx index 8146a25916..1882c849cf 100644 --- a/webapp/channels/src/components/admin_console/admin_settings.tsx +++ b/webapp/channels/src/components/admin_console/admin_settings.tsx @@ -8,10 +8,10 @@ import {AdminConfig, EnvironmentConfig} from '@mattermost/types/config'; import {DeepPartial} from '@mattermost/types/utilities'; import {localizeMessage} from 'utils/utils'; + import SaveButton from 'components/save_button'; import Tooltip from 'components/tooltip'; import FormError from 'components/form_error'; - import AdminHeader from 'components/widgets/admin_console/admin_header'; export type BaseProps = { diff --git a/webapp/channels/src/components/admin_console/billing/billing_history.tsx b/webapp/channels/src/components/admin_console/billing/billing_history.tsx index f89bf195c6..ce024c9d64 100644 --- a/webapp/channels/src/components/admin_console/billing/billing_history.tsx +++ b/webapp/channels/src/components/admin_console/billing/billing_history.tsx @@ -13,8 +13,8 @@ import {pageVisited, trackEvent} from 'actions/telemetry_actions'; import CloudFetchError from 'components/cloud_fetch_error'; import LoadingSpinner from 'components/widgets/loading/loading_spinner'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; import EmptyBillingHistorySvg from 'components/common/svg_images_components/empty_billing_history_svg'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import {CloudLinks, HostedCustomerLinks} from 'utils/constants'; import ExternalLink from 'components/external_link'; @@ -67,12 +67,15 @@ const BillingHistory = () => { }, [isCloud]); const billingHistoryTable = invoices && ; const areInvoicesEmpty = Object.keys(invoices || {}).length === 0; + return (
- + + +
{invoicesError && } diff --git a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/index.tsx b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/index.tsx index 2f46aeb588..20d095cdd3 100644 --- a/webapp/channels/src/components/admin_console/billing/billing_subscriptions/index.tsx +++ b/webapp/channels/src/components/admin_console/billing/billing_subscriptions/index.tsx @@ -3,22 +3,21 @@ import React, {useEffect, useState} from 'react'; import {useDispatch, useSelector} from 'react-redux'; +import {FormattedMessage} from 'react-intl'; + +import {GlobalState} from '@mattermost/types/store'; import {getCloudSubscription, getCloudProducts, getCloudCustomer} from 'mattermost-redux/actions/cloud'; import {DispatchFunc} from 'mattermost-redux/types/actions'; - -import {pageVisited} from 'actions/telemetry_actions'; - -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; -import CloudTrialBanner from 'components/admin_console/billing/billing_subscriptions/cloud_trial_banner'; -import CloudFetchError from 'components/cloud_fetch_error'; - import { getSubscriptionProduct, getCloudSubscription as selectCloudSubscription, getCloudCustomer as selectCloudCustomer, getCloudErrors, } from 'mattermost-redux/selectors/entities/cloud'; + +import {pageVisited} from 'actions/telemetry_actions'; + import { CloudProducts, RecurringIntervals, @@ -29,18 +28,18 @@ import {hasSomeLimits} from 'utils/limits'; import {getRemainingDaysFromFutureTimestamp} from 'utils/utils'; import {useQuery} from 'utils/http_utils'; +import CloudTrialBanner from 'components/admin_console/billing/billing_subscriptions/cloud_trial_banner'; +import CloudFetchError from 'components/cloud_fetch_error'; import useOpenPricingModal from 'components/common/hooks/useOpenPricingModal'; import useOpenCloudPurchaseModal from 'components/common/hooks/useOpenCloudPurchaseModal'; import useGetLimits from 'components/common/hooks/useGetLimits'; import DeleteWorkspaceCTA from 'components/admin_console/billing//delete_workspace/delete_workspace_cta'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import PlanDetails from '../plan_details'; import BillingSummary from '../billing_summary'; -import {GlobalState} from '@mattermost/types/store'; - import ContactSalesCard from './contact_sales_card'; import Limits from './limits'; - import { creditCardExpiredBanner, paymentFailedBanner, @@ -124,10 +123,12 @@ const BillingSubscriptions = () => { return (
- + + +
{errorLoadingData && } diff --git a/webapp/channels/src/components/admin_console/billing/company_info.tsx b/webapp/channels/src/components/admin_console/billing/company_info.tsx index 4156fff11e..c1f20b0f03 100644 --- a/webapp/channels/src/components/admin_console/billing/company_info.tsx +++ b/webapp/channels/src/components/admin_console/billing/company_info.tsx @@ -3,14 +3,16 @@ import React, {useEffect} from 'react'; import {useDispatch, useSelector} from 'react-redux'; +import {FormattedMessage} from 'react-intl'; import {DispatchFunc} from 'mattermost-redux/types/actions'; import {getCloudCustomer} from 'mattermost-redux/actions/cloud'; import {getCloudErrors} from 'mattermost-redux/selectors/entities/cloud'; import {pageVisited} from 'actions/telemetry_actions'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; + import CloudFetchError from 'components/cloud_fetch_error'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import CompanyInfoDisplay from './company_info_display'; @@ -28,18 +30,15 @@ const CompanyInfo: React.FC = () => { return (
- + + +
{customerError ? : } - { /* Billing Admins section -
- {'Billing Admins Card'} -
- */}
diff --git a/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx b/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx index db4a3da60d..c2445fa428 100644 --- a/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx +++ b/webapp/channels/src/components/admin_console/billing/company_info_edit.tsx @@ -9,14 +9,17 @@ import {useHistory} from 'react-router-dom'; import {getCloudCustomer, updateCloudCustomer, updateCloudCustomerAddress} from 'mattermost-redux/actions/cloud'; +import {GlobalState} from 'types/store'; + +import {COUNTRIES} from 'utils/countries'; +import * as Utils from 'utils/utils'; + import BlockableLink from 'components/admin_console/blockable_link'; import DropdownInput from 'components/dropdown_input'; import StateSelector from 'components/payment_form/state_selector'; import Input from 'components/widgets/inputs/input/input'; import SaveButton from 'components/save_button'; -import {GlobalState} from 'types/store'; -import {COUNTRIES} from 'utils/countries'; -import * as Utils from 'utils/utils'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import {setNavigationBlocked} from 'actions/admin_actions.jsx'; @@ -202,7 +205,7 @@ const CompanyInfoEdit: React.FC = () => { return (
-
+
= () => { defaultMessage='Edit Company Information' />
-
+
diff --git a/webapp/channels/src/components/admin_console/billing/payment_info.tsx b/webapp/channels/src/components/admin_console/billing/payment_info.tsx index 9e0421922a..8f78418b53 100644 --- a/webapp/channels/src/components/admin_console/billing/payment_info.tsx +++ b/webapp/channels/src/components/admin_console/billing/payment_info.tsx @@ -5,15 +5,17 @@ import React, {useEffect, useState} from 'react'; import {useDispatch, useSelector} from 'react-redux'; import {FormattedMessage} from 'react-intl'; +import {GlobalState} from '@mattermost/types/store'; + import {DispatchFunc} from 'mattermost-redux/types/actions'; import {getCloudCustomer} from 'mattermost-redux/actions/cloud'; import {getCloudErrors} from 'mattermost-redux/selectors/entities/cloud'; -import {GlobalState} from '@mattermost/types/store'; import {pageVisited} from 'actions/telemetry_actions'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; + import AlertBanner from 'components/alert_banner'; import CloudFetchError from 'components/cloud_fetch_error'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import PaymentInfoDisplay from './payment_info_display'; @@ -56,10 +58,12 @@ const PaymentInfo: React.FC = () => { return (
- + + +
{showCreditCardBanner && isCardAboutToExpire && ( diff --git a/webapp/channels/src/components/admin_console/billing/payment_info_edit.tsx b/webapp/channels/src/components/admin_console/billing/payment_info_edit.tsx index 98c10a4987..8d2fff2e89 100644 --- a/webapp/channels/src/components/admin_console/billing/payment_info_edit.tsx +++ b/webapp/channels/src/components/admin_console/billing/payment_info_edit.tsx @@ -21,15 +21,17 @@ import {areBillingDetailsValid, BillingDetails} from 'types/cloud/sku'; import {GlobalState} from 'types/store'; import {CloudLinks} from 'utils/constants'; + import BlockableLink from 'components/admin_console/blockable_link'; import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import PaymentForm from 'components/payment_form/payment_form'; import {STRIPE_CSS_SRC, STRIPE_PUBLIC_KEY} from 'components/payment_form/stripe'; import SaveButton from 'components/save_button'; import AlertBanner from 'components/alert_banner'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; +import ExternalLink from 'components/external_link'; import './payment_info_edit.scss'; -import ExternalLink from 'components/external_link'; let stripePromise: Promise; @@ -86,7 +88,7 @@ const PaymentInfoEdit: React.FC = () => { return (
-
+
{ defaultMessage='Edit Payment Information' />
-
+
{showCreditCardWarning && diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap index 9f376b8809..eba2b19e90 100644 --- a/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/data_retention_settings/__snapshots__/data_retention_settings.test.tsx.snap @@ -4,14 +4,12 @@ exports[`components/admin_console/data_retention_settings/data_retention_setting
-
+ -
+
@@ -384,14 +382,12 @@ exports[`components/admin_console/data_retention_settings/data_retention_setting
-
+ -
+
@@ -784,14 +780,12 @@ exports[`components/admin_console/data_retention_settings/data_retention_setting
-
+ -
+
@@ -1179,14 +1173,12 @@ exports[`components/admin_console/data_retention_settings/data_retention_setting
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap index 9066e52e82..445f3e80d7 100644 --- a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/__snapshots__/custom_policy_form.test.tsx.snap @@ -4,8 +4,8 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
-
-
+
@@ -264,8 +264,8 @@ exports[`components/admin_console/data_retention_settings/custom_policy_form sho
-
-
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx index 96d1f534ce..3c29c1bef3 100644 --- a/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx +++ b/webapp/channels/src/components/admin_console/data_retention_settings/custom_policy_form/custom_policy_form.tsx @@ -14,6 +14,8 @@ import {IDMappedObjects} from '@mattermost/types/utilities'; import {ChannelWithTeamData} from '@mattermost/types/channels'; import * as Utils from 'utils/utils'; +import {getHistory} from 'utils/browser_history'; +import {ItemStatus} from 'utils/constants'; import TitleAndButtonCardHeader from 'components/card/title_and_button_card_header/title_and_button_card_header'; import Card from 'components/card/card'; @@ -26,9 +28,7 @@ import SaveButton from 'components/save_button'; import TeamList from 'components/admin_console/data_retention_settings/team_list'; import ChannelList from 'components/admin_console/data_retention_settings/channel_list'; import {keepForeverOption, yearsOption, daysOption, FOREVER, YEARS} from 'components/admin_console/data_retention_settings/dropdown_options/dropdown_options'; - -import {getHistory} from 'utils/browser_history'; -import {ItemStatus} from 'utils/constants'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import './custom_policy_form.scss'; @@ -308,7 +308,7 @@ export default class CustomPolicyForm extends React.PureComponent const {serverError, formErrorText} = this.state; return (
-
+
defaultMessage='Custom Retention Policy' />
-
+
-
+ -
+
-
-
+
diff --git a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx index 596a9d965c..f9d7a7eb2c 100644 --- a/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx +++ b/webapp/channels/src/components/admin_console/data_retention_settings/global_policy_form/global_policy_form.tsx @@ -6,17 +6,19 @@ import {FormattedMessage} from 'react-intl'; import {AdminConfig} from '@mattermost/types/config'; import {DeepPartial} from '@mattermost/types/utilities'; +import {ServerError} from '@mattermost/types/errors'; import * as Utils from 'utils/utils'; +import {getHistory} from 'utils/browser_history'; + import Card from 'components/card/card'; import BlockableLink from 'components/admin_console/blockable_link'; -import {getHistory} from 'utils/browser_history'; import DropdownInputHybrid from 'components/widgets/inputs/dropdown_input_hybrid'; import {keepForeverOption, yearsOption, daysOption, FOREVER, YEARS, DAYS} from 'components/admin_console/data_retention_settings/dropdown_options/dropdown_options'; +import SaveButton from 'components/save_button'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import './global_policy_form.scss'; -import SaveButton from 'components/save_button'; -import {ServerError} from '@mattermost/types/errors'; type ValueType = { label: string | JSX.Element; @@ -145,7 +147,7 @@ export default class GlobalPolicyForm extends React.PureComponent render = () => { return (
-
+
defaultMessage='Global Retention Policy' />
-
+
= (props: Props) => { return (
- + + +
diff --git a/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap index 582e24c7f7..ea62f25171 100644 --- a/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/group_settings/__snapshots__/group_settings.test.tsx.snap @@ -4,14 +4,12 @@ exports[`components/admin_console/group_settings/GroupSettings should match snap
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap index ab876c4b09..c4422e3dc4 100644 --- a/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/group_settings/group_details/__snapshots__/group_details.test.tsx.snap @@ -4,8 +4,8 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
-
-
+
@@ -154,8 +154,8 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
-
-
+
@@ -303,8 +303,8 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
-
-
+
@@ -441,8 +441,8 @@ exports[`components/admin_console/group_settings/group_details/GroupDetails shou
-
-
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx b/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx index e1c066b521..0160a23ea9 100644 --- a/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx +++ b/webapp/channels/src/components/admin_console/group_settings/group_details/group_details.tsx @@ -2,21 +2,8 @@ // See LICENSE.txt for license information. import React from 'react'; - import {FormattedMessage} from 'react-intl'; -import BlockableLink from 'components/admin_console/blockable_link'; -import {GroupProfileAndSettings} from 'components/admin_console/group_settings/group_details/group_profile_and_settings'; -import GroupTeamsAndChannels from 'components/admin_console/group_settings/group_details/group_teams_and_channels'; -import GroupUsers from 'components/admin_console/group_settings/group_details/group_users'; -import SaveChangesPanel from 'components/admin_console/team_channel_settings/save_changes_panel'; -import ChannelSelectorModal from 'components/channel_selector_modal'; -import FormError from 'components/form_error'; -import TeamSelectorModal from 'components/team_selector_modal'; -import AdminPanel from 'components/widgets/admin_console/admin_panel'; -import Menu from 'components/widgets/menu/menu'; -import MenuWrapper from 'components/widgets/menu/menu_wrapper'; -import {ActionResult} from 'mattermost-redux/types/actions'; import {ChannelWithTeamData} from '@mattermost/types/channels'; import { Group, @@ -28,10 +15,24 @@ import { } from '@mattermost/types/groups'; import {Team} from '@mattermost/types/teams'; import {UserProfile} from '@mattermost/types/users'; +import BlockableLink from 'components/admin_console/blockable_link'; import {t} from 'utils/i18n'; import {localizeMessage} from 'utils/utils'; +import {GroupProfileAndSettings} from 'components/admin_console/group_settings/group_details/group_profile_and_settings'; +import GroupTeamsAndChannels from 'components/admin_console/group_settings/group_details/group_teams_and_channels'; +import GroupUsers from 'components/admin_console/group_settings/group_details/group_users'; +import SaveChangesPanel from 'components/admin_console/team_channel_settings/save_changes_panel'; +import ChannelSelectorModal from 'components/channel_selector_modal'; +import FormError from 'components/form_error'; +import TeamSelectorModal from 'components/team_selector_modal'; +import AdminPanel from 'components/widgets/admin_console/admin_panel'; +import Menu from 'components/widgets/menu/menu'; +import MenuWrapper from 'components/widgets/menu/menu_wrapper'; +import {ActionResult} from 'mattermost-redux/types/actions'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; + export type Props = { groupID: string; group: Group; @@ -646,7 +647,7 @@ export default class GroupDetails extends React.PureComponent { return (
-
+
{ defaultMessage='Group Configuration' />
-
+
diff --git a/webapp/channels/src/components/admin_console/group_settings/group_settings.tsx b/webapp/channels/src/components/admin_console/group_settings/group_settings.tsx index f4a5981f47..242ba71149 100644 --- a/webapp/channels/src/components/admin_console/group_settings/group_settings.tsx +++ b/webapp/channels/src/components/admin_console/group_settings/group_settings.tsx @@ -10,6 +10,7 @@ import {getSiteURL} from 'utils/url'; import GroupsList from 'components/admin_console/group_settings/groups_list'; import AdminPanel from 'components/widgets/admin_console/admin_panel'; import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; type Props = { isDisabled?: boolean; @@ -19,13 +20,12 @@ const GroupSettings = ({isDisabled}: Props) => { const siteURL = getSiteURL(); return (
-
+ -
- +
diff --git a/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap index 393b44eff3..b4d480f2ca 100644 --- a/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/license_settings/__snapshots__/license_settings.test.tsx.snap @@ -4,11 +4,12 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen a
- + + +
@@ -108,11 +109,12 @@ exports[`components/admin_console/license_settings/LicenseSettings load screen w
- + + +
@@ -212,11 +214,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -347,11 +350,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -470,11 +474,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -593,11 +598,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -716,11 +722,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -839,11 +846,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -962,11 +970,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1062,11 +1071,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1173,11 +1183,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1284,11 +1295,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1388,11 +1400,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1501,11 +1514,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1597,11 +1611,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
@@ -1704,11 +1719,12 @@ exports[`components/admin_console/license_settings/LicenseSettings should match
- + + +
diff --git a/webapp/channels/src/components/admin_console/license_settings/license_settings.tsx b/webapp/channels/src/components/admin_console/license_settings/license_settings.tsx index 067292faa6..b6bbf59b12 100644 --- a/webapp/channels/src/components/admin_console/license_settings/license_settings.tsx +++ b/webapp/channels/src/components/admin_console/license_settings/license_settings.tsx @@ -2,28 +2,27 @@ // See LICENSE.txt for license information. import React from 'react'; +import {FormattedMessage} from 'react-intl'; + +import {ActionResult} from 'mattermost-redux/types/actions'; import {ClientLicense} from '@mattermost/types/config'; -import {ActionResult} from 'mattermost-redux/types/actions'; import {StatusOK} from '@mattermost/types/client4'; - -import {isLicenseExpired, isLicenseExpiring, isTrialLicense, isEnterpriseOrE20License, licenseSKUWithFirstLetterCapitalized} from 'utils/license_utils'; - -import {trackEvent} from 'actions/telemetry_actions'; - import {GetFilteredUsersStatsOpts, UsersStats} from '@mattermost/types/users'; import {ServerError} from '@mattermost/types/errors'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; -import ExternalLink from 'components/external_link'; - +import {isLicenseExpired, isLicenseExpiring, isTrialLicense, isEnterpriseOrE20License, licenseSKUWithFirstLetterCapitalized} from 'utils/license_utils'; import {AboutLinks, CloudLinks, ModalIdentifiers} from 'utils/constants'; import {ModalData} from 'types/actions'; +import {trackEvent} from 'actions/telemetry_actions'; + +import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; + import RenewLinkCard from './renew_license_card/renew_license_card'; import TrialLicenseCard from './trial_license_card/trial_license_card'; - import TeamEditionLeftPanel from './team_edition/team_edition_left_panel'; import TeamEditionRightPanel from './team_edition/team_edition_right_panel'; import StarterLeftPanel from './starter_edition/starter_left_panel'; @@ -332,11 +331,12 @@ export default class LicenseSettings extends React.PureComponent { return (
- - + + +
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap index 04fe443970..dbdc404b2d 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/__snapshots__/permission_schemes_settings.test.tsx.snap @@ -6,11 +6,12 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
- + + +
@@ -109,11 +110,12 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
- + + +
@@ -190,11 +192,12 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
- + + +
@@ -319,11 +322,12 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
- + + +
@@ -448,11 +452,12 @@ exports[`components/admin_console/permission_schemes_settings/permission_schemes
- + + +
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_schemes_settings.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_schemes_settings.tsx index 2225edd183..207ca283e6 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_schemes_settings.tsx +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_schemes_settings.tsx @@ -3,25 +3,21 @@ import React from 'react'; import {FormattedMessage} from 'react-intl'; - import {RouteComponentProps} from 'react-router-dom'; -import {t} from 'utils/i18n'; -import * as Utils from 'utils/utils'; - -import LoadingScreen from 'components/loading_screen'; -import LoadingWrapper from 'components/widgets/loading/loading_wrapper'; - -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; -import AdminPanelWithLink from 'components/widgets/admin_console/admin_panel_with_link'; - -import {ActionResult} from 'mattermost-redux/types/actions'; - import {Scheme, SchemeScope, SchemesState} from '@mattermost/types/schemes'; -import {LicenseSkus} from 'utils/constants'; +import {ActionResult} from 'mattermost-redux/types/actions'; +import LoadingScreen from 'components/loading_screen'; +import LoadingWrapper from 'components/widgets/loading/loading_wrapper'; +import AdminPanelWithLink from 'components/widgets/admin_console/admin_panel_with_link'; import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; + +import {t} from 'utils/i18n'; +import {LicenseSkus} from 'utils/constants'; +import * as Utils from 'utils/utils'; import PermissionsSchemeSummary from './permissions_scheme_summary'; @@ -222,11 +218,12 @@ export default class PermissionSchemesSettings extends React.PureComponent - - + + +
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap index 28e41accc7..659f86cf79 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/__snapshots__/permission_system_scheme_settings.test.tsx.snap @@ -147,8 +147,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_system_
-
-
+
@@ -457,8 +457,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_system_
-
-
+
@@ -768,8 +768,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_system_
-
-
+
@@ -1079,8 +1079,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_system_
-
-
+
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx index 5077062d95..a80b58d219 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_system_scheme_settings/permission_system_scheme_settings.tsx @@ -4,9 +4,10 @@ import React from 'react'; import {FormattedMessage} from 'react-intl'; -import GeneralConstants from 'mattermost-redux/constants/general'; import {ClientConfig, ClientLicense} from '@mattermost/types/config'; import {Role} from '@mattermost/types/roles'; + +import GeneralConstants from 'mattermost-redux/constants/general'; import {ActionResult} from 'mattermost-redux/types/actions'; import {PermissionsScope, DefaultRolePermissions} from 'utils/constants'; @@ -19,11 +20,12 @@ import LoadingScreen from 'components/loading_screen'; import FormError from 'components/form_error'; import BlockableLink from 'components/admin_console/blockable_link'; import AdminPanelTogglable from 'components/widgets/admin_console/admin_panel_togglable'; +import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import PermissionsTree, {EXCLUDED_PERMISSIONS} from '../permissions_tree'; import GuestPermissionsTree, {GUEST_INCLUDED_PERMISSIONS} from '../guest_permissions_tree'; import PermissionsTreePlaybooks from '../permissions_tree_playbooks'; -import ExternalLink from 'components/external_link'; type Props = { config: Partial; @@ -351,7 +353,7 @@ export default class PermissionSystemSchemeSettings extends React.PureComponent< const isLicensed = this.props.license?.IsLicensed === 'true'; return (
-
+
-
+
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/__snapshots__/permission_team_scheme_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/__snapshots__/permission_team_scheme_settings.test.tsx.snap index 769a3ccae6..150b7e5576 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/__snapshots__/permission_team_scheme_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/__snapshots__/permission_team_scheme_settings.test.tsx.snap @@ -30,8 +30,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_team_sc
-
-
+
@@ -360,8 +360,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_team_sc
-
-
+
@@ -713,8 +713,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_team_sc
-
-
+
@@ -1134,8 +1134,8 @@ exports[`components/admin_console/permission_schemes_settings/permission_team_sc
-
-
+
diff --git a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx index f30f687406..6a7e39514c 100644 --- a/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx +++ b/webapp/channels/src/components/admin_console/permission_schemes_settings/permission_team_scheme_settings/permission_team_scheme_settings.tsx @@ -5,6 +5,15 @@ import React from 'react'; import {FormattedMessage} from 'react-intl'; import {RouteComponentProps} from 'react-router-dom'; +import {Scheme, SchemePatch} from '@mattermost/types/schemes'; +import {Role} from '@mattermost/types/roles'; +import {ClientConfig, ClientLicense} from '@mattermost/types/config'; +import {Team} from '@mattermost/types/teams'; +import {ServerError} from '@mattermost/types/errors'; + +import {ActionFunc, ActionResult} from 'mattermost-redux/types/actions'; +import GeneralConstants from 'mattermost-redux/constants/general'; + import {PermissionsScope, ModalIdentifiers} from 'utils/constants'; import {localizeMessage} from 'utils/utils'; import {t} from 'utils/i18n'; @@ -17,25 +26,13 @@ import BlockableLink from 'components/admin_console/blockable_link'; import AdminPanel from 'components/widgets/admin_console/admin_panel'; import AdminPanelTogglable from 'components/widgets/admin_console/admin_panel_togglable'; import AdminPanelWithButton from 'components/widgets/admin_console/admin_panel_with_button'; +import LocalizedInput from 'components/localized_input/localized_input'; +import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import PermissionsTree, {EXCLUDED_PERMISSIONS} from '../permissions_tree'; import GuestPermissionsTree, {GUEST_INCLUDED_PERMISSIONS} from '../guest_permissions_tree'; - -import LocalizedInput from 'components/localized_input/localized_input'; - -import {Scheme, SchemePatch} from '@mattermost/types/schemes'; -import {Role} from '@mattermost/types/roles'; -import {ClientConfig, ClientLicense} from '@mattermost/types/config'; -import {Team} from '@mattermost/types/teams'; -import {ActionFunc, ActionResult} from 'mattermost-redux/types/actions'; -import {ServerError} from '@mattermost/types/errors'; - import PermissionsTreePlaybooks from '../permissions_tree_playbooks'; - -import GeneralConstants from 'mattermost-redux/constants/general'; - -import ExternalLink from 'components/external_link'; - import TeamInList from './team_in_list'; type RolesMap = { @@ -591,7 +588,7 @@ export default class PermissionTeamSchemeSettings extends React.PureComponent team.id)} /> } -
+
-
+
diff --git a/webapp/channels/src/components/admin_console/schema_admin_settings.jsx b/webapp/channels/src/components/admin_console/schema_admin_settings.jsx index b35db711ef..f009b24fa3 100644 --- a/webapp/channels/src/components/admin_console/schema_admin_settings.jsx +++ b/webapp/channels/src/components/admin_console/schema_admin_settings.jsx @@ -12,6 +12,7 @@ import * as I18n from 'i18n/i18n.jsx'; import Constants from 'utils/constants'; import {rolesFromMapping, mappingValueFromRoles} from 'utils/policy_roles_adapter'; import * as Utils from 'utils/utils'; + import RequestButton from 'components/admin_console/request_button/request_button'; import BooleanSetting from 'components/admin_console/boolean_setting'; import TextSetting from 'components/admin_console/text_setting'; @@ -30,11 +31,8 @@ import SaveButton from 'components/save_button'; import FormError from 'components/form_error'; import Tooltip from 'components/tooltip'; import WarningIcon from 'components/widgets/icons/fa_warning_icon'; - import FormattedMarkdownMessage from 'components/formatted_markdown_message'; - import AdminHeader from 'components/widgets/admin_console/admin_header'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; import Setting from './setting'; @@ -282,10 +280,12 @@ export default class SchemaAdminSettings extends React.PureComponent { ); } return ( - + + + ); }; diff --git a/webapp/channels/src/components/admin_console/server_logs/logs.tsx b/webapp/channels/src/components/admin_console/server_logs/logs.tsx index 959ecbc131..4641a392cb 100644 --- a/webapp/channels/src/components/admin_console/server_logs/logs.tsx +++ b/webapp/channels/src/components/admin_console/server_logs/logs.tsx @@ -7,8 +7,6 @@ import {debounce} from 'lodash'; import {ActionFunc} from 'mattermost-redux/types/actions'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; - import { LogFilter, LogLevels, @@ -16,6 +14,8 @@ import { LogServerNames, } from '@mattermost/types/admin'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; + import LogList from './log_list'; import PlainLogList from './plain_log_list'; @@ -196,11 +196,12 @@ export default class Logs extends React.PureComponent { ); return (
- - + + +
{content} diff --git a/webapp/channels/src/components/admin_console/system_roles/__snapshots__/system_roles.test.tsx.snap b/webapp/channels/src/components/admin_console/system_roles/__snapshots__/system_roles.test.tsx.snap index 15a50741a0..41c87934f3 100644 --- a/webapp/channels/src/components/admin_console/system_roles/__snapshots__/system_roles.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/system_roles/__snapshots__/system_roles.test.tsx.snap @@ -4,11 +4,12 @@ exports[`admin_console/system_roles should match snapshot 1`] = `
- + + +
diff --git a/webapp/channels/src/components/admin_console/system_roles/system_role/__snapshots__/system_role.test.tsx.snap b/webapp/channels/src/components/admin_console/system_roles/system_role/__snapshots__/system_role.test.tsx.snap index c4f9532f57..8a76e1b03e 100644 --- a/webapp/channels/src/components/admin_console/system_roles/system_role/__snapshots__/system_role.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/system_roles/system_role/__snapshots__/system_role.test.tsx.snap @@ -4,8 +4,8 @@ exports[`admin_console/system_role should match snapshot 1`] = `
-
-
+
@@ -69,8 +69,8 @@ exports[`admin_console/system_role should match snapshot with isLicensedForCloud
-
-
+
diff --git a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role.tsx b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role.tsx index 5a897a299f..955ed17fcf 100644 --- a/webapp/channels/src/components/admin_console/system_roles/system_role/system_role.tsx +++ b/webapp/channels/src/components/admin_console/system_roles/system_role/system_role.tsx @@ -6,21 +6,21 @@ import {FormattedMessage} from 'react-intl'; import {uniq, difference} from 'lodash'; import {Role} from '@mattermost/types/roles'; -import {Client4} from 'mattermost-redux/client'; - import {UserProfile} from '@mattermost/types/users'; -import {ActionResult} from 'mattermost-redux/types/actions'; +import {Client4} from 'mattermost-redux/client'; +import {ActionResult} from 'mattermost-redux/types/actions'; import Permissions from 'mattermost-redux/constants/permissions'; +import {isError} from 'types/actions'; + import Constants from 'utils/constants'; import {getHistory} from 'utils/browser_history'; import FormError from 'components/form_error'; import BlockableLink from 'components/admin_console/blockable_link'; import SaveChangesPanel from 'components/admin_console/team_channel_settings/save_changes_panel'; - -import {isError} from 'types/actions'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import SystemRoleUsers from './system_role_users'; import SystemRolePermissions from './system_role_permissions'; @@ -243,7 +243,7 @@ export default class SystemRole extends React.PureComponent { const defaultName = role.name.split('').map((r) => r.charAt(0).toUpperCase() + r.slice(1)).join(' '); return (
-
+
{ defaultMessage={defaultName} />
-
+
; @@ -42,8 +44,6 @@ const columns: Column[] = [ }, ]; -import './system_roles.scss'; - export default class SystemRoles extends React.PureComponent { render() { const {roles} = this.props; @@ -78,11 +78,12 @@ export default class SystemRoles extends React.PureComponent { return (
- - + + +
-
-
+
@@ -240,8 +240,8 @@ exports[`components/admin_console/system_user_detail should match snapshot if LD
-
-
+
@@ -478,8 +478,8 @@ exports[`components/admin_console/system_user_detail should match snapshot if MF
-
-
+
@@ -722,8 +722,8 @@ exports[`components/admin_console/system_user_detail should match snapshot if SA
-
-
+
@@ -960,8 +960,8 @@ exports[`components/admin_console/system_user_detail should match snapshot if no
-
-
+
@@ -1196,8 +1196,8 @@ exports[`components/admin_console/system_user_detail should match snapshot if us
-
-
+
diff --git a/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx b/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx index bd2ca80a73..d87225f3d3 100644 --- a/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx +++ b/webapp/channels/src/components/admin_console/system_user_detail/system_user_detail.tsx @@ -9,9 +9,7 @@ import {Overlay} from 'react-bootstrap'; import {isEmail} from 'mattermost-redux/utils/helpers'; import {Team, TeamMembership} from '@mattermost/types/teams'; - import {UserProfile} from '@mattermost/types/users'; - import {ServerError} from '@mattermost/types/errors'; import {adminResetMfa, adminResetEmail} from 'actions/admin_actions.jsx'; @@ -30,11 +28,11 @@ import SaveButton from 'components/save_button'; import FormError from 'components/form_error'; import TeamSelectorModal from 'components/team_selector_modal'; import Tooltip from 'components/tooltip'; - import TeamList from 'components/admin_console/system_user_detail/team_list'; import EmailIcon from 'components/widgets/icons/email_icon'; import AtIcon from 'components/widgets/icons/at_icon'; import SheidOutlineIcon from 'components/widgets/icons/shield_outline_icon'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import './system_user_detail.scss'; @@ -365,7 +363,7 @@ export default class SystemUserDetail extends React.PureComponent -
+
-
+
- + + /> +
diff --git a/webapp/channels/src/components/admin_console/system_users/system_users.tsx b/webapp/channels/src/components/admin_console/system_users/system_users.tsx index 89c1b56d6f..a80472501e 100644 --- a/webapp/channels/src/components/admin_console/system_users/system_users.tsx +++ b/webapp/channels/src/components/admin_console/system_users/system_users.tsx @@ -6,24 +6,24 @@ import {FormattedMessage} from 'react-intl'; import {debounce} from 'mattermost-redux/actions/helpers'; import {Permissions} from 'mattermost-redux/constants'; - import {ActionFunc} from 'mattermost-redux/types/actions'; + import {ServerError} from '@mattermost/types/errors'; import {Team} from '@mattermost/types/teams'; - import {GetFilteredUsersStatsOpts, UserProfile, UsersStats} from '@mattermost/types/users'; +import {emitUserLoggedOutEvent} from 'actions/global_actions'; + import {Constants, UserSearchOptions, SearchUserTeamFilter, UserFilters} from 'utils/constants'; import * as Utils from 'utils/utils'; import {t} from 'utils/i18n'; import {getUserOptionsFromFilter, searchUserOptionsFromFilter} from 'utils/filter_users'; import LocalizedInput from 'components/localized_input/localized_input'; -import FormattedAdminHeader from 'components/widgets/admin_console/formatted_admin_header'; import FormattedMarkdownMessage from 'components/formatted_markdown_message'; import SystemPermissionGate from 'components/permissions_gates/system_permission_gate'; import ConfirmModal from 'components/confirm_modal'; -import {emitUserLoggedOutEvent} from 'actions/global_actions'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import SystemUsersList from './list'; @@ -370,14 +370,15 @@ export default class SystemUsers extends React.PureComponent { return (
- - + + +
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/__snapshots__/channel_settings.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/__snapshots__/channel_settings.test.tsx.snap index 543a05bb8b..49a8222c51 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/__snapshots__/channel_settings.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/__snapshots__/channel_settings.test.tsx.snap @@ -4,9 +4,7 @@ exports[`admin_console/team_channel_settings/channel/ChannelSettings should matc
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/channel_settings.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/channel/channel_settings.tsx index 87b9e2fe36..34b714ae0f 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/channel_settings.tsx +++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/channel_settings.tsx @@ -7,6 +7,7 @@ import {FormattedMessage} from 'react-intl'; import {t} from 'utils/i18n'; import ChannelsList from 'components/admin_console/team_channel_settings/channel/list'; import AdminPanel from 'components/widgets/admin_console/admin_panel'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; interface Props { siteName?: string; @@ -31,13 +32,13 @@ export class ChannelsSettings extends React.PureComponent { render = () => { return (
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap index e3753cd076..6f5e4b3581 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/__snapshots__/channel_details.test.tsx.snap @@ -4,8 +4,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
@@ -191,8 +191,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
@@ -374,8 +374,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
@@ -513,8 +513,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
@@ -648,8 +648,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
@@ -787,8 +787,8 @@ exports[`admin_console/team_channel_settings/channel/ChannelDetails should match
-
-
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_details.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_details.tsx index 7f7205d121..b07880f8a3 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_details.tsx +++ b/webapp/channels/src/components/admin_console/team_channel_settings/channel/details/channel_details.tsx @@ -7,20 +7,23 @@ import {cloneDeep} from 'lodash'; import {Permissions} from 'mattermost-redux/constants'; import {ActionFunc, ActionResult} from 'mattermost-redux/types/actions'; + import {UserProfile} from '@mattermost/types/users'; import {Scheme} from '@mattermost/types/schemes'; import {SyncablePatch, Group, SyncableType} from '@mattermost/types/groups'; import {Channel, ChannelModeration as ChannelPermissions, ChannelModerationPatch} from '@mattermost/types/channels'; import {Team} from '@mattermost/types/teams'; - import {ServerError} from '@mattermost/types/errors'; +import {trackEvent} from 'actions/telemetry_actions.jsx'; + import ConfirmModal from 'components/confirm_modal'; import BlockableLink from 'components/admin_console/blockable_link'; import FormError from 'components/form_error'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; + import Constants from 'utils/constants'; import {getHistory} from 'utils/browser_history'; -import {trackEvent} from 'actions/telemetry_actions.jsx'; import {NeedGroupsError, UsersWillBeRemovedError} from '../../errors'; import ConvertConfirmModal from '../../convert_confirm_modal'; @@ -779,7 +782,7 @@ export default class ChannelDetails extends React.PureComponent -
+
-
+
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap index d5856ead49..a751385253 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap +++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/__snapshots__/team_details.test.tsx.snap @@ -4,8 +4,8 @@ exports[`admin_console/team_channel_settings/team/TeamDetails should match snaps
-
-
+
@@ -110,8 +110,8 @@ exports[`admin_console/team_channel_settings/team/TeamDetails should match snaps
-
-
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_details.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_details.tsx index 03a8314afd..a913f19a5c 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_details.tsx +++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/details/team_details.tsx @@ -14,9 +14,11 @@ import {ActionResult} from 'mattermost-redux/types/actions'; import {getHistory} from 'utils/browser_history'; import {trackEvent} from 'actions/telemetry_actions.jsx'; + import BlockableLink from 'components/admin_console/blockable_link'; import ConfirmModal from 'components/confirm_modal'; import FormError from 'components/form_error'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import RemoveConfirmModal from '../../remove_confirm_modal'; import {NeedDomainsError, NeedGroupsError, UsersWillBeRemovedError} from '../../errors'; @@ -494,7 +496,7 @@ export default class TeamDetails extends React.PureComponent { return (
-
+
{ defaultMessage='Team Configuration' />
-
+
diff --git a/webapp/channels/src/components/admin_console/team_channel_settings/team/team_settings.tsx b/webapp/channels/src/components/admin_console/team_channel_settings/team/team_settings.tsx index ef5107fe14..6dad191d4e 100644 --- a/webapp/channels/src/components/admin_console/team_channel_settings/team/team_settings.tsx +++ b/webapp/channels/src/components/admin_console/team_channel_settings/team/team_settings.tsx @@ -7,6 +7,7 @@ import {FormattedMessage} from 'react-intl'; import {t} from 'utils/i18n'; import TeamList from 'components/admin_console/team_channel_settings/team/list'; import AdminPanel from 'components/widgets/admin_console/admin_panel'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; type Props = { siteName: string; @@ -15,13 +16,13 @@ type Props = { export function TeamsSettings(props: Props) { return (
-
+ -
+
diff --git a/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.tsx b/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.tsx index 2409601512..339540a66c 100644 --- a/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.tsx +++ b/webapp/channels/src/components/admin_console/workspace-optimization/dashboard.tsx @@ -1,17 +1,18 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import {CheckIcon} from '@mattermost/compass-icons/components'; -import classNames from 'classnames'; - import React from 'react'; import styled from 'styled-components'; +import classNames from 'classnames'; +import {FormattedMessage} from 'react-intl'; + +import {CheckIcon} from '@mattermost/compass-icons/components'; import Accordion, {AccordionItemType} from 'components/common/accordion/accordion'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import LoadingScreen from '../../loading_screen'; -import FormattedAdminHeader from '../../widgets/admin_console/formatted_admin_header'; -import {Props} from '../admin_console'; +import type {Props} from '../admin_console'; import ChipsList, {ChipsInfoType} from './chips_list'; import CtaButtons from './cta_buttons'; @@ -121,10 +122,12 @@ const WorkspaceOptimizationDashboard = (props: Props) => { return loading || !accordionItemsData ? : (
- + + +
{ return (
- + + +
{banner} diff --git a/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx b/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx index 532002b35d..fa43e0581b 100644 --- a/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx +++ b/webapp/channels/src/components/analytics/team_analytics/team_analytics.tsx @@ -12,9 +12,7 @@ import {UserProfile} from '@mattermost/types/users'; import {ClientLicense} from '@mattermost/types/config'; import LoadingScreen from 'components/loading_screen'; - import FormattedMarkdownMessage from 'components/formatted_markdown_message'; - import * as AdminActions from 'actions/admin_actions'; import {StatTypes} from 'utils/constants'; import Banner from 'components/admin_console/banner'; @@ -23,11 +21,12 @@ import StatisticCount from 'components/analytics/statistic_count'; import TableChart from 'components/analytics/table_chart'; import {ActivatedUserCard} from 'components/analytics/activated_users_card'; import TrueUpReview from 'components/analytics/true_up_review'; +import ExternalLink from 'components/external_link'; +import AdminHeader from 'components/widgets/admin_console/admin_header'; import {getMonthLong} from 'utils/i18n'; import {formatPostsPerDayData, formatUsersWithPostsPerDayData, synchronizeChartLabels} from '../format'; -import ExternalLink from 'components/external_link'; const LAST_ANALYTICS_TEAM = 'last_analytics_team'; @@ -286,7 +285,7 @@ export default class TeamAnalytics extends React.PureComponent { return (
-
+
{ {teams}
-
+
diff --git a/webapp/channels/src/components/widgets/admin_console/admin_header.test.tsx b/webapp/channels/src/components/widgets/admin_console/admin_header.test.tsx deleted file mode 100644 index 3d191e57a6..0000000000 --- a/webapp/channels/src/components/widgets/admin_console/admin_header.test.tsx +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -/* eslint no-console: 0 */ - -import React from 'react'; -import {shallow} from 'enzyme'; - -import AdminHeader from './admin_header'; - -describe('components/widgets/admin_console/AdminHeader', () => { - test('render component with child', () => { - const wrapper = shallow({'Test'}); - expect(wrapper).toMatchInlineSnapshot(` -
- Test -
-`, - ); - }); -}); diff --git a/webapp/channels/src/components/widgets/admin_console/admin_header.tsx b/webapp/channels/src/components/widgets/admin_console/admin_header.tsx index 0861117bd8..f751287c13 100644 --- a/webapp/channels/src/components/widgets/admin_console/admin_header.tsx +++ b/webapp/channels/src/components/widgets/admin_console/admin_header.tsx @@ -1,18 +1,27 @@ // Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. // See LICENSE.txt for license information. -import React from 'react'; +import React, {ReactNode} from 'react'; +import classNames from 'classnames'; type Props = { - children: JSX.Element[] | JSX.Element | string; + withBackButton?: boolean; + children: ReactNode; }; -export default class AdminHeader extends React.PureComponent { - public render() { - return ( -
- {this.props.children} -
- ); - } -} +const AdminHeader = (props: Props) => { + return ( +
+ {props.children} +
+ ); +}; + +export default AdminHeader; diff --git a/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.test.tsx b/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.test.tsx deleted file mode 100644 index 9b0c72b7a2..0000000000 --- a/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.test.tsx +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import React from 'react'; -import {shallow} from 'enzyme'; - -import FormattedAdminHeader from './formatted_admin_header'; - -describe('components/widgets/admin_console/FormattedAdminHeader', () => { - test('render component with required props', () => { - const wrapper = shallow( - , - ); - expect(wrapper).toMatchInlineSnapshot(` - - - - `); - }); - - test('render component with all props', () => { - const wrapper = shallow( - , - ); - expect(wrapper).toMatchInlineSnapshot(` - - - - `); - }); -}); diff --git a/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.tsx b/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.tsx deleted file mode 100644 index b2d3b761a4..0000000000 --- a/webapp/channels/src/components/widgets/admin_console/formatted_admin_header.tsx +++ /dev/null @@ -1,30 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import React from 'react'; - -import FormattedMarkdownMessage from 'components/formatted_markdown_message'; - -import AdminHeader from './admin_header'; - -type Props = { - id: string; - defaultMessage: string; - values?: any; -}; - -const FormattedAdminHeader: React.FC = (props: Props) => ( - - - -); - -FormattedAdminHeader.defaultProps = { - values: {}, -}; - -export default FormattedAdminHeader; diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 54e97da70b..ae6e747a80 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -4991,7 +4991,6 @@ "status_dropdown.set_online": "Online", "status_dropdown.set_ooo": "Out of Office", "status_dropdown.set_ooo.extra": "Automatic Replies are enabled", - "string.id": "default message", "success_modal.return_to_workspace": "Return to workspace", "success_modal.subtitle": "Your final bill will be prorated. Your workspace now has {plan} limits.", "suggestion_list.no_matches": "No items match __{value}__", diff --git a/webapp/channels/src/sass/routes/_statistics.scss b/webapp/channels/src/sass/routes/_statistics.scss index 8e00df7a27..fd11f63134 100644 --- a/webapp/channels/src/sass/routes/_statistics.scss +++ b/webapp/channels/src/sass/routes/_statistics.scss @@ -142,6 +142,11 @@ } } + .admin-console__header { + align-items: center; + justify-content: space-between; + } + .team-statistics__header-row { align-items: center; justify-content: space-between; diff --git a/webapp/package-lock.json b/webapp/package-lock.json index d1ac02eb65..670a30a598 100644 --- a/webapp/package-lock.json +++ b/webapp/package-lock.json @@ -3552,7 +3552,7 @@ "jest-junit": "12.2.0", "jest-styled-components": "7.1.1", "jest-watch-typeahead": "0.6.4", - "mmjstool": "github:mattermost/mattermost-utilities#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "mmjstool": "github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", "nock": "13.2.8", "prettier": "2.3.2", "react-router-enzyme-context": "1.2.0", @@ -24467,14 +24467,12 @@ }, "node_modules/mmjstool": { "version": "1.0.0", - "resolved": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "resolved": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#e65ab00f22628cbdee736fd2e4f192f07225e82d", "dev": true, "dependencies": { - "@typescript-eslint/typescript-estree": "^5.44.0", "estree-walk": "^2.2.0", "filehound": "^1.17.5", "sort-json": "^2.0.0", - "typescript": "^4.7.4", "webpack-cli": "^4.9.1", "yargs": "^17.3.1" }, @@ -53427,7 +53425,7 @@ "mark.js": "8.11.1", "marked": "github:mattermost/marked#2ef7f28cc7718e3f551c4ce9ea75fdd7580c2008", "memoize-one": "6.0.0", - "mmjstool": "github:mattermost/mattermost-utilities#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "mmjstool": "github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", "moment-timezone": "0.5.38", "nock": "13.2.8", "p-queue": "7.3.0", @@ -54337,15 +54335,13 @@ "dev": true }, "mmjstool": { - "version": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "version": "git+ssh://git@github.com/mattermost/mattermost-utilities.git#e65ab00f22628cbdee736fd2e4f192f07225e82d", "dev": true, - "from": "mmjstool@github:mattermost/mattermost-utilities#1d21e35ca6296ef7b6379b0f214b86ffa6404213", + "from": "mmjstool@github:mattermost/mattermost-utilities#e65ab00f22628cbdee736fd2e4f192f07225e82d", "requires": { - "@typescript-eslint/typescript-estree": "^5.44.0", "estree-walk": "^2.2.0", "filehound": "^1.17.5", "sort-json": "^2.0.0", - "typescript": "^4.7.4", "webpack-cli": "^4.9.1", "yargs": "^17.3.1" },