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", "messageBody": "Message body",
"unblockToSend": "Unblock this contact to send a message.", "unblockToSend": "Unblock this contact to send a message.",
"unblockGroupToSend": "This group is blocked. Unlock it if you would like 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$", "youChangedTheTimer": "You set the disappearing message timer to $time$",
"timerSetOnSync": "Updated disappearing message timer to $time$", "timerSetOnSync": "Updated disappearing message timer to $time$",
"theyChangedTheTimer": "$name$ set the 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; 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` const StyledRoundedPanelButtonGroup = styled.div`
overflow: hidden; overflow: hidden;
background: var(--right-panel-item-background-color); background: var(--right-panel-item-background-color);

@ -9,6 +9,7 @@ import { getTimerOptions } from '../../../../state/selectors/timerOptions';
import { Flex } from '../../../basic/Flex'; import { Flex } from '../../../basic/Flex';
import { SessionButton } from '../../../basic/SessionButton'; import { SessionButton } from '../../../basic/SessionButton';
import { PanelButtonGroup } from '../../../buttons'; import { PanelButtonGroup } from '../../../buttons';
import { PanelLabel } from '../../../buttons/PanelButton';
import { PanelRadioButton } from '../../../buttons/PanelRadioButton'; import { PanelRadioButton } from '../../../buttons/PanelRadioButton';
import { SessionIconButton } from '../../../icon'; import { SessionIconButton } from '../../../icon';
@ -91,6 +92,8 @@ const TimeOptions = (props: TimerOptionsProps) => {
const { options, selected, setSelected } = props; const { options, selected, setSelected } = props;
return ( return (
<>
<PanelLabel>{window.i18n('timer')}</PanelLabel>
<PanelButtonGroup> <PanelButtonGroup>
{options.map((option: any) => ( {options.map((option: any) => (
<PanelRadioButton <PanelRadioButton
@ -105,6 +108,7 @@ const TimeOptions = (props: TimerOptionsProps) => {
/> />
))} ))}
</PanelButtonGroup> </PanelButtonGroup>
</>
); );
}; };

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

Loading…
Cancel
Save