Fixing rimraf transpile bug. Adding PR fixes - icon buttons.

pull/2000/head
warrickct 3 years ago
parent e32f20d8bc
commit f17b923add

@ -44,7 +44,7 @@
"transpile": "tsc --incremental",
"transpile:watch": "tsc -w",
"integration-test": "mocha --recursive --exit --timeout 30000 \"./ts/test-integration/**/*.test.js\" \"./ts/test/*.test.js\"",
"clean-transpile": "rimraf 'ts/**/*.js ts/*.js' 'ts/*.js.map' 'ts/**/*.js.map' && rimraf tsconfig.tsbuildinfo;",
"clean-transpile": "rimraf 'ts/**/*.js' 'ts/*.js' 'ts/*.js.map' 'ts/**/*.js.map' && rimraf tsconfig.tsbuildinfo;",
"ready": "yarn clean-transpile; yarn grunt && yarn lint-full && yarn test",
"build:webpack:sql-worker": "cross-env NODE_ENV=production webpack -c webpack-sql-worker.config.ts",
"sedtoAppImage": "sed -i 's/\"target\": \\[\"deb\", \"rpm\", \"freebsd\"\\]/\"target\": \"AppImage\"/g' package.json",

@ -888,6 +888,10 @@
flex-direction: column;
align-items: stretch;
overflow: hidden;
.session-icon-button:first-child {
margin-right: $session-margin-sm;
}
}
.module-conversation-list-item__header {

@ -22,13 +22,12 @@ import {
} from '../state/ducks/conversations';
import _ from 'underscore';
import { useMembersAvatars } from '../hooks/useMembersAvatar';
import { SessionIcon } from './session/icon';
import { SessionIcon, SessionIconButton } from './session/icon';
import { useDispatch, useSelector } from 'react-redux';
import { SectionType } from '../state/ducks/section';
import { getFocusedSection } from '../state/selectors/section';
import { ConversationNotificationSettingType } from '../models/conversation';
import { Flex } from './basic/Flex';
import { SessionButton, SessionButtonColor } from './session/SessionButton';
import { forceSyncConfigurationNowIfNeeded } from '../session/utils/syncUtils';
import { updateUserDetailsModal } from '../state/ducks/modalDialog';
import { approveConversation, blockConvoById } from '../interactions/conversationInteractions';
@ -364,17 +363,25 @@ const ConversationListItem = (props: Props) => {
flexDirection="row"
justifyContent="flex-end"
>
<SessionButton
<SessionIconButton
iconType="exit"
iconSize="large"
onClick={handleConversationBlock}
buttonColor={SessionButtonColor.Danger}
text={window.i18n('blockUser')}
backgroundColor="var(--color-destructive)"
iconColor="var(--color-foreground-primary)"
iconPadding="var(--margins-xs)"
borderRadius="2px"
/>
<SessionButton
buttonColor={SessionButtonColor.Green}
<SessionIconButton
iconType="check"
iconSize="large"
onClick={async () => {
await approveConversation(conversationId);
}}
text={window.i18n('accept')}
backgroundColor="var(--color-accent)"
iconColor="var(--color-foreground-primary)"
iconPadding="var(--margins-xs)"
borderRadius="2px"
/>
</Flex>
) : null}

@ -240,27 +240,9 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
return;
}
const conversationRequests = conversations.filter(conversation => {
// Add Open Group to list as soon as the name has been set
if (
conversation.isPublic() &&
(!conversation.get('name') || conversation.get('name') === 'Unknown group')
) {
return false;
}
// Remove all invalid conversations and conversatons of devices associated
// with cancelled attempted links
if (!conversation.isPublic && !conversation.get('active_at')) {
return false;
}
if (conversation.attributes.isApproved || !conversation.get('active_at')) {
return false;
}
return true;
});
const conversationRequests = conversations.filter(
c => c.isPrivate() && c.get('active_at') && c.get('isApproved')
);
let syncRequired = false;

@ -432,7 +432,7 @@ export const _getConversationRequests = (
isMessageRequestEnabled?: boolean
): Array<ReduxConversationType> => {
const pushToMessageRequests =
isMessageRequestEnabled && window.lokiFeatureFlags?.useMessageRequests;
isMessageRequestEnabled && window?.lokiFeatureFlags?.useMessageRequests;
return _.filter(sortedConversations, conversation => {
return pushToMessageRequests && !conversation.isApproved && !conversation.isBlocked;
});

Loading…
Cancel
Save