Merge pull request #2116 from Bilb/move-confirm-right-dialogs

Move confirm right dialogs
pull/2118/head
Audric Ackermann 3 years ago committed by GitHub
commit 2822f8ddd2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -212,7 +212,7 @@
"tslint": "5.19.0", "tslint": "5.19.0",
"tslint-microsoft-contrib": "6.0.0", "tslint-microsoft-contrib": "6.0.0",
"tslint-react": "3.6.0", "tslint-react": "3.6.0",
"typescript": "^4.2.3", "typescript": "4.5.4",
"webpack": "5.30.0", "webpack": "5.30.0",
"webpack-cli": "4.6.0", "webpack-cli": "4.6.0",
"webpack-dev-server": "3.11.2" "webpack-dev-server": "3.11.2"

@ -29,6 +29,7 @@
.session-modal { .session-modal {
.contact-selection-list { .contact-selection-list {
width: 100%; width: 100%;
min-width: 300px;
} }
} }

@ -108,17 +108,16 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
{props.children} {props.children}
<div className="session-modal__button-group"> <div className="session-modal__button-group">
{onConfirm ? (
<SessionButton onClick={props.onConfirm}>
{confirmText || window.i18n('ok')}
</SessionButton>
) : null}
{onClose && showClose ? ( {onClose && showClose ? (
<SessionButton onClick={props.onClose}> <SessionButton onClick={props.onClose}>
{cancelText || window.i18n('close')} {cancelText || window.i18n('close')}
</SessionButton> </SessionButton>
) : null} ) : null}
{onConfirm ? (
<SessionButton onClick={props.onConfirm}>
{confirmText || window.i18n('ok')}
</SessionButton>
) : null}
</div> </div>
</div> </div>
</div> </div>

@ -316,6 +316,9 @@ export class SessionRecording extends React.Component<Props, State> {
*/ */
private updateAudioElementAndDuration() { private updateAudioElementAndDuration() {
// init audio element // init audio element
if (!this.audioBlobMp3) {
return;
}
const audioURL = window.URL.createObjectURL(this.audioBlobMp3); const audioURL = window.URL.createObjectURL(this.audioBlobMp3);
this.audioElement = new Audio(audioURL); this.audioElement = new Audio(audioURL);

@ -37,8 +37,8 @@ export const AdminLeaveClosedGroupDialog = (props: Props) => {
<p>{warningAsAdmin}</p> <p>{warningAsAdmin}</p>
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Danger} />
<SessionButton text={cancelText} onClick={closeDialog} /> <SessionButton text={cancelText} onClick={closeDialog} />
<SessionButton text={okText} onClick={onClickOK} buttonColor={SessionButtonColor.Danger} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -70,12 +70,12 @@ export const SessionNicknameDialog = (props: Props) => {
/> />
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={window.i18n('cancel')} onClick={onClickClose} />
<SessionButton <SessionButton
text={window.i18n('ok')} text={window.i18n('ok')}
onClick={saveNickname} onClick={saveNickname}
buttonColor={SessionButtonColor.Green} buttonColor={SessionButtonColor.Green}
/> />
<SessionButton text={window.i18n('cancel')} onClick={onClickClose} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -104,13 +104,12 @@ export class SessionPasswordDialog extends React.Component<Props, State> {
{this.showError()} {this.showError()}
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={window.i18n('cancel')} onClick={this.closeDialog} />
<SessionButton <SessionButton
text={window.i18n('ok')} text={window.i18n('ok')}
buttonColor={confirmButtonColor} buttonColor={confirmButtonColor}
onClick={this.setPassword} onClick={this.setPassword}
/> />
<SessionButton text={window.i18n('cancel')} onClick={this.closeDialog} />
</div> </div>
</SessionWrapperModal> </SessionWrapperModal>
); );

@ -71,9 +71,8 @@ const Password = (props: PasswordProps) => {
<SpacerLG /> <SpacerLG />
<div className="session-modal__button-group"> <div className="session-modal__button-group">
<SessionButton text={i18n('ok')} onClick={confirmPassword} />
<SessionButton text={i18n('cancel')} onClick={onClose} /> <SessionButton text={i18n('cancel')} onClick={onClose} />
<SessionButton text={i18n('ok')} onClick={confirmPassword} />
</div> </div>
</> </>
); );

@ -39,6 +39,7 @@
// "typeRoots": [], // List of folders to include type definitions from. // "typeRoots": [], // List of folders to include type definitions from.
// "types": [], // Type declaration files to be included in compilation. // "types": [], // Type declaration files to be included in compilation.
// "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking. // "allowSyntheticDefaultImports": true, // Allow default imports from modules with no default export. This does not affect code emit, just typechecking.
"useUnknownInCatchVariables": false,
"esModuleInterop": true // Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. "esModuleInterop": true // Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'.
// "preserveSymlinks": true, // Do not resolve the real path of symlinks. // "preserveSymlinks": true, // Do not resolve the real path of symlinks.

@ -9961,10 +9961,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
typescript@^4.2.3: typescript@4.5.4:
version "4.2.3" version "4.5.4"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.2.3.tgz#39062d8019912d43726298f09493d598048c1ce3" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.5.4.tgz#a17d3a0263bf5c8723b9c52f43c5084edf13c2e8"
integrity sha512-qOcYwxaByStAWrBf4x0fibwZvMRG+r4cQoTjbPtUlrWjBHbmCAww1i448U0GJ+3cNNEtebDteo/cHOR3xJ4wEw== integrity sha512-VgYs2A2QIRuGphtzFV7aQJduJ2gyfTljngLzjpfW9FoYZF6xuw1W0vW9ghCKLfcWrCFxK81CSGRAvS1pn4fIUg==
typings-for-css-modules-loader@^1.7.0: typings-for-css-modules-loader@^1.7.0:
version "1.7.0" version "1.7.0"

Loading…
Cancel
Save