feat: updated all modal buttons

pull/2521/head
William Grant 3 years ago
parent 9876e8824c
commit 1bb5c9752e

@ -5,7 +5,7 @@ import { SessionIconButton } from './icon/';
// tslint:disable-next-line: no-submodule-imports
import useKey from 'react-use/lib/useKey';
import { SessionButton } from './basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from './basic/SessionButton2';
export type SessionWrapperModalType = {
title?: string;
@ -113,15 +113,19 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
{props.children}
<div className="session-modal__button-group">
{onClose && showClose ? (
<SessionButton onClick={props.onClose}>
{cancelText || window.i18n('close')}
</SessionButton>
) : null}
{onConfirm ? (
<SessionButton onClick={props.onConfirm}>
<SessionButton2 buttonType={SessionButtonType.Simple} onClick={props.onConfirm}>
{confirmText || window.i18n('ok')}
</SessionButton>
</SessionButton2>
) : null}
{onClose && showClose ? (
<SessionButton2
buttonType={SessionButtonType.Simple}
buttonColor={SessionButtonColor.Danger}
onClick={props.onClose}
>
{cancelText || window.i18n('close')}
</SessionButton2>
) : null}
</div>
</div>

@ -8,7 +8,7 @@ import { CallManager } from '../../session/utils';
import { callTimeoutMs } from '../../session/utils/calling/CallManager';
import { getHasIncomingCall, getHasIncomingCallFrom } from '../../state/selectors/call';
import { Avatar, AvatarSize } from '../avatar/Avatar';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionWrapperModal } from '../SessionWrapperModal';
export const CallWindow = styled.div`
@ -79,16 +79,17 @@ export const IncomingCallDialog = () => {
<Avatar size={AvatarSize.XL} pubkey={incomingCallFromPubkey} />
</IncomingCallAvatarContainer>
<div className="session-modal__button-group">
<SessionButton
<SessionButton2
text={window.i18n('accept')}
buttonType={SessionButtonType.Simple}
onClick={handleAcceptIncomingCall}
/>
<SessionButton2
text={window.i18n('decline')}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={handleDeclineIncomingCall}
/>
<SessionButton
text={window.i18n('accept')}
onClick={handleAcceptIncomingCall}
buttonColor={SessionButtonColor.Green}
/>
</div>
</SessionWrapperModal>
);

@ -2,7 +2,7 @@ import React, { useState } from 'react';
import { SpacerLG } from '../basic/Text';
import { getConversationController } from '../../session/conversations';
import { adminLeaveClosedGroup } from '../../state/ducks/modalDialog';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionWrapperModal } from '../SessionWrapperModal';
type Props = {
@ -37,8 +37,17 @@ export const AdminLeaveClosedGroupDialog = (props: Props) => {
<p>{warningAsAdmin}</p>
<div className="session-modal__button-group">
<SessionButton text={cancelText} onClick={closeDialog} />
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Danger} />
<SessionButton2
text={okText}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={onClickOK}
/>
<SessionButton2
text={cancelText}
buttonType={SessionButtonType.Simple}
onClick={closeDialog}
/>
</div>
</SessionWrapperModal>
);

@ -8,7 +8,7 @@ import { SpacerSM } from '../basic/Text';
import { getConversationController } from '../../session/conversations/ConversationController';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { ConversationModel } from '../../models/conversation';
import { useFocusMount } from '../../hooks/useFocusMount';
import { useConversationPropsById } from '../../hooks/useParamSelector';
@ -140,9 +140,8 @@ export const BanOrUnBanUserDialog = (props: {
value={wasGivenAPubkey ? inputTextToDisplay : inputBoxValue}
/>
<Flex container={true}>
<SessionButton
buttonType={SessionButtonType.Square}
buttonColor={SessionButtonColor.Primary}
<SessionButton2
buttonType={SessionButtonType.Simple}
onClick={banOrUnBanUser}
text={buttonText}
disabled={inProgress}
@ -150,8 +149,8 @@ export const BanOrUnBanUserDialog = (props: {
{isBan && (
<>
<SpacerSM />
<SessionButton
buttonType={SessionButtonType.Square}
<SessionButton2
buttonType={SessionButtonType.Simple}
buttonColor={SessionButtonColor.Danger}
onClick={startBanAndDeleteAllSequence}
text={i18n('banUserAndDeleteAll')}

@ -5,12 +5,7 @@ import { forceNetworkDeletion } from '../../session/apis/snode_api/SNodeAPI';
import { forceSyncConfigurationNowIfNeeded } from '../../session/utils/syncUtils';
import { updateConfirmModal, updateDeleteAccountModal } from '../../state/ducks/modalDialog';
import { SpacerLG } from '../basic/Text';
import {
SessionButton2,
SessionButtonColor,
SessionButtonShape,
SessionButtonType,
} from '../basic/SessionButton2';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionHtmlRenderer } from '../basic/SessionHTMLRenderer';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionWrapperModal } from '../SessionWrapperModal';
@ -198,8 +193,7 @@ export const DeleteAccountModal = () => {
<SessionButton2
text={window.i18n('entireAccount')}
buttonColor={SessionButtonColor.Danger}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={() => {
setDeleteEverythingWithNetwork(true);
}}
@ -208,8 +202,7 @@ export const DeleteAccountModal = () => {
<SessionButton2
text={window.i18n('deviceOnly')}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={() => {
setDeleteDeviceOnly(true);
}}
@ -240,8 +233,7 @@ export const DeleteAccountModal = () => {
<SessionButton2
text={window.i18n('iAmSure')}
buttonColor={SessionButtonColor.Danger}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={() => {
if (deleteDeviceOnly) {
void onDeleteEverythingLocallyOnly();
@ -254,8 +246,7 @@ export const DeleteAccountModal = () => {
<SessionButton2
text={window.i18n('cancel')}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={() => {
dispatch(updateDeleteAccountModal(null));
}}

@ -13,7 +13,7 @@ import { SpacerLG, SpacerMD } from '../basic/Text';
import autoBind from 'auto-bind';
import { editProfileModal } from '../../state/ducks/modalDialog';
import { uploadOurAvatar } from '../../interactions/conversationInteractions';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonType } from '../basic/SessionButton2';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionIconButton } from '../icon';
import { MAX_USERNAME_LENGTH } from '../registration/RegistrationStages';
@ -98,8 +98,6 @@ export class EditProfileDialog extends React.Component<{}, State> {
headerIconButtons={backButton}
showExitIcon={true}
>
<SpacerMD />
{viewQR && <QRView sessionID={sessionID} />}
{viewDefault && this.renderDefaultView()}
{viewEdit && this.renderEditView()}
@ -108,14 +106,12 @@ export class EditProfileDialog extends React.Component<{}, State> {
<YourSessionIDPill />
<YourSessionIDSelectable />
<SpacerLG />
<SessionSpinner loading={this.state.loading} />
{viewDefault || viewQR ? (
<SessionButton
<SessionButton2
text={window.i18n('editMenuCopy')}
buttonType={SessionButtonType.BrandOutline}
buttonColor={SessionButtonColor.Green}
buttonType={SessionButtonType.Simple}
onClick={() => {
window.clipboard.writeText(sessionID);
ToastUtils.pushCopiedToClipBoard();
@ -124,18 +120,15 @@ export class EditProfileDialog extends React.Component<{}, State> {
/>
) : (
!this.state.loading && (
<SessionButton
<SessionButton2
text={window.i18n('save')}
buttonType={SessionButtonType.BrandOutline}
buttonColor={SessionButtonColor.Green}
buttonType={SessionButtonType.Simple}
onClick={this.onClickOK}
disabled={this.state.loading}
dataTestId="save-button-profile-update"
/>
)
)}
<SpacerLG />
</div>
</SessionWrapperModal>
</div>

@ -11,7 +11,7 @@ import { useDispatch, useSelector } from 'react-redux';
import { updateInviteContactModal } from '../../state/ducks/modalDialog';
// tslint:disable-next-line: no-submodule-imports
import useKey from 'react-use/lib/useKey';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { MemberListItem } from '../MemberListItem';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { getPrivateContactsPubkeys } from '../../state/selectors/conversations';
@ -177,12 +177,17 @@ const InviteContactsDialogInner = (props: Props) => {
<SpacerLG />
<div className="session-modal__button-group">
<SessionButton text={cancelText} onClick={closeDialog} />
<SessionButton
<SessionButton2
text={okText}
buttonType={SessionButtonType.Simple}
disabled={!hasContacts}
onClick={onClickOK}
buttonColor={SessionButtonColor.Green}
/>
<SessionButton2
text={cancelText}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={closeDialog}
/>
</div>
</SessionWrapperModal>

@ -5,7 +5,7 @@ import { Flex } from '../basic/Flex';
import { getConversationController } from '../../session/conversations';
import { useDispatch, useSelector } from 'react-redux';
import { updateAddModeratorsModal } from '../../state/ducks/modalDialog';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonType } from '../basic/SessionButton2';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { sogsV3AddAdmin } from '../../session/apis/open_group_api/sogsv3/sogsV3AddRemoveMods';
@ -92,9 +92,8 @@ export const AddModeratorsDialog = (props: Props) => {
value={inputBoxValue}
autoFocus={true}
/>
<SessionButton
buttonType={SessionButtonType.Brand}
buttonColor={SessionButtonColor.Primary}
<SessionButton2
buttonType={SessionButtonType.Simple}
onClick={addAsModerator}
text={i18n('add')}
disabled={addingInProgress}

@ -6,7 +6,7 @@ import { Flex } from '../basic/Flex';
import { compact } from 'lodash';
import { updateRemoveModeratorsModal } from '../../state/ducks/modalDialog';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionSpinner } from '../basic/SessionSpinner';
import { MemberListItem } from '../MemberListItem';
import { useDispatch } from 'react-redux';
@ -104,16 +104,15 @@ export const RemoveModeratorsDialog = (props: Props) => {
)}
<div className="session-modal__button-group">
<SessionButton
buttonType={SessionButtonType.Brand}
buttonColor={SessionButtonColor.Green}
<SessionButton2
buttonType={SessionButtonType.Simple}
onClick={removeModsCall}
disabled={removingInProgress}
text={i18n('ok')}
/>
<SessionButton
buttonType={SessionButtonType.Brand}
buttonColor={SessionButtonColor.Primary}
<SessionButton2
buttonType={SessionButtonType.Simple}
buttonColor={SessionButtonColor.Danger}
onClick={closeDialog}
disabled={removingInProgress}
text={i18n('cancel')}

@ -7,7 +7,7 @@ import { getConversationController } from '../../session/conversations';
import { updateReactClearAllModal } from '../../state/ducks/modalDialog';
import { getTheme } from '../../state/selectors/theme';
import { Flex } from '../basic/Flex';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionSpinner } from '../basic/SessionSpinner';
import { SessionWrapperModal } from '../SessionWrapperModal';
@ -66,8 +66,6 @@ export const ReactClearAllModal = (props: Props): ReactElement => {
.get(convoId)
.toOpenGroupV2();
const confirmButtonColor = darkMode ? SessionButtonColor.Green : SessionButtonColor.Secondary;
const handleClose = () => {
dispatch(updateReactClearAllModal(null));
};
@ -97,17 +95,16 @@ export const ReactClearAllModal = (props: Props): ReactElement => {
>
<p>{window.i18n('clearAllReactions', [reaction])}</p>
<StyledButtonContainer className="session-modal__button-group">
<SessionButton
<SessionButton2
text={window.i18n('clear')}
buttonColor={confirmButtonColor}
buttonType={SessionButtonType.BrandOutline}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={handleClearAll}
disabled={clearingInProgress}
/>
<SessionButton
<SessionButton2
text={window.i18n('cancel')}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.BrandOutline}
buttonType={SessionButtonType.Simple}
onClick={handleClose}
disabled={clearingInProgress}
/>

@ -16,6 +16,7 @@ import { nativeEmojiData } from '../../util/emoji';
import { Reactions } from '../../util/reactions';
import { Avatar, AvatarSize } from '../avatar/Avatar';
import { Flex } from '../basic/Flex';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionHtmlRenderer } from '../basic/SessionHTMLRenderer';
import { ContactName } from '../conversation/ContactName';
import { MessageReactions } from '../conversation/message/message-content/MessageReactions';
@ -61,6 +62,11 @@ const StyledReactionBar = styled(Flex)`
margin-right: 8px;
}
}
.session-button {
font-weight: 400;
padding: 0px;
}
`;
const StyledReactionSender = styled(Flex)`
@ -76,12 +82,6 @@ const StyledReactionSender = styled(Flex)`
}
`;
const StyledClearButton = styled.button`
font-size: var(--font-size-sm);
color: var(--color-destructive);
border: none;
`;
type ReactionSendersProps = {
messageId: string;
currentReact: string;
@ -348,9 +348,12 @@ export const ReactListModal = (props: Props): ReactElement => {
)}
</p>
{isPublic && weAreModerator && (
<StyledClearButton onClick={handleClearReactions}>
{window.i18n('clearAll')}
</StyledClearButton>
<SessionButton2
text={window.i18n('clearAll')}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={handleClearReactions}
/>
)}
</StyledReactionBar>
{senders && senders.length > 0 && (

@ -50,8 +50,8 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
title = '',
message = '',
messageSub = '',
okTheme = SessionButtonColor.Primary,
closeTheme,
okTheme,
closeTheme = SessionButtonColor.Danger,
onClickOk,
onClickClose,
hideCancel = false,
@ -138,8 +138,7 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
<SessionButton2
text={okText}
buttonColor={okTheme}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={onClickOkHandler}
dataTestId="session-confirm-ok-button"
/>
@ -147,8 +146,7 @@ export const SessionConfirm = (props: SessionConfirmDialogProps) => {
<SessionButton2
text={cancelText}
buttonColor={closeTheme}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonType={SessionButtonType.Simple}
onClick={onClickCancelHandler}
dataTestId="session-confirm-cancel-button"
/>

@ -1,6 +1,6 @@
import React from 'react';
import classNames from 'classnames';
import { SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionIconButton, SessionIconType } from '../icon';
interface Props {

@ -5,7 +5,7 @@ import _ from 'lodash';
import { SpacerLG } from '../basic/Text';
import { useDispatch } from 'react-redux';
import { changeNickNameModal } from '../../state/ducks/modalDialog';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionWrapperModal } from '../SessionWrapperModal';
type Props = {
@ -70,11 +70,16 @@ export const SessionNicknameDialog = (props: Props) => {
/>
<div className="session-modal__button-group">
<SessionButton text={window.i18n('cancel')} onClick={onClickClose} />
<SessionButton
<SessionButton2
text={window.i18n('ok')}
buttonType={SessionButtonType.Simple}
onClick={saveNickname}
buttonColor={SessionButtonColor.Green}
/>
<SessionButton2
text={window.i18n('cancel')}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={onClickClose}
/>
</div>
</SessionWrapperModal>

@ -7,12 +7,7 @@ import { SpacerLG, SpacerSM } from '../basic/Text';
import autoBind from 'auto-bind';
import { sessionPassword } from '../../state/ducks/modalDialog';
import { LocalizerKeys } from '../../types/LocalizerKeys';
import {
SessionButton2,
SessionButtonColor,
SessionButtonShape,
SessionButtonType,
} from '../basic/SessionButton2';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { matchesHash, validatePassword } from '../../util/passwordUtils';
@ -64,7 +59,6 @@ export class SessionPasswordDialog extends React.Component<Props, State> {
]
: [window.i18n('enterPassword'), window.i18n('confirmPassword')];
const confirmButtonColor = passwordAction === 'remove' ? SessionButtonColor.Danger : undefined;
// do this separately so typescript's compiler likes it
const localizedKeyAction: LocalizerKeys =
passwordAction === 'change'
@ -114,15 +108,14 @@ export class SessionPasswordDialog extends React.Component<Props, State> {
<div className="session-modal__button-group">
<SessionButton2
text={window.i18n('ok')}
buttonColor={confirmButtonColor}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonColor={passwordAction === 'remove' ? SessionButtonColor.Danger : undefined}
buttonType={SessionButtonType.Simple}
onClick={this.setPassword}
/>
<SessionButton2
text={window.i18n('cancel')}
buttonShape={SessionButtonShape.Square}
buttonType={SessionButtonType.Solid}
buttonColor={passwordAction !== 'remove' ? SessionButtonColor.Danger : undefined}
buttonType={SessionButtonType.Simple}
onClick={this.closeDialog}
/>
</div>

@ -8,7 +8,7 @@ import { mn_decode } from '../../session/crypto/mnemonic';
import { SpacerLG, SpacerSM, SpacerXS } from '../basic/Text';
import { recoveryPhraseModal } from '../../state/ducks/modalDialog';
import { useDispatch } from 'react-redux';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { getCurrentRecoveryPhrase } from '../../util/storage';
@ -72,8 +72,17 @@ const Password = (props: PasswordProps) => {
<SpacerLG />
<div className="session-modal__button-group">
<SessionButton text={i18n('cancel')} onClick={onClose} />
<SessionButton text={i18n('ok')} onClick={confirmPassword} />
<SessionButton2
text={i18n('ok')}
buttonType={SessionButtonType.Simple}
onClick={confirmPassword}
/>
<SessionButton2
text={i18n('cancel')}
buttonType={SessionButtonType.Simple}
buttonColor={SessionButtonColor.Danger}
onClick={onClose}
/>
</div>
</>
);
@ -105,27 +114,26 @@ const Seed = (props: SeedProps) => {
return (
<>
<div className="session-modal__centered text-center">
<p className="session-modal__description">{i18n('recoveryPhraseSavePromptMain')}</p>
<SpacerXS />
<p className="session-modal__description" style={{ marginTop: '0px' }}>
{i18n('recoveryPhraseSavePromptMain')}
</p>
<i data-testid="recovery-phrase-seed-modal" className="session-modal__text-highlight">
{recoveryPhrase}
</i>
</div>
<SpacerLG />
<div className="qr-image">
<QRCode value={hexEncodedSeed} bgColor={bgColor} fgColor={fgColor} level="L" />
</div>
<div className="session-modal__button-group">
<SessionButton
<SessionButton2
text={i18n('editMenuCopy')}
buttonColor={SessionButtonColor.Green}
buttonType={SessionButtonType.Simple}
onClick={() => {
copyRecoveryPhrase(recoveryPhrase);
}}
/>
</div>
<SpacerLG />
<div className="qr-image">
<QRCode value={hexEncodedSeed} bgColor={bgColor} fgColor={fgColor} level="L" />
</div>
</>
);
};

@ -5,7 +5,7 @@ import { ToastUtils, UserUtils } from '../../session/utils';
import _ from 'lodash';
import { SpacerLG, Text } from '../basic/Text';
import { updateGroupMembersModal } from '../../state/ducks/modalDialog';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { MemberListItem } from '../MemberListItem';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { useDispatch } from 'react-redux';
@ -243,10 +243,15 @@ export const UpdateGroupMembersDialog = (props: Props) => {
<SpacerLG />
<div className="session-modal__button-group">
<SessionButton text={cancelText} onClick={closeDialog} />
{weAreAdmin && (
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Green} />
<SessionButton2 text={okText} onClick={onClickOK} buttonType={SessionButtonType.Simple} />
)}
<SessionButton2
text={cancelText}
buttonColor={weAreAdmin ? SessionButtonColor.Danger : undefined}
buttonType={SessionButtonType.Simple}
onClick={closeDialog}
/>
</div>
</SessionWrapperModal>
);

@ -8,7 +8,7 @@ import autoBind from 'auto-bind';
import { ConversationModel } from '../../models/conversation';
import { getConversationController } from '../../session/conversations';
import { SessionWrapperModal } from '../SessionWrapperModal';
import { SessionButton, SessionButtonColor } from '../basic/SessionButton';
import { SessionButton2, SessionButtonColor, SessionButtonType } from '../basic/SessionButton2';
import { initiateOpenGroupUpdate } from '../../session/group/open-group';
import { initiateClosedGroupUpdate } from '../../session/group/closed-group';
import { pickFileForAvatar } from '../../types/attachments/VisualAttachment';
@ -129,12 +129,16 @@ export class UpdateGroupNameDialog extends React.Component<Props, State> {
) : null}
<div className="session-modal__button-group">
<SessionButton text={cancelText} onClick={this.closeDialog} />
<SessionButton
<SessionButton2
text={okText}
onClick={this.onClickOK}
buttonColor={SessionButtonColor.Green}
buttonType={SessionButtonType.Simple}
/>
<SessionButton2
text={cancelText}
buttonColor={SessionButtonColor.Danger}
buttonType={SessionButtonType.Simple}
onClick={this.closeDialog}
/>
</div>
</SessionWrapperModal>

@ -9,7 +9,7 @@ import { SessionNotificationGroupSettings } from './SessionNotificationGroupSett
import { CategoryConversations } from './section/CategoryConversations';
import { SettingsCategoryPrivacy } from './section/CategoryPrivacy';
import { SettingsCategoryAppearance } from './section/CategoryAppearance';
import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
import { SessionButton2, SessionButtonType } from '../basic/SessionButton2';
import { Data } from '../../data/data';
import { matchesHash } from '../../util/passwordUtils';
import { SettingsCategoryPermissions } from './section/CategoryPermissions';
@ -125,9 +125,8 @@ const PasswordLock = ({
{pwdLockError && <div className="session-label warning">{pwdLockError}</div>}
<SessionButton
buttonType={SessionButtonType.BrandOutline}
buttonColor={SessionButtonColor.Green}
<SessionButton2
buttonType={SessionButtonType.Simple}
text={window.i18n('ok')}
onClick={validatePasswordLock}
/>

Loading…
Cancel
Save