Skip to content

Commit

Permalink
fix(app): fix bugs, remove some blemishes in the design
Browse files Browse the repository at this point in the history
  • Loading branch information
FussuChalice authored Nov 29, 2024
1 parent 32a1058 commit c6b346a
Show file tree
Hide file tree
Showing 14 changed files with 91 additions and 46 deletions.
2 changes: 1 addition & 1 deletion src/components/table/TableHead.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const TableHead = (props: EnhancedTableProps) => {
sortDirection={orderBy === headCell.id ? order : false}
sx={{
backgroundColor: 'var(--accent-100)',
borderColor: 'var(--accent-200)',
borderColor: 'var(--accent-200);',
...headCell.sx,
}}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const CongregationAccessCode = () => {
}}
>
<IconError color="var(--orange-dark)" />
<Typography className="body-regular" color="var(--orange-dark)">
<Typography className="body-small-regular" color="var(--orange-dark)">
{t('tr_congregationAccessCodeNotice')}
</Typography>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const CongregationMasterKey = () => {
}}
>
<IconError color="var(--red-main)" />
<Typography className="body-regular" color="var(--red-main)">
<Typography className="body-small-regular" color="var(--red-main)">
{t('tr_encryptionCodeNotice')}
</Typography>
</Box>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,11 @@ const CongregationBasic = () => {
} = useCongregationBasic();

return (
<CardSection>
<CardSection
sx={{
marginTop: '16px',
}}
>
<Box
sx={{
display: 'flex',
Expand Down
14 changes: 12 additions & 2 deletions src/features/congregation/settings/meeting_forms/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import { Stack } from '@mui/material';
import { useAppTranslation, useCurrentUser } from '@hooks/index';
import {
useAppTranslation,
useBreakpoints,
useCurrentUser,
} from '@hooks/index';
import {
CardSection,
CardSectionContent,
Expand All @@ -22,6 +26,8 @@ const MeetingForms = () => {
const { isMidweekEditor, isWeekendEditor, isPublicTalkCoordinator } =
useCurrentUser();

const { laptopDown } = useBreakpoints();

const {
sourceAutoUpdate,
handleSourceAutoUpdateToggle,
Expand All @@ -30,7 +36,11 @@ const MeetingForms = () => {
} = useMeetingForms();

return (
<CardSection>
<CardSection
sx={{
marginTop: laptopDown ? '0' : '16px',
}}
>
<CardSectionHeader title={t('tr_meetinMaterialsTitle')} />

<CardSectionContent marginTop="-8px !important">
Expand Down
1 change: 0 additions & 1 deletion src/features/congregation/settings/shared_styles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import Typography from '@components/typography';
import Divider from '@components/divider';

export const CardSection = styled(Box)({
marginTop: '16px',
backgroundColor: 'var(--white)',
padding: '15px',
border: '1px solid var(--accent-300)',
Expand Down
13 changes: 1 addition & 12 deletions src/features/meeting_materials/public_talks/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TalksTableView from './tableView';
import Typography from '@components/typography';
import usePublicTalks from './usePublicTalks';
import { useAppTranslation, useBreakpoints } from '@hooks/index';
import { IconCollapse, IconExpand, IconExport } from '@components/icons';
import { IconCollapse, IconExpand } from '@components/icons';
import { PublicTalksType } from './index.types';

const PublicTalks = ({ view }: PublicTalksType) => {
Expand Down Expand Up @@ -88,17 +88,6 @@ const PublicTalks = ({ view }: PublicTalksType) => {
{isExpandAll ? t('tr_collapseAll') : t('tr_expandAll')}
</Button>
)}

{view === 'table' && laptopUp && (
<Button
variant="tertiary"
startIcon={
<IconExport height={22} width={22} color="var(--accent-dark)" />
}
>
{t('tr_exportS99')}
</Button>
)}
</Box>

{view === 'list' && (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const TalksListView = ({ isExpandAll, talks }: TalksListViewType) => {
'& .MuiTableCell-root': {
padding: '8px',
boxSizing: 'content-box',
borderColor: 'var(--accent-200)',
},
}}
>
Expand Down
8 changes: 7 additions & 1 deletion src/features/meetings/schedule_publish/month_item/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,13 @@ const MonthItem = ({ data, onChange }: MonthItemProps) => {
/>

{data.published && (
<Box title={t('tr_published')}>
<Box
title={t('tr_published')}
sx={{
display: 'flex',
alignItems: 'center',
}}
>
<IconPublishedSchedule color="var(--accent-main)" />
</Box>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ const OutgoingSpeakersHeader = ({
const {
congName,
congNumber,
circuitNumber,
handleCloseAccess,
handleOpenAccess,
openAccess,
Expand Down Expand Up @@ -69,6 +70,17 @@ const OutgoingSpeakersHeader = ({
>
{congNumber}
</Typography>
<Typography
className="body-small-semibold"
color="var(--grey-400)"
sx={{
borderRadius: 'var(--radius-s)',
padding: '2px 8px',
backgroundColor: 'var(--grey-150)',
}}
>
{t('tr_circuit', { circuitNumber: circuitNumber })}
</Typography>
</Box>
</Box>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { useState } from 'react';
import { useRecoilValue } from 'recoil';
import { congNameState, congNumberState } from '@states/settings';
import {
circuitNumberState,
congNameState,
congNumberState,
} from '@states/settings';
import { congAccountConnectedState } from '@states/app';

const useHeader = () => {
const congName = useRecoilValue(congNameState);
const congNumber = useRecoilValue(congNumberState);
const congAccountConnected = useRecoilValue(congAccountConnectedState);
const circuitNumber = useRecoilValue(circuitNumberState);

const [openAccess, setOpenAccess] = useState(false);

Expand All @@ -17,6 +22,7 @@ const useHeader = () => {
return {
congName,
congNumber,
circuitNumber,
handleOpenAccess,
handleCloseAccess,
openAccess,
Expand Down
2 changes: 1 addition & 1 deletion src/layouts/navbar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ const NavBar = ({ isSupported }: NavBarType) => {
edge="start"
disableRipple
sx={{
padding: '2px 8px',
padding: tabletDown ? 0 : '2px 8px',
marginLeft: '0px',
borderRadius: '8px',
'&:hover': {
Expand Down
3 changes: 2 additions & 1 deletion src/locales/en/general.json
Original file line number Diff line number Diff line change
Expand Up @@ -133,5 +133,6 @@
"tr_noNotificationsDesc": "Important notifications will be displayed here.",
"tr_userRoleChanged": "Access changed",
"tr_userRoleChangedDesc": "Your access in Organized has been changed recently. Log in to your account again for the changes to take effect.",
"tr_appliesOnlyToBrothers": "Applies only to brothers"
"tr_appliesOnlyToBrothers": "Applies only to brothers",
"tr_circuit": "Circuit: {{ circuitNumber }}"
}
63 changes: 40 additions & 23 deletions src/pages/meeting_materials/public_talks_list/index.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { Box } from '@mui/material';
import { IconListView, IconSpreadsheet } from '@components/icons';
import { IconExport, IconListView, IconSpreadsheet } from '@components/icons';
import Button from '@components/button';
import PageTitle from '@components/page_title';
import usePublicTalksList from './usePublicTalksList';
import { useAppTranslation } from '@hooks/index';
import { useAppTranslation, useBreakpoints } from '@hooks/index';
import { PublicTalks } from '@features/index';

const PublicTalksList = () => {
const { t } = useAppTranslation();
const { laptopUp } = useBreakpoints();

const { currentView, handleToggleView } = usePublicTalksList();

Expand All @@ -16,27 +17,43 @@ const PublicTalksList = () => {
<PageTitle
title={t('tr_publicTalksList')}
buttons={
<Button
variant="secondary"
startIcon={
currentView === 'list' ? (
<IconSpreadsheet
height={22}
width={22}
color="var(--accent-main)"
/>
) : (
<IconListView
height={22}
width={22}
color="var(--accent-main)"
/>
)
}
onClick={handleToggleView}
>
{currentView === 'list' ? t('tr_tableView') : t('tr_listView')}
</Button>
<>
<Button
variant="secondary"
startIcon={
currentView === 'list' ? (
<IconSpreadsheet
height={22}
width={22}
color="var(--accent-main)"
/>
) : (
<IconListView
height={22}
width={22}
color="var(--accent-main)"
/>
)
}
onClick={handleToggleView}
>
{currentView === 'list' ? t('tr_tableView') : t('tr_listView')}
</Button>
{currentView === 'table' && laptopUp && (
<Button
variant="main"
startIcon={
<IconExport
height={22}
width={22}
color="var(--accent-dark)"
/>
}
>
{t('tr_exportS99')}
</Button>
)}
</>
}
/>

Expand Down

0 comments on commit c6b346a

Please sign in to comment.