-
Notifications
You must be signed in to change notification settings - Fork 1.1k
feat: main layout revamp #865
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
3526a1a
feat: decouple menu components
amhsirak a515c90
feat: decouple menu components
amhsirak fb7c37d
feat: match proxy layout w new menu layout
amhsirak e1d1004
fix: format
amhsirak 2aa4aff
feat: match api layout w new menu layout
amhsirak 95ac9ce
chore: lint
amhsirak 11fa50f
chore: hidden api key
amhsirak c394198
feat: match robot config layout w new menu layout
amhsirak 75bb63d
chore: lint
amhsirak fbaf588
fix: remove minHeight
amhsirak 5b5aa0d
fix: margins
amhsirak c235ac2
fix: inherit bg for cancel button
amhsirak 56467d5
feat: cleaner UI
amhsirak 3b56d86
feat: reduce width to 230
amhsirak 439a60d
feat: reduce width to 230
amhsirak 5727405
chore: cleanup
amhsirak 1b5a236
feat: match left & right margins
amhsirak 5ab8455
chore: remove unused import
amhsirak 4c5191f
feat: use sidebar layout for main app pages only
amhsirak 8565c36
fix: revert api key hidden
amhsirak 3ca125a
feat: increase side margins of api key table
amhsirak 5a18f61
fix: rename to extracting data
amhsirak File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -156,19 +156,30 @@ const ProxyForm: React.FC = () => { | |
| }, []); | ||
|
|
||
| return ( | ||
| <> | ||
| <FormContainer> | ||
| <Typography variant="h6" gutterBottom component="div" style={{ marginTop: '20px' }}> | ||
| <Box sx={{ | ||
| display: 'flex', | ||
| gap: 4, | ||
| p: 5, | ||
| width: '100%', | ||
| maxWidth: '100%', | ||
| boxSizing: 'border-box' | ||
| }}> | ||
| <Box sx={{ | ||
| flex: 1, | ||
| minWidth: 0, | ||
| maxWidth: 600 | ||
| }}> | ||
| <Typography variant="h6" gutterBottom component="div"> | ||
| {t('proxy.title')} | ||
| </Typography> | ||
| <Tabs value={tabIndex} onChange={handleTabChange} style={{ marginBottom: '10px' }}> | ||
| <Tabs value={tabIndex} onChange={handleTabChange} sx={{ mb: 2 }}> | ||
| <Tab label={t('proxy.tab_standard')} /> | ||
| </Tabs> | ||
|
|
||
| {tabIndex === 0 && ( | ||
| isProxyConfigured ? ( | ||
| <Box sx={{ maxWidth: 600, width: '100%', marginTop: '5px' }}> | ||
| <TableContainer component={Paper} sx={{ marginBottom: '20px' }}> | ||
| <Box sx={{ width: '100%', mt: 1 }}> | ||
| <TableContainer component={Paper} sx={{ mb: 2 }}> | ||
| <Table> | ||
| <TableHead> | ||
| <TableRow> | ||
|
|
@@ -187,13 +198,13 @@ const ProxyForm: React.FC = () => { | |
| <Button variant="outlined" color="primary" onClick={testProxy}> | ||
| {t('proxy.test_proxy')} | ||
| </Button> | ||
| <Button variant="outlined" color="error" onClick={removeProxy} sx={{ marginLeft: '10px' }}> | ||
| <Button variant="outlined" color="error" onClick={removeProxy} sx={{ ml: 1 }}> | ||
| {t('proxy.remove_proxy')} | ||
| </Button> | ||
| </Box> | ||
| ) : ( | ||
| <Box component="form" onSubmit={handleSubmit} sx={{ maxWidth: 500, width: '100%' }}> | ||
| <FormControl> | ||
| <Box component="form" onSubmit={handleSubmit} sx={{ width: '100%' }}> | ||
| <Box sx={{ mb: 2 }}> | ||
| <TextField | ||
| label={t('proxy.server_url')} | ||
| name="server_url" | ||
|
|
@@ -208,16 +219,16 @@ const ProxyForm: React.FC = () => { | |
| </span> | ||
| } | ||
| /> | ||
| </FormControl> | ||
| <FormControl> | ||
| </Box> | ||
| <Box sx={{ mb: 2 }}> | ||
| <FormControlLabel | ||
| control={<Switch checked={requiresAuth} onChange={handleAuthToggle} />} | ||
| label={t('proxy.requires_auth')} | ||
| /> | ||
| </FormControl> | ||
| </Box> | ||
| {requiresAuth && ( | ||
| <> | ||
| <FormControl> | ||
| <Box sx={{ mb: 2 }}> | ||
| <TextField | ||
| label={t('proxy.username')} | ||
| name="username" | ||
|
|
@@ -228,8 +239,8 @@ const ProxyForm: React.FC = () => { | |
| error={!!errors.username} | ||
| helperText={errors.username || ''} | ||
| /> | ||
| </FormControl> | ||
| <FormControl> | ||
| </Box> | ||
| <Box sx={{ mb: 2 }}> | ||
| <TextField | ||
| label={t('proxy.password')} | ||
| name="password" | ||
|
|
@@ -241,7 +252,7 @@ const ProxyForm: React.FC = () => { | |
| error={!!errors.password} | ||
| helperText={errors.password || ''} | ||
| /> | ||
| </FormControl> | ||
| </Box> | ||
| </> | ||
| )} | ||
| <Button | ||
|
|
@@ -255,27 +266,34 @@ const ProxyForm: React.FC = () => { | |
| </Button> | ||
| </Box> | ||
| ))} | ||
| </FormContainer> | ||
| </Box> | ||
|
|
||
| <Alert severity="info" sx={{ marginTop: '80px', marginLeft: '50px', height: '250px', width: '600px' }}> | ||
| <AlertTitle>{t('proxy.alert.title')}</AlertTitle> | ||
| <br /> | ||
| <b>{t('proxy.alert.right_way')}</b> | ||
| <br /> | ||
| {t('proxy.alert.proxy_url')} http://proxy.com:1337 | ||
| <br /> | ||
| {t('proxy.alert.username')} myusername | ||
| <br /> | ||
| {t('proxy.alert.password')} mypassword | ||
| <br /> | ||
| <br /> | ||
| <b>{t('proxy.alert.wrong_way')}</b> | ||
| <br /> | ||
|
|
||
| {t('proxy.alert.proxy_url')} http://myusername:[email protected]:1337 | ||
| </Alert> | ||
| </> | ||
| {/* Instructions Section */} | ||
| <Box sx={{ | ||
| flex: 1, | ||
| minWidth: 0, | ||
| maxWidth: 600 | ||
| }}> | ||
| <Alert severity="info" sx={{ height: 'auto', minHeight: 250 }}> | ||
| <AlertTitle>{t('proxy.alert.title')}</AlertTitle> | ||
| <br /> | ||
| <b>{t('proxy.alert.right_way')}</b> | ||
| <br /> | ||
| {t('proxy.alert.proxy_url')} http://proxy.com:1337 | ||
| <br /> | ||
| {t('proxy.alert.username')} myusername | ||
| <br /> | ||
| {t('proxy.alert.password')} mypassword | ||
| <br /> | ||
| <br /> | ||
| <b>{t('proxy.alert.wrong_way')}</b> | ||
| <br /> | ||
| {t('proxy.alert.proxy_url')} http://myusername:[email protected]:1337 | ||
| </Alert> | ||
| </Box> | ||
| </Box> | ||
| ); | ||
| }; | ||
|
|
||
|
|
||
| export default ProxyForm; | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider using standard MUI spacing values.
The
mt: 1.8value is unusual and deviates from typical Material-UI spacing patterns (which use whole numbers or standard fractions like 0.5, 1.5, 2, etc.). Consider usingmt: 2ormt: 1.5for consistency with MUI design tokens.📝 Committable suggestion
🤖 Prompt for AI Agents