Skip to content
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

increase the font of name of headers in detail views #215

Merged
merged 5 commits into from
Sep 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/components/DetailView/DetailBrowser.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@ export const DetailBrowser = <T extends object>() => {
const previousIndex = currentIndex - 1
const style = {
width: '18em',
marginLeft: '2em',
marginLeft: '1em',
overflow: 'hidden',
whiteSpace: 'nowrap',
textOverflow: 'ellipsis',
position: 'relative',
textAlign: 'left',
fontSize: '2.3em',
'&::after': {
content: '""',
position: 'absolute',
Expand All @@ -48,7 +49,6 @@ export const DetailBrowser = <T extends object>() => {
justifyContent: 'center',
height: '100%',
display: 'flex',
fontSize: '18px',
gap: '1em',
}}
>
Expand Down
6 changes: 3 additions & 3 deletions frontend/src/components/DetailView/DetailView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,10 +145,10 @@ export const DetailView = <T extends object>({
<Stack rowGap={2}>
<DetailContextProvider contextState={initialState}>
<Box sx={{ display: 'flex', justifyContent: 'space-between', alignContent: 'center', marginTop: 'auto' }}>
<Box sx={{ display: 'flex' }} gap={10}>
<Box sx={{ display: 'flex' }} gap={3}>
{!isUserPage && <ReturnButton />}
{editRights.delete && (
<Button onClick={onDelete} variant="contained">
<Button onClick={onDelete} variant="contained" style={{ width: '8em' }}>
Delete
</Button>
)}
Expand All @@ -157,7 +157,7 @@ export const DetailView = <T extends object>({
id="edit-button"
onClick={() => setMode(!mode.read ? 'read' : 'edit')}
variant={mode.read ? 'contained' : 'outlined'}
style={{ width: '12em' }}
style={{ width: '8em' }}
>
<EditIcon style={{ marginRight: '0.5em' }} /> {mode.read ? 'Edit' : 'Cancel edit'}
</Button>
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/pages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const speciesPage = (
detailView={<SpeciesDetails />}
viewName="species"
idFieldName="species_id"
createTitle={(species: SpeciesDetailsType) => `${species.species_name}`}
createTitle={(species: SpeciesDetailsType) => `${species.genus_name + ' ' + species.species_name}`}
getEditRights={(user: UserState) => {
if ([Role.Admin, Role.EditUnrestricted].includes(user.role)) return fullRights
if (user.role === Role.EditRestricted) return limitedRights
Expand Down