diff --git a/_locales/en/messages.json b/_locales/en/messages.json
index f424e20b6..7e1b7999f 100644
--- a/_locales/en/messages.json
+++ b/_locales/en/messages.json
@@ -83,7 +83,6 @@
"replyingToMessage": "Replying to:",
"originalMessageNotFound": "Original message not found",
"you": "You",
- "audioPermissionNeededTitle": "Microphone Access Required",
"audioPermissionNeeded": "You can enable microphone access under: Settings (Gear icon) => Privacy",
"image": "Image",
"audio": "Audio",
@@ -332,9 +331,6 @@
"setPasswordInvalid": "Passwords do not match",
"changePasswordInvalid": "The old password you entered is incorrect",
"removePasswordInvalid": "Incorrect password",
- "setPasswordTitle": "Password Set",
- "changePasswordTitle": "Password Changed",
- "removePasswordTitle": "Password Removed",
"setPasswordToastDescription": "Your password has been set. Please keep it safe.",
"changePasswordToastDescription": "Your password has been changed. Please keep it safe.",
"removePasswordToastDescription": "Your password has been removed.",
@@ -362,7 +358,6 @@
"noContactsToAdd": "No contacts to add",
"noMembersInThisGroup": "No other members in this group",
"noModeratorsToRemove": "no admins to remove",
- "onlyAdminCanRemoveMembers": "You are not the creator",
"onlyAdminCanRemoveMembersDesc": "Only the creator of the group can remove users",
"createAccount": "Create account",
"startInTrayTitle": "Keep in System Tray",
@@ -486,12 +481,9 @@
"endCall": "End call",
"permissionsSettingsTitle": "Permissions",
"helpSettingsTitle": "Help",
- "cameraPermissionNeededTitle": "Voice/Video Call permissions required",
"cameraPermissionNeeded": "You can enable the 'Voice and video calls' permission in the Privacy Settings.",
"unableToCall": "Cancel your ongoing call first",
- "unableToCallTitle": "Cannot start new call",
"callMissed": "Missed call from $name$",
- "callMissedTitle": "Call missed",
"noCameraFound": "No camera found",
"noAudioInputFound": "No audio input found",
"noAudioOutputFound": "No audio output found",
diff --git a/ts/components/basic/SessionToast.tsx b/ts/components/basic/SessionToast.tsx
index 9cbbe8237..470528744 100644
--- a/ts/components/basic/SessionToast.tsx
+++ b/ts/components/basic/SessionToast.tsx
@@ -17,23 +17,15 @@ export enum SessionToastType {
}
type Props = {
- title: string;
+ description: string;
+
id?: string;
type?: SessionToastType;
icon?: SessionIconType;
- description?: string;
closeToast?: any;
onToastClick?: () => void;
};
-const TitleDiv = styled.div`
- font-size: var(--font-size-md);
- line-height: var(--font-size-md);
- font-family: var(--font-default);
- color: var(--text-primary-color);
- text-overflow: ellipsis;
-`;
-
const DescriptionDiv = styled.div`
font-size: var(--font-size-sm);
color: var(--text-secondary-color);
@@ -72,7 +64,7 @@ function DescriptionPubkeysReplaced({ description }: { description: string }) {
}
export const SessionToast = (props: Props) => {
- const { title, description, type, icon } = props;
+ const { description, type, icon } = props;
const toastDesc = description || '';
const toastIconSize = toastDesc ? 'huge' : 'medium';
@@ -117,8 +109,7 @@ export const SessionToast = (props: Props) => {
flexDirection="column"
className="session-toast"
>
- {title}
- {toastDesc && }
+
);
diff --git a/ts/components/dialog/SessionPasswordDialog.tsx b/ts/components/dialog/SessionPasswordDialog.tsx
index 0d22fbe8a..b358f40e3 100644
--- a/ts/components/dialog/SessionPasswordDialog.tsx
+++ b/ts/components/dialog/SessionPasswordDialog.tsx
@@ -1,16 +1,16 @@
/* eslint-disable @typescript-eslint/no-misused-promises */
-import React from 'react';
import autoBind from 'auto-bind';
+import React from 'react';
-import { ToastUtils } from '../../session/utils';
import { Data } from '../../data/data';
-import { SpacerSM } from '../basic/Text';
+import { ToastUtils } from '../../session/utils';
import { sessionPassword } from '../../state/ducks/modalDialog';
import { LocalizerKeys } from '../../types/LocalizerKeys';
-import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
-import { SessionWrapperModal } from '../SessionWrapperModal';
-import { matchesHash, validatePassword } from '../../util/passwordUtils';
import { assertUnreachable } from '../../types/sqlSharedTypes';
+import { matchesHash, validatePassword } from '../../util/passwordUtils';
+import { SessionWrapperModal } from '../SessionWrapperModal';
+import { SessionButton, SessionButtonColor, SessionButtonType } from '../basic/SessionButton';
+import { SpacerSM } from '../basic/Text';
export type PasswordAction = 'set' | 'change' | 'remove' | 'enter';
@@ -197,7 +197,6 @@ export class SessionPasswordDialog extends React.Component {
await window.setPassword(enteredPassword, null);
ToastUtils.pushToastSuccess(
'setPasswordSuccessToast',
- window.i18n('setPasswordTitle'),
window.i18n('setPasswordToastDescription')
);
@@ -237,7 +236,6 @@ export class SessionPasswordDialog extends React.Component {
ToastUtils.pushToastSuccess(
'setPasswordSuccessToast',
- window.i18n('changePasswordTitle'),
window.i18n('changePasswordToastDescription')
);
@@ -259,7 +257,6 @@ export class SessionPasswordDialog extends React.Component {
ToastUtils.pushToastWarning(
'setPasswordSuccessToast',
- window.i18n('removePasswordTitle'),
window.i18n('removePasswordToastDescription')
);
diff --git a/ts/session/utils/Toast.tsx b/ts/session/utils/Toast.tsx
index 1087345ed..fbaef4056 100644
--- a/ts/session/utils/Toast.tsx
+++ b/ts/session/utils/Toast.tsx
@@ -6,30 +6,28 @@ import { SessionSettingCategory } from '../../components/settings/SessionSetting
import { SectionType, showLeftPaneSection, showSettingsSection } from '../../state/ducks/section';
// if you push a toast manually with toast...() be sure to set the type attribute of the SessionToast component
-export function pushToastError(id: string, title: string, description?: string) {
- toast.error(
- ,
- { toastId: id, updateId: id }
- );
+export function pushToastError(id: string, description: string) {
+ toast.error(, {
+ toastId: id,
+ updateId: id,
+ });
}
-export function pushToastWarning(id: string, title: string, description?: string) {
- toast.warning(
- ,
- { toastId: id, updateId: id }
- );
+export function pushToastWarning(id: string, description: string) {
+ toast.warning(, {
+ toastId: id,
+ updateId: id,
+ });
}
export function pushToastInfo(
id: string,
- title: string,
- description?: string,
+ description: string,
onToastClick?: () => void,
delay?: number
) {
toast.info(
,
+ ,
{ toastId: id, updateId: id }
);
}
@@ -64,7 +52,7 @@ export function pushLoadAttachmentFailure(message?: string) {
}
export function pushFileSizeError(limit: number, units: string) {
- pushToastError('fileSizeWarning', window.i18n('fileSizeWarning'), `Max size: ${limit} ${units}`);
+ pushToastError('fileSizeWarning', `${window.i18n('fileSizeWarning')}: ${limit} ${units}`);
}
export function pushFileSizeErrorAsByte(bytesCount: number) {
@@ -130,15 +118,11 @@ export function pushMessageDeleteForbidden() {
}
export function pushUnableToCall() {
- pushToastError('unableToCall', window.i18n('unableToCallTitle'), window.i18n('unableToCall'));
+ pushToastError('unableToCall', window.i18n('unableToCall'));
}
export function pushedMissedCall(conversationName: string) {
- pushToastInfo(
- 'missedCall',
- window.i18n('callMissedTitle'),
- window.i18n('callMissed', [conversationName])
- );
+ pushToastInfo('missedCall', window.i18n('callMissed', [conversationName]));
}
const openPermissionsSettings = () => {
@@ -150,7 +134,6 @@ export function pushedMissedCallCauseOfPermission(conversationName: string) {
const id = 'missedCallPermission';
toast.info(