kaori 4 лет назад
Родитель
Сommit
1f2db1fe72

+ 2 - 2
packages/app/src/client/app.jsx

@@ -5,7 +5,7 @@ import { I18nextProvider } from 'react-i18next';
 
 import loggerFactory from '~/utils/logger';
 
-import AllInAppNotificationList from '../components/InAppNotification/AllInAppNotificationList';
+import AllInAppNotifications from '../components/InAppNotification/AllInAppNotifications';
 import ErrorBoundary from '../components/ErrorBoudary';
 import Sidebar from '../components/Sidebar';
 import SearchPage from '../components/SearchPage';
@@ -84,7 +84,7 @@ Object.assign(componentMappings, {
   'grw-sidebar-wrapper': <Sidebar />,
 
   'search-page': <SearchPage crowi={appContainer} />,
-  'all-in-app-notification-list': <AllInAppNotificationList />,
+  'all-in-app-notifications': <AllInAppNotifications />,
 
   // 'revision-history': <PageHistory pageId={pageId} />,
   'tags-page': <TagsList crowi={appContainer} />,

+ 0 - 15
packages/app/src/components/InAppNotification/AllInAppNotificationList.tsx

@@ -1,15 +0,0 @@
-import React, { FC } from 'react';
-
-type Props = {
-
-};
-
-const AllInAppNotificationList: FC<Props> = (props: Props) => {
-
-  return (
-    <>AllInAppNotificationList</>
-  );
-};
-
-
-export default AllInAppNotificationList;

+ 15 - 0
packages/app/src/components/InAppNotification/AllInAppNotifications.tsx

@@ -0,0 +1,15 @@
+import React, { FC } from 'react';
+
+type Props = {
+
+};
+
+const AllInAppNotifications: FC<Props> = (props: Props) => {
+
+  return (
+    <>All In App Notifications</>
+  );
+};
+
+
+export default AllInAppNotifications;

+ 1 - 1
packages/app/src/components/InAppNotification/InAppNotificationDropdown.tsx

@@ -157,7 +157,7 @@ const InAppNotificationDropdown: FC<Props> = (props: Props) => {
         <InAppNotificationContents />
         <DropdownItem divider />
         {/* TODO: Able to show all notifications by #79317 */}
-        <a className="dropdown-item d-flex justify-content-center" href="/me/in-app-notification">See All</a>
+        <a className="dropdown-item d-flex justify-content-center" href="/me/all-in-app-notifications">See All</a>
       </DropdownMenu>
     </Dropdown>
   );

+ 1 - 1
packages/app/src/server/routes/in-app-notification.ts → packages/app/src/server/routes/all-in-app-notifications.ts

@@ -5,5 +5,5 @@ import {
 export const list = (req: Request, res: Response): void => {
   console.log('hogehoge');
 
-  return res.render('me/in-app-notification');
+  return res.render('me/all-in-app-notifications');
 };

+ 3 - 3
packages/app/src/server/routes/index.js

@@ -3,7 +3,7 @@ import express from 'express';
 import injectResetOrderByTokenMiddleware from '../middlewares/inject-reset-order-by-token-middleware';
 
 import * as forgotPassword from './forgot-password';
-import * as inAppNotification from './in-app-notification';
+import * as allInAppNotifications from './all-in-app-notifications';
 
 const multer = require('multer');
 const autoReap = require('multer-autoreap');
@@ -135,9 +135,9 @@ module.exports = function(crowi, app) {
   app.get('/admin/*'                       , loginRequiredStrictly ,adminRequired, admin.notFound.index);
 
   app.get('/me'                       , loginRequiredStrictly , me.index);
-  // my in-app-notification
-  app.get('/me/in-app-notification'   , loginRequiredStrictly, inAppNotification.list);
   // external-accounts
+  // my in-app-notification
+  app.get('/me/all-in-app-notifications'   , loginRequiredStrictly, allInAppNotifications.list);
   app.get('/me/external-accounts'                         , loginRequiredStrictly , me.externalAccounts.list);
   // my drafts
   app.get('/me/drafts'                , loginRequiredStrictly, me.drafts.list);

+ 2 - 2
packages/app/src/server/views/me/in-app-notification.html → packages/app/src/server/views/me/all-in-app-notifications.html

@@ -8,7 +8,7 @@
 <header class="py-3">
   <div class="container-fluid">
     <!-- TODO: apply i18n by #80104 -->
-    <h1 class="title">In App Notification List</h1>
+    <h1 class="title">All In-App Notifications</h1>
   </div>
 </header>
 <div id="grw-fav-sticky-trigger" class="sticky-top"></div>
@@ -16,7 +16,7 @@
 
 <div id="main" class="main">
   <div id="content-main" class="content-main grw-container-convertible">
-    <div id="all-in-app-notification-list"></div>
+    <div id="all-in-app-notifications"></div>
   </div>
 </div>
 {% endblock %}