Changeset d07d68c for pages/forge


Ignore:
Timestamp:
02/19/26 23:17:54 (5 months ago)
Author:
Mihail <mihail2.naumov@…>
Branches:
main
Children:
4f2900a
Parents:
6270fa4
Message:

Fixed clone auth errors and component names in the component dialogs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • pages/forge/+Page.tsx

    r6270fa4 rd07d68c  
    491491
    492492                                <TableCell align="right" width="15%" sx={{verticalAlign: 'top', pt: 2}}>
    493                                     {slot.component && (
    494                                         <Box sx={{
    495                                             display: 'flex',
    496                                             gap: 1,
    497                                             justifyContent: 'flex-end',
    498                                             alignItems: 'center'
    499                                         }}>
    500                                             {(slot.type === 'memory' || slot.type === 'storage') && (
    501                                                 <>
    502                                                     <IconButton
    503                                                         size="small"
    504                                                         color="primary"
    505                                                         onClick={() => handleDecrementComponent(slot.id)}
    506                                                         disabled={(slot.component.quantity || 1) <= 1}
    507                                                         sx={{
    508                                                             bgcolor: 'action.hover',
    509                                                             '&:disabled': {bgcolor: 'action.disabledBackground'}
    510                                                         }}
    511                                                     >
    512                                                         <RemoveIcon/>
    513                                                     </IconButton>
    514 
    515                                                     <Typography
    516                                                         variant="body2"
    517                                                         sx={{
    518                                                             minWidth: '20px',
    519                                                             textAlign: 'center',
    520                                                             fontWeight: 'bold'
    521                                                         }}
    522                                                     >
    523                                                         {slot.component.quantity || 1}
    524                                                     </Typography>
    525 
    526                                                     <IconButton
    527                                                         size="small"
    528                                                         color="primary"
    529                                                         onClick={() => handleIncrementComponent(slot.id)}
    530                                                         sx={{bgcolor: 'action.hover'}}
    531                                                     >
    532                                                         <AddIcon/>
    533                                                     </IconButton>
    534                                                 </>
    535                                             )}
    536 
     493                                    <Box sx={{
     494                                        display: 'flex',
     495                                        gap: 1,
     496                                        justifyContent: 'flex-end',
     497                                        alignItems: 'center'
     498                                    }}>
     499                                        {slot.component && (
     500                                            <>
     501                                                {(slot.type === 'memory' || slot.type === 'storage') && (
     502                                                    <>
     503                                                        <IconButton
     504                                                            size="small"
     505                                                            color="primary"
     506                                                            onClick={() => handleDecrementComponent(slot.id)}
     507                                                            disabled={(slot.component.quantity || 1) <= 1}
     508                                                            sx={{
     509                                                                bgcolor: 'action.hover',
     510                                                                '&:disabled': {bgcolor: 'action.disabledBackground'}
     511                                                            }}
     512                                                        >
     513                                                            <RemoveIcon/>
     514                                                        </IconButton>
     515
     516                                                        <Typography
     517                                                            variant="body2"
     518                                                            sx={{
     519                                                                minWidth: '20px',
     520                                                                textAlign: 'center',
     521                                                                fontWeight: 'bold'
     522                                                            }}
     523                                                        >
     524                                                            {slot.component.quantity || 1}
     525                                                        </Typography>
     526
     527                                                        <IconButton
     528                                                            size="small"
     529                                                            color="primary"
     530                                                            onClick={() => handleIncrementComponent(slot.id)}
     531                                                            sx={{bgcolor: 'action.hover'}}
     532                                                        >
     533                                                            <AddIcon/>
     534                                                        </IconButton>
     535                                                    </>
     536                                                )}
     537
     538                                                <IconButton
     539                                                    color="error"
     540                                                    onClick={() => handleRemovePart(slot.id)}
     541                                                >
     542                                                    <DeleteIcon/>
     543                                                </IconButton>
     544                                            </>
     545                                        )}
     546
     547                                        {!slot.required && (
    537548                                            <IconButton
    538                                                 color="error"
    539                                                 onClick={() => handleRemovePart(slot.id)}
     549                                                color="warning"
     550                                                onClick={() => handleDeleteSlot(slot.id)}
    540551                                            >
    541                                                 <DeleteIcon/>
     552                                                <CloseIcon/>
    542553                                            </IconButton>
    543 
    544                                             {!slot.required && (
    545                                                 <IconButton
    546                                                     color="warning"
    547                                                     onClick={() => handleDeleteSlot(slot.id)}
    548                                                 >
    549                                                     <CloseIcon/>
    550                                                 </IconButton>
    551                                             )}
    552                                         </Box>
    553                                     )}
     554                                        )}
     555                                    </Box>
    554556                                </TableCell>
    555557                            </TableRow>
     
    631633                    disabled={isSubmitting}
    632634                >
    633                     {isSubmitting ? <CircularProgress size={24}/> : 'Submit Build For Review'}
     635                    {isSubmitting ? <CircularProgress size={24}/> : 'Save Build'}
    634636                </Button>
    635637            </Box>
Note: See TracChangeset for help on using the changeset viewer.