Browse Source

fix(settings): Add page titles to user notifications, others (#49973)

Scott Cooper 1 year ago
parent
commit
76d69d5231

+ 5 - 1
static/app/views/settings/account/accountClose.tsx

@@ -85,6 +85,10 @@ class AccountClose extends AsyncView<Props, State> {
       ?.map(({organization}) => organization.slug);
   }
 
+  getTitle() {
+    return t('Close Account');
+  }
+
   handleChange = (
     {slug}: Organization,
     isSingle: boolean,
@@ -149,7 +153,7 @@ class AccountClose extends AsyncView<Props, State> {
 
     return (
       <div>
-        <SettingsPageHeader title="Close Account" />
+        <SettingsPageHeader title={this.getTitle()} />
 
         <TextBlock>
           {t('This will permanently remove all associated data for your user')}.

+ 2 - 0
static/app/views/settings/account/accountDetails.tsx

@@ -3,6 +3,7 @@ import {APIRequestMethod} from 'sentry/api';
 import AvatarChooser from 'sentry/components/avatarChooser';
 import Form, {FormProps} from 'sentry/components/forms/form';
 import JsonForm from 'sentry/components/forms/jsonForm';
+import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
 import accountDetailsFields from 'sentry/data/forms/accountDetails';
 import accountPreferencesFields from 'sentry/data/forms/accountPreferences';
 import {t} from 'sentry/locale';
@@ -42,6 +43,7 @@ class AccountDetails extends AsyncView {
 
     return (
       <div>
+        <SentryDocumentTitle title={t('Account Details')} />
         <SettingsPageHeader title={t('Account Details')} />
         <Form initialData={user} {...formCommonProps}>
           <JsonForm forms={accountDetailsFields} additionalFieldProps={{user}} />

+ 2 - 2
static/app/views/settings/account/apiTokens.tsx

@@ -26,7 +26,7 @@ type State = {
 
 export class ApiTokens extends AsyncView<Props, State> {
   getTitle() {
-    return t('API Tokens');
+    return t('Auth Tokens');
   }
 
   getDefaultState() {
@@ -85,7 +85,7 @@ export class ApiTokens extends AsyncView<Props, State> {
 
     return (
       <div>
-        <SettingsPageHeader title="Auth Tokens" action={action} />
+        <SettingsPageHeader title={this.getTitle()} action={action} />
         <AlertLink
           to={`/settings/${organization?.slug ?? ''}/developer-settings/new-internal`}
         >

+ 6 - 2
static/app/views/settings/account/notifications/notificationSettings.tsx

@@ -7,6 +7,7 @@ import JsonForm from 'sentry/components/forms/jsonForm';
 import FormModel from 'sentry/components/forms/model';
 import {FieldObject} from 'sentry/components/forms/types';
 import Link from 'sentry/components/links/link';
+import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
 import {IconMail} from 'sentry/icons';
 import {t} from 'sentry/locale';
 import {Organization} from 'sentry/types';
@@ -185,8 +186,11 @@ class NotificationSettings extends AsyncComponent<Props, State> {
   renderBody() {
     return (
       <Fragment>
-        <SettingsPageHeader title="Notifications" />
-        <TextBlock>Personal notifications sent by email or an integration.</TextBlock>
+        <SentryDocumentTitle title={t('Notifications')} />
+        <SettingsPageHeader title={t('Notifications')} />
+        <TextBlock>
+          {t('Personal notifications sent by email or an integration.')}
+        </TextBlock>
         <Form
           model={this.model}
           saveOnBlur

+ 2 - 0
static/app/views/settings/account/notifications/notificationSettingsByType.tsx

@@ -4,6 +4,7 @@ import AsyncComponent from 'sentry/components/asyncComponent';
 import Form from 'sentry/components/forms/form';
 import JsonForm from 'sentry/components/forms/jsonForm';
 import {Field} from 'sentry/components/forms/types';
+import SentryDocumentTitle from 'sentry/components/sentryDocumentTitle';
 import {t} from 'sentry/locale';
 import {Organization, OrganizationSummary} from 'sentry/types';
 import {OrganizationIntegration} from 'sentry/types/integrations';
@@ -326,6 +327,7 @@ class NotificationSettingsByType extends AsyncComponent<Props, State> {
     const {title, description} = ACCOUNT_NOTIFICATION_FIELDS[notificationType];
     return (
       <Fragment>
+        <SentryDocumentTitle title={title} />
         <SettingsPageHeader title={title} />
         {description && <TextBlock>{description}</TextBlock>}
         {hasSlack && unlinkedOrgs.length > 0 && (