Explorar el Código

remove index from ICustomTabContent

Yuki Takei hace 3 años
padre
commit
4ef3f4dcf5

+ 0 - 2
apps/app/src/components/Admin/Notification/NotificationSetting.jsx

@@ -126,12 +126,10 @@ function NotificationSetting(props) {
       user_trigger_notification: {
         Icon: () => <i className="icon-settings" />,
         i18n: 'User trigger notification',
-        index: 0,
       },
       global_notification: {
         Icon: () => <i className="icon-settings" />,
         i18n: 'Global notification',
-        index: 1,
       },
     };
   }, []);

+ 0 - 7
apps/app/src/components/Admin/Security/SecurityManagementContents.jsx

@@ -32,37 +32,30 @@ const SecurityManagementContents = () => {
       passport_local: {
         Icon: () => <i className="fa fa-users" />,
         i18n: 'ID/Pass',
-        index: 0,
       },
       passport_ldap: {
         Icon: () => <i className="fa fa-sitemap" />,
         i18n: 'LDAP',
-        index: 1,
       },
       passport_saml: {
         Icon: () => <i className="fa fa-key" />,
         i18n: 'SAML',
-        index: 2,
       },
       passport_oidc: {
         Icon: () => <i className="fa fa-key" />,
         i18n: 'OIDC',
-        index: 3,
       },
       passport_google: {
         Icon: () => <i className="fa fa-google" />,
         i18n: 'Google',
-        index: 4,
       },
       passport_github: {
         Icon: () => <i className="fa fa-github" />,
         i18n: 'GitHub',
-        index: 5,
       },
       // passport_facebook: {
       //   Icon: () => <i className="fa fa-facebook" />,
       //   i18n: '(TBD) Facebook',
-      //   index: 7,
       // },
     };
   }, []);

+ 0 - 2
apps/app/src/components/DescendantsPageListModal.tsx

@@ -54,7 +54,6 @@ export const DescendantsPageListModal = (): JSX.Element => {
           return <DescendantsPageList path={status.path} />;
         },
         i18n: t('page_list'),
-        index: 0,
         isLinkEnabled: () => !isSharedUser,
       },
       timeline: {
@@ -66,7 +65,6 @@ export const DescendantsPageListModal = (): JSX.Element => {
           return <PageTimeline />;
         },
         i18n: t('Timeline View'),
-        index: 1,
         isLinkEnabled: () => !isSharedUser,
       },
     };

+ 0 - 2
apps/app/src/components/InAppNotification/InAppNotificationPage.tsx

@@ -127,13 +127,11 @@ export const InAppNotificationPage: FC = () => {
       Icon: () => <></>,
       Content: () => InAppNotificationCategoryByStatus(),
       i18n: t('in_app_notification.all'),
-      index: 0,
     },
     external_accounts: {
       Icon: () => <></>,
       Content: () => InAppNotificationCategoryByStatus(InAppNotificationStatuses.STATUS_UNOPENED),
       i18n: t('in_app_notification.unopend'),
-      index: 1,
     },
   };
 

+ 5 - 11
apps/app/src/components/Me/PersonalSettings.jsx

@@ -23,37 +23,31 @@ const PersonalSettings = () => {
         Icon: () => <i className="icon-fw icon-user"></i>,
         Content: UserSettings,
         i18n: t('User Information'),
-        index: 0,
       },
       external_accounts: {
         Icon: () => <i className="icon-fw icon-share-alt"></i>,
         Content: ExternalAccountLinkedMe,
         i18n: t('admin:user_management.external_accounts'),
-        index: 1,
       },
       password_settings: {
         Icon: () => <i className="icon-fw icon-lock"></i>,
         Content: PasswordSettings,
         i18n: t('Password Settings'),
-        index: 2,
       },
       api_settings: {
         Icon: () => <i className="icon-fw icon-paper-plane"></i>,
         Content: ApiSettings,
         i18n: t('API Settings'),
-        index: 3,
-      },
-      editor_settings: {
-        Icon: () => <i className="icon-fw icon-pencil"></i>,
-        Content: EditorSettings,
-        i18n: t('editor_settings.editor_settings'),
-        index: 4,
       },
+      // editor_settings: {
+      //   Icon: () => <i className="icon-fw icon-pencil"></i>,
+      //   Content: EditorSettings,
+      //   i18n: t('editor_settings.editor_settings'),
+      // },
       in_app_notification_settings: {
         Icon: () => <i className="icon-fw icon-bell"></i>,
         Content: InAppNotificationSettings,
         i18n: t('in_app_notification_settings.in_app_notification_settings'),
-        index: 5,
       },
     };
   }, [t]);

+ 0 - 2
apps/app/src/components/NotFoundPage.tsx

@@ -24,13 +24,11 @@ const NotFoundPage = (props: NotFoundPageProps): JSX.Element => {
         Icon: PageListIcon,
         Content: () => <DescendantsPageList path={path} />,
         i18n: t('page_list'),
-        index: 0,
       },
       timeLine: {
         Icon: TimeLineIcon,
         Content: PageTimeline,
         i18n: t('Timeline View'),
-        index: 1,
       },
     };
   }, [path, t]);

+ 0 - 3
apps/app/src/components/PageAccessoriesModal.tsx

@@ -78,7 +78,6 @@ const PageAccessoriesModal = (): JSX.Element => {
           return <PageHistory onClose={close} sourceRevisionId={sourceRevisionId} targetRevisionId={targetRevisionId}/>;
         },
         i18n: t('History'),
-        index: 0,
         isLinkEnabled: () => !isGuestUser && !isSharedUser,
       },
       [PageAccessoriesModalContents.Attachment]: {
@@ -87,7 +86,6 @@ const PageAccessoriesModal = (): JSX.Element => {
           return <PageAttachment />;
         },
         i18n: t('attachment_data'),
-        index: 1,
       },
       [PageAccessoriesModalContents.ShareLink]: {
         Icon: ShareLinkIcon,
@@ -95,7 +93,6 @@ const PageAccessoriesModal = (): JSX.Element => {
           return <ShareLink />;
         },
         i18n: t('share_links.share_link_management'),
-        index: 2,
         isLinkEnabled: () => !isGuestUser && !isSharedUser && !isLinkSharingDisabled,
       },
     };

+ 0 - 2
apps/app/src/components/PageComment/CommentEditor.tsx

@@ -36,12 +36,10 @@ const navTabMapping = {
   comment_editor: {
     Icon: () => <i className="icon-settings" />,
     i18n: 'Write',
-    index: 0,
   },
   comment_preview: {
     Icon: () => <i className="icon-settings" />,
     i18n: 'Preview',
-    index: 1,
   },
 };
 

+ 0 - 1
apps/app/src/components/TrashPageList.tsx

@@ -87,7 +87,6 @@ export const TrashPageList = (): JSX.Element => {
         Icon: PageListIcon,
         Content: DescendantsPageListForTrash,
         i18n: t('page_list'),
-        index: 0,
       },
     };
   }, [t]);

+ 0 - 1
apps/app/src/interfaces/ui.ts

@@ -14,7 +14,6 @@ export type ICustomTabContent = {
   Content: () => JSX.Element,
   i18n?: string,
   Icon?: () => JSX.Element,
-  index?: number,
   isLinkEnabled?: boolean | ((content: ICustomTabContent) => boolean),
 };
 

+ 0 - 2
apps/app/src/pages/installer.page.tsx

@@ -46,13 +46,11 @@ const InstallerPage: NextPage<Props> = (props: Props) => {
         Icon: () => <i className="icon-fw icon-user"></i>,
         Content: InstallerForm,
         i18n: t('installer.tab'),
-        index: 0,
       },
       external_accounts: {
         Icon: () => <i className="icon-fw icon-share-alt"></i>,
         Content: DataTransferForm,
         i18n: tCommons('g2g_data_transfer.tab'),
-        index: 1,
       },
     };
   }, [t, tCommons]);