feat: added panel label for timer options

pull/2660/head
William Grant 2 years ago
parent 46a8801d8e
commit 6b06e4a70b

@ -178,6 +178,7 @@
"messageBody": "Message body",
"unblockToSend": "Unblock this contact to send a message.",
"unblockGroupToSend": "This group is blocked. Unlock it if you would like to send a message.",
"timer": "Timer",
"youChangedTheTimer": "You set the disappearing message timer to $time$",
"timerSetOnSync": "Updated disappearing message timer to $time$",
"theyChangedTheTimer": "$name$ set the disappearing message timer to $time$",

@ -21,6 +21,14 @@ export const StyledText = styled.span`
text-align: left;
`;
export const PanelLabel = styled.p`
color: var(--text-secondary-color);
width: 100%;
margin: 0;
padding-left: calc(var(--margins-lg) * 2 + var(--margins-sm));
padding-bottom: var(--margins-sm);
`;
const StyledRoundedPanelButtonGroup = styled.div`
overflow: hidden;
background: var(--right-panel-item-background-color);

@ -9,6 +9,7 @@ import { getTimerOptions } from '../../../../state/selectors/timerOptions';
import { Flex } from '../../../basic/Flex';
import { SessionButton } from '../../../basic/SessionButton';
import { PanelButtonGroup } from '../../../buttons';
import { PanelLabel } from '../../../buttons/PanelButton';
import { PanelRadioButton } from '../../../buttons/PanelRadioButton';
import { SessionIconButton } from '../../../icon';
@ -91,20 +92,23 @@ const TimeOptions = (props: TimerOptionsProps) => {
const { options, selected, setSelected } = props;
return (
<PanelButtonGroup>
{options.map((option: any) => (
<PanelRadioButton
key={option.name}
text={option.name}
value={option.name}
isSelected={selected === option.value}
onSelect={() => {
setSelected(option.value);
}}
disableBg={true}
/>
))}
</PanelButtonGroup>
<>
<PanelLabel>{window.i18n('timer')}</PanelLabel>
<PanelButtonGroup>
{options.map((option: any) => (
<PanelRadioButton
key={option.name}
text={option.name}
value={option.name}
isSelected={selected === option.value}
onSelect={() => {
setSelected(option.value);
}}
disableBg={true}
/>
))}
</PanelButtonGroup>
</>
);
};

@ -188,6 +188,7 @@ export type LocalizerKeys =
| 'areYouSureDeleteEntireAccount'
| 'noGivenPassword'
| 'closedGroupInviteOkText'
| 'timer'
| 'readReceiptSettingTitle'
| 'copySessionID'
| 'timerOption_0_seconds'

Loading…
Cancel
Save