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

Commitea1b03f

Browse files
chore: Remove FE dead code (#5760)
1 parenta13614e commitea1b03f

File tree

39 files changed

+62
-616
lines changed

39 files changed

+62
-616
lines changed

‎site/e2e/constants.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,4 @@ export const basePort = 3000
55
// Credentials for the default user when running in dev mode.
66
exportconstusername="developer"
77
exportconstpassword="password"
8-
exportconstorganization="acme-corp"
98
exportconstemail="admin@coder.com"

‎site/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
"test":"jest --selectProjects test",
2424
"test:coverage":"jest --selectProjects test --collectCoverage",
2525
"test:watch":"jest --selectProjects test --watch",
26-
"typegen":"xstate typegen 'src/**/*.ts'"
26+
"typegen":"xstate typegen 'src/**/*.ts'",
27+
"deadcode":"ts-prune | grep -v\".stories\\|.typegen\\|.config\\|e2e\\|__mocks__\\|used in module\\|testHelpers\\|typesGenerated\" || echo\"No deadcode found.\""
2728
},
2829
"dependencies": {
2930
"@emoji-mart/data":"1.0.5",
@@ -68,6 +69,7 @@
6869
"react-syntax-highlighter":"15.5.0",
6970
"remark-gfm":"3.0.1",
7071
"sourcemapped-stacktrace":"1.1.11",
72+
"ts-prune":"0.10.3",
7173
"tzdata":"1.0.30",
7274
"ua-parser-js":"1.0.2",
7375
"uuid":"9.0.0",

‎site/src/api/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
importaxios,{AxiosError,AxiosResponse}from"axios"
22

3-
exportconstLanguage={
3+
constLanguage={
44
errorsByCode:{
55
defaultErrorCode:"Invalid value",
66
},

‎site/src/components/AppLink/AppLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { generateRandomString } from "../../util/random"
1010
import{BaseIcon}from"./BaseIcon"
1111
import{ShareIcon}from"./ShareIcon"
1212

13-
exportconstLanguage={
13+
constLanguage={
1414
appTitle:(appName:string,identifier:string):string=>
1515
`${appName} -${identifier}`,
1616
}

‎site/src/components/AppLink/AppLinkSkeleton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export const AppLinkSkeleton: FC<{ width: number }> = ({ width }) => {
1515
)
1616
}
1717

18-
exportconstuseStyles=makeStyles(()=>({
18+
constuseStyles=makeStyles(()=>({
1919
skeleton:{
2020
borderRadius:borderRadiusSm,
2121
},

‎site/src/components/AppLink/AppPreviewLink.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as TypesGen from "api/typesGenerated"
55
import{BaseIcon}from"./BaseIcon"
66
import{ShareIcon}from"./ShareIcon"
77

8-
exportinterfaceAppPreviewProps{
8+
interfaceAppPreviewProps{
99
app:TypesGen.WorkspaceApp
1010
}
1111

‎site/src/components/DeploySettingsLayout/Badges.tsx

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -40,17 +40,6 @@ export const EnterpriseBadge: FC = () => {
4040
)
4141
}
4242

43-
exportconstVersionBadge:FC<{
44-
version:string
45-
}>=({ version})=>{
46-
conststyles=useStyles()
47-
return(
48-
<spanclassName={combineClasses([styles.badge,styles.versionBadge])}>
49-
Version:{version}
50-
</span>
51-
)
52-
}
53-
5443
exportconstBadges:FC<PropsWithChildren>=({ children})=>{
5544
conststyles=useStyles()
5645
return(

‎site/src/components/Dialogs/Dialog.tsx

Lines changed: 0 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
importMuiDialog,{
22
DialogPropsasMuiDialogProps,
33
}from"@material-ui/core/Dialog"
4-
importMuiDialogTitlefrom"@material-ui/core/DialogTitle"
54
import{alpha,darken,lighten,makeStyles}from"@material-ui/core/styles"
6-
importSvgIconfrom"@material-ui/core/SvgIcon"
75
import*asReactfrom"react"
86
import{combineClasses}from"../../util/combineClasses"
97
import{
@@ -12,66 +10,6 @@ import {
1210
}from"../LoadingButton/LoadingButton"
1311
import{ConfirmDialogType}from"./types"
1412

15-
exportinterfaceDialogTitleProps{
16-
/** Title for display */
17-
title:React.ReactNode
18-
/** Optional icon to display faded to the right of the title */
19-
icon?:typeofSvgIcon
20-
/** Smaller text to display above the title */
21-
superTitle?:React.ReactNode
22-
}
23-
24-
/**
25-
* Override of Material UI's DialogTitle that allows for a supertitle and background icon
26-
*/
27-
exportconstDialogTitle:React.FC<DialogTitleProps>=({
28-
title,
29-
icon:Icon,
30-
superTitle,
31-
})=>{
32-
conststyles=useTitleStyles()
33-
return(
34-
<MuiDialogTitledisableTypography>
35-
<divclassName={styles.titleWrapper}>
36-
{superTitle&&<divclassName={styles.superTitle}>{superTitle}</div>}
37-
<divclassName={styles.title}>{title}</div>
38-
</div>
39-
{Icon&&<IconclassName={styles.icon}/>}
40-
</MuiDialogTitle>
41-
)
42-
}
43-
44-
constuseTitleStyles=makeStyles(
45-
(theme)=>({
46-
title:{
47-
position:"relative",
48-
zIndex:2,
49-
fontSize:theme.typography.h3.fontSize,
50-
fontWeight:theme.typography.h3.fontWeight,
51-
lineHeight:"40px",
52-
display:"flex",
53-
alignItems:"center",
54-
},
55-
superTitle:{
56-
position:"relative",
57-
zIndex:2,
58-
fontSize:theme.typography.body2.fontSize,
59-
fontWeight:500,
60-
letterSpacing:1.5,
61-
textTransform:"uppercase",
62-
},
63-
titleWrapper:{
64-
padding:`${theme.spacing(2)}px 0`,
65-
},
66-
icon:{
67-
height:84,
68-
width:84,
69-
color:alpha(theme.palette.action.disabled,0.4),
70-
},
71-
}),
72-
{name:"CdrDialogTitle"},
73-
)
74-
7513
exportinterfaceDialogActionButtonsProps{
7614
/** Text to display in the cancel button */
7715
cancelText?:string

‎site/src/components/FormDropdownField/FormDropdownField.tsx

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

‎site/src/components/FormSection/FormSection.tsx

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

‎site/src/components/FormTextField/FormTextField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { PasswordField } from "../PasswordField/PasswordField"
66
/**
77
* FormFieldProps are required props for creating form fields using a factory.
88
*/
9-
exportinterfaceFormFieldProps<T>{
9+
interfaceFormFieldProps<T>{
1010
/**
1111
* form is a reference to a form or subform and is used to compute common
1212
* states such as error and helper text

‎site/src/components/FormTitle/FormTitle.tsx

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

‎site/src/components/Icons/DocsIcon.tsx

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

‎site/src/components/Icons/Logo.tsx

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp