Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfc67c6e

Browse files
authored
fix: remove unused pages from Admin dropdown (org and settings) (#1788)
* Delete Orgs Page* Delete Admin Settings page
1 parent8f0a5a8 commitfc67c6e

File tree

5 files changed

+0
-66
lines changed

5 files changed

+0
-66
lines changed

‎site/src/AppRouter.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import { NotFoundPage } from "./pages/404Page/404Page"
88
import{CliAuthenticationPage}from"./pages/CliAuthPage/CliAuthPage"
99
import{HealthzPage}from"./pages/HealthzPage/HealthzPage"
1010
import{LoginPage}from"./pages/LoginPage/LoginPage"
11-
import{OrgsPage}from"./pages/OrgsPage/OrgsPage"
12-
import{SettingsPage}from"./pages/SettingsPage/SettingsPage"
1311
import{AccountPage}from"./pages/SettingsPages/AccountPage/AccountPage"
1412
import{SSHKeysPage}from"./pages/SettingsPages/SSHKeysPage/SSHKeysPage"
1513
import{TemplatePage}from"./pages/TemplatePage/TemplatePage"
@@ -134,22 +132,6 @@ export const AppRouter: React.FC = () => (
134132
}
135133
/>
136134
</Route>
137-
<Route
138-
path="orgs"
139-
element={
140-
<AuthAndFrame>
141-
<OrgsPage/>
142-
</AuthAndFrame>
143-
}
144-
/>
145-
<Route
146-
path="settings"
147-
element={
148-
<AuthAndFrame>
149-
<SettingsPage/>
150-
</AuthAndFrame>
151-
}
152-
/>
153135

154136
<Routepath="settings"element={<SettingsLayout/>}>
155137
<Routepath="account"element={<AccountPage/>}/>

‎site/src/components/AdminDropdown/AdminDropdown.test.tsx

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ describe("AdminDropdown", () => {
1414
it("opens the menu",async()=>{
1515
awaitrenderAndClick()
1616
expect(screen.getByText(Language.usersLabel)).toBeDefined()
17-
expect(screen.getByText(Language.orgsLabel)).toBeDefined()
18-
expect(screen.getByText(Language.settingsLabel)).toBeDefined()
1917
})
2018
})
2119

@@ -27,22 +25,4 @@ describe("AdminDropdown", () => {
2725

2826
expect(history.location.pathname).toEqual("/users")
2927
})
30-
31-
it("links to the orgs page",async()=>{
32-
awaitrenderAndClick()
33-
34-
constusersLink=screen.getByText(Language.orgsLabel).closest("a")
35-
usersLink?.click()
36-
37-
expect(history.location.pathname).toEqual("/orgs")
38-
})
39-
40-
it("links to the settings page",async()=>{
41-
awaitrenderAndClick()
42-
43-
constusersLink=screen.getByText(Language.settingsLabel).closest("a")
44-
usersLink?.click()
45-
46-
expect(history.location.pathname).toEqual("/settings")
47-
})
4828
})

‎site/src/components/AdminDropdown/AdminDropdown.tsx

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,17 @@
11
importListItemfrom"@material-ui/core/ListItem"
22
importListItemTextfrom"@material-ui/core/ListItemText"
33
import{fade,makeStyles,Theme}from"@material-ui/core/styles"
4-
importAdminIconfrom"@material-ui/icons/SettingsOutlined"
54
importReact,{useState}from"react"
65
import{navHeight}from"../../theme/constants"
76
import{BorderedMenu}from"../BorderedMenu/BorderedMenu"
87
import{BorderedMenuRow}from"../BorderedMenuRow/BorderedMenuRow"
98
import{CloseDropdown,OpenDropdown}from"../DropdownArrows/DropdownArrows"
10-
import{BuildingIcon}from"../Icons/BuildingIcon"
119
import{UsersOutlinedIcon}from"../Icons/UsersOutlinedIcon"
1210

1311
exportconstLanguage={
1412
menuTitle:"Admin",
1513
usersLabel:"Users",
1614
usersDescription:"Manage users, roles, and permissions.",
17-
orgsLabel:"Organizations",
18-
orgsDescription:"Manage organizations.",
19-
settingsLabel:"Settings",
20-
settingsDescription:"Configure authentication and more.",
2115
}
2216

2317
constentries=[
@@ -27,18 +21,6 @@ const entries = [
2721
path:"/users",
2822
Icon:UsersOutlinedIcon,
2923
},
30-
{
31-
label:Language.orgsLabel,
32-
description:Language.orgsDescription,
33-
path:"/orgs",
34-
Icon:BuildingIcon,
35-
},
36-
{
37-
label:Language.settingsLabel,
38-
description:Language.settingsDescription,
39-
path:"/settings",
40-
Icon:AdminIcon,
41-
},
4224
]
4325

4426
exportconstAdminDropdown:React.FC=()=>{

‎site/src/pages/OrgsPage/OrgsPage.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

‎site/src/pages/SettingsPage/SettingsPage.tsx

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp