Просмотр исходного кода

imprv #128932: Change button positions
- Delete unused menu.
- Add Trash menu to sidebar primary item.
- Move admin setting icon.

Tatsuya Ise 2 лет назад
Родитель
Сommit
9cd230ddcf
2 измененных файлов с 3 добавлено и 6 удалено
  1. 2 6
      apps/app/src/components/Sidebar/SidebarNav.tsx
  2. 1 0
      apps/app/src/interfaces/ui.ts

+ 2 - 6
apps/app/src/components/Sidebar/SidebarNav.tsx

@@ -119,22 +119,18 @@ export const SidebarNav: FC<Props> = (props: Props) => {
         <PrimaryItem contents={SidebarContentsType.TREE} label="Page Tree" iconName="format_list_bulleted" onItemSelected={onItemSelected} />
         <PrimaryItem contents={SidebarContentsType.CUSTOM} label="Custom Sidebar" iconName="code" onItemSelected={onItemSelected} />
         <PrimaryItem contents={SidebarContentsType.RECENT} label="Recent Changes" iconName="update" onItemSelected={onItemSelected} />
-        {/* <PrimaryItem id="favorite" label="Favorite" iconName="icon-star" /> */}
-        {/* eslint-enable max-len */}
         <PrimaryItem contents={SidebarContentsType.BOOKMARKS} label="Bookmarks" iconName="bookmark" onItemSelected={onItemSelected} />
-        {/* <PrimaryItem id="tag" label="Tags" iconName="icon-tag" /> */}
-        {/* <PrimaryItem id="favorite" label="Favorite" iconName="fa fa-bookmark-o" /> */}
         <PrimaryItem contents={SidebarContentsType.TAG} label="Tags" iconName="local_offer" onItemSelected={onItemSelected} />
+        <PrimaryItem contents={SidebarContentsType.TRASH} label="Trash" iconName="delete" />
       </div>
       <div className="grw-sidebar-nav-secondary-container">
         <AppearanceModeDropdown isAuthenticated={isAuthenticated} />
         <PersonalDropdown />
         <InAppNotificationDropdown />
 
-        {isAdmin && <SecondaryItem label="Admin" iconName="settings" href="/admin" />}
         {/* <SecondaryItem label="Draft" iconName="file_copy" href="/me/drafts" /> */}
         <SecondaryItem label="Help" iconName="help" href={growiCloudUri != null ? 'https://growi.cloud/help/' : 'https://docs.growi.org'} isBlank />
-        <SecondaryItem label="Trash" iconName="delete" href="/trash" />
+        {isAdmin && <SecondaryItem label="Admin" iconName="settings" href="/admin" />}
       </div>
     </div>
   );

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

@@ -6,6 +6,7 @@ export const SidebarContentsType = {
   TREE: 'tree',
   TAG: 'tag',
   BOOKMARKS: 'bookmarks',
+  TRASH: 'TRASH',
 } as const;
 export const AllSidebarContentsType = Object.values(SidebarContentsType);
 export type SidebarContentsType = typeof SidebarContentsType[keyof typeof SidebarContentsType];