diff options
author | Kristóf Marussy <kristof@marussy.com> | 2023-09-13 01:33:37 +0200 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2023-09-13 01:33:37 +0200 |
commit | c06ddefbebea9b589384729829b494094f00bbe3 (patch) | |
tree | ca8e1214f7c984a49ab539800e931be829729a63 /subprojects | |
parent | fix: multi-objects with lower bound of 1 (diff) | |
download | refinery-c06ddefbebea9b589384729829b494094f00bbe3.tar.gz refinery-c06ddefbebea9b589384729829b494094f00bbe3.tar.zst refinery-c06ddefbebea9b589384729829b494094f00bbe3.zip |
refactor(frontend): generation appearance fixes
* Allow scrolling the tab bar.
* Less prominent error text.
Diffstat (limited to 'subprojects')
-rw-r--r-- | subprojects/frontend/src/ModelWorkArea.tsx | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/subprojects/frontend/src/ModelWorkArea.tsx b/subprojects/frontend/src/ModelWorkArea.tsx index 3aba31e3..16e16a97 100644 --- a/subprojects/frontend/src/ModelWorkArea.tsx +++ b/subprojects/frontend/src/ModelWorkArea.tsx | |||
@@ -45,11 +45,6 @@ const GenerationStatus = styled('div', { | |||
45 | shouldForwardProp: (prop) => prop !== 'error', | 45 | shouldForwardProp: (prop) => prop !== 'error', |
46 | })<{ error: boolean }>(({ error, theme }) => ({ | 46 | })<{ error: boolean }>(({ error, theme }) => ({ |
47 | color: error ? theme.palette.error.main : theme.palette.text.primary, | 47 | color: error ? theme.palette.error.main : theme.palette.text.primary, |
48 | ...(error | ||
49 | ? { | ||
50 | fontWeight: theme.typography.fontWeightBold ?? 600, | ||
51 | } | ||
52 | : {}), | ||
53 | })); | 48 | })); |
54 | 49 | ||
55 | const GeneratedModelPane = observer(function GeneratedModelPane({ | 50 | const GeneratedModelPane = observer(function GeneratedModelPane({ |
@@ -165,6 +160,8 @@ function ModelWorkArea(): JSX.Element { | |||
165 | editorStore.selectGeneratedModel(generatedModelNames[value - 1]); | 160 | editorStore.selectGeneratedModel(generatedModelNames[value - 1]); |
166 | } | 161 | } |
167 | }} | 162 | }} |
163 | variant="scrollable" | ||
164 | scrollButtons="auto" | ||
168 | sx={{ flexGrow: 1 }} | 165 | sx={{ flexGrow: 1 }} |
169 | > | 166 | > |
170 | <Tab label="Initial model" /> | 167 | <Tab label="Initial model" /> |
@@ -175,10 +172,8 @@ function ModelWorkArea(): JSX.Element { | |||
175 | onClick={() => | 172 | onClick={() => |
176 | editorStore.deleteGeneratedModel(selectedGeneratedModel) | 173 | editorStore.deleteGeneratedModel(selectedGeneratedModel) |
177 | } | 174 | } |
178 | sx={{ | 175 | disabled={selectedIndex === 0} |
179 | display: selectedIndex === 0 ? 'none' : 'flex', | 176 | sx={{ mx: 1 }} |
180 | mx: 1, | ||
181 | }} | ||
182 | > | 177 | > |
183 | <CloseIcon fontSize="small" /> | 178 | <CloseIcon fontSize="small" /> |
184 | </IconButton> | 179 | </IconButton> |