Yarn formatting.

pull/1703/head
Warrick Corfe-Tan 4 years ago
parent 15afdbfa7d
commit f356c9b843

@ -53,7 +53,7 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
showExitIcon,
headerIconButtons,
headerReverse,
additionalClassName
additionalClassName,
} = props;
const theme = useTheme();
@ -75,7 +75,7 @@ export const SessionWrapperModal = (props: SessionWrapperModalType) => {
};
return (
<div className={"loki-dialog modal " + additionalClassName}>
<div className={'loki-dialog modal ' + additionalClassName}>
<div className="session-confirm-wrapper">
<div className="session-modal">
{showHeader ? (

@ -215,16 +215,16 @@ export class SessionCompositionBox extends React.Component<Props, State> {
const { items } = e.clipboardData;
let imgBlob = null;
for (const item of items) {
const pasteType = item.type.split('/')[0]
const pasteType = item.type.split('/')[0];
if (pasteType === 'image') {
imgBlob = item.getAsFile();
}
switch (pasteType) {
case ('image'):
case 'image':
imgBlob = item.getAsFile();
break;
case ('text'):
case 'text':
this.showLinkSharingConfirmationModalDialog(e);
}
}
@ -252,18 +252,19 @@ export class SessionCompositionBox extends React.Component<Props, State> {
okTheme: SessionButtonColor.Danger,
onClickOk: () => {
window.setSettingValue('link-preview-setting', true);
}
},
});
}
}
/**
*
*
* @param str String to evaluate
* @returns boolean if the string is true or false
*/
private isURL(str: string) {
var urlRegex = '^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$';
var urlRegex =
'^(?!mailto:)(?:(?:http|https|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[0-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]+-?)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))|localhost)(?::\\d{2,5})?(?:(/|\\?|#)[^\\s]*)?$';
var url = new RegExp(urlRegex, 'i');
return str.length < 2083 && url.test(str);
}
@ -389,12 +390,12 @@ export class SessionCompositionBox extends React.Component<Props, State> {
const messagePlaceHolder = isKickedFromGroup
? i18n('youGotKickedFromGroup')
: left
? i18n('youLeftTheGroup')
: isBlocked && isPrivate
? i18n('unblockToSend')
: isBlocked && !isPrivate
? i18n('unblockGroupToSend')
: i18n('sendMessage');
? i18n('youLeftTheGroup')
: isBlocked && isPrivate
? i18n('unblockToSend')
: isBlocked && !isPrivate
? i18n('unblockGroupToSend')
: i18n('sendMessage');
const typingEnabled = this.isTypingEnabled();
let index = 0;

@ -131,7 +131,7 @@ const SessionSvg = (props: {
viewBox: props.viewBox,
glowDuration: props.glowDuration,
glowStartDelay: props.glowStartDelay,
iconColor: props.iconColor
iconColor: props.iconColor,
};
return (

Loading…
Cancel
Save