Skip to content

Commit

Permalink
feature: private notes (#298)
Browse files Browse the repository at this point in the history
* add private notes feature

* code cleanup

* style fixes

* style fixes

* release android version 1.0.10

* style changes
  • Loading branch information
muhsin-k committed Feb 22, 2021
1 parent a73645f commit a7fa450
Show file tree
Hide file tree
Showing 9 changed files with 162 additions and 102 deletions.
4 changes: 2 additions & 2 deletions android/app/build.gradle
Expand Up @@ -134,8 +134,8 @@ android {
applicationId "com.chatwoot.app"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 107
versionName "1.0.7"
versionCode 110
versionName "1.0.10"
multiDexEnabled true
}
splits {
Expand Down
8 changes: 4 additions & 4 deletions ios/Chatwoot.xcodeproj/project.pbxproj
Expand Up @@ -724,13 +724,13 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chatwoot/Chatwoot.entitlements;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEVELOPMENT_TEAM = 6C953F3RX2;
ENABLE_BITCODE = NO;
INFOPLIST_FILE = Chatwoot/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.8;
MARKETING_VERSION = 1.0.10;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand All @@ -751,12 +751,12 @@
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CLANG_ENABLE_MODULES = YES;
CODE_SIGN_ENTITLEMENTS = Chatwoot/Chatwoot.entitlements;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEVELOPMENT_TEAM = 6C953F3RX2;
INFOPLIST_FILE = Chatwoot/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 11.0;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
MARKETING_VERSION = 1.0.8;
MARKETING_VERSION = 1.0.10;
OTHER_LDFLAGS = (
"$(inherited)",
"-ObjC",
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@chatwoot/mobile-app",
"version": "1.0.8",
"version": "1.0.10",
"private": true,
"scripts": {
"clean": "rm -rf $TMPDIR/react-* && watchman watch-del-all && npm cache clean --force",
Expand Down
8 changes: 6 additions & 2 deletions src/components/ChatMessageItem.js
Expand Up @@ -93,6 +93,9 @@ const styles = (theme) => ({
alignItems: 'center',
justifyContent: 'center',
},
iconView: {
paddingLeft: 8,
},
icon: {
width: 16,
height: 16,
Expand Down Expand Up @@ -167,8 +170,9 @@ const ChatMessageItemComponent = ({ type, message, eva: { style, theme }, create
]}>
{message.content}
</CustomText>

<LockIcon style={style.icon} fill={theme['text-basic-color']} />
<View style={style.iconView}>
<LockIcon style={style.icon} fill={theme['text-basic-color']} />
</View>
</View>
) : (
<Hyperlink linkStyle={style.linkStyle} onPress={(url) => handleURL({ URL: url })}>
Expand Down
4 changes: 2 additions & 2 deletions src/components/ConversationItem.js
Expand Up @@ -222,7 +222,7 @@ const styles = (theme) => ({
color: theme['color-primary-default'],
fontSize: theme['font-size-extra-extra-small'],
fontWeight: theme['font-semi-bold'],
borderRadius: 8,
borderRadius: 4,
padding: 4,
marginTop: 4,
backgroundColor: theme['color-background-inbox'],
Expand All @@ -231,7 +231,7 @@ const styles = (theme) => ({
color: theme['color-primary-default'],
fontSize: theme['font-size-extra-extra-small'],
fontWeight: theme['font-semi-bold'],
borderRadius: 8,
borderRadius: 4,
marginTop: 4,
marginLeft: 8,
padding: 4,
Expand Down
3 changes: 2 additions & 1 deletion src/i18n/en.json
Expand Up @@ -60,7 +60,8 @@
"RE_OPEN": "Reopen conversation",
"ASSIGN": "Assign conversation",
"FILE_SIZE_LIMIT_MESSAGE": "Attachment size should be less than 5MB",
"CANCEL": "Cancel"
"CANCEL": "Cancel",
"PRIVATE_MSG_INPUT": "This will be visible only to Agents"
},
"FILTER": {
"HEADER_TITLE": "Conversation Filter",
Expand Down
30 changes: 18 additions & 12 deletions src/screens/ChatScreen/components/Attachment.js
@@ -1,18 +1,19 @@
import React, { createRef } from 'react';
import { Button, withStyles, Icon } from '@ui-kitten/components';
import { withStyles, Icon } from '@ui-kitten/components';
import { launchCamera, launchImageLibrary } from 'react-native-image-picker';
import ActionSheet from 'react-native-actions-sheet';
import PropTypes from 'prop-types';
import AttachmentActionItem from './AttachmentActionItem';

const PlusIcon = (style) => {
return <Icon {...style} name="plus" />;
};
import { Keyboard } from 'react-native';

const styles = (theme) => ({
button: {
paddingHorizontal: 0,
paddingVertical: 0,
backgroundColor: 'transparent',
flex: 1,
alignSelf: 'flex-start',
justifyContent: 'flex-start',
},
});
const propTypes = {
Expand All @@ -27,10 +28,13 @@ const propTypes = {
const imagePickerOptions = {
noData: true,
};
const Attachment = ({ conversationId, eva: { style }, onSelectAttachment }) => {
const Attachment = ({ conversationId, eva: { style, theme }, onSelectAttachment }) => {
const actionSheetRef = createRef();
const handleChoosePhoto = () => {
actionSheetRef.current?.setModalVisible();
Keyboard.dismiss();
setTimeout(() => {
actionSheetRef.current?.setModalVisible();
}, 10);
};
const openCamera = () => {
launchCamera(imagePickerOptions, (response) => {
Expand Down Expand Up @@ -60,13 +64,15 @@ const Attachment = ({ conversationId, eva: { style }, onSelectAttachment }) => {

return (
<React.Fragment>
<Button
style={style.button}
appearance="ghost"
size="large"
accessoryLeft={PlusIcon}
<Icon
name="attach-outline"
width={24}
height={24}
onPress={handleChoosePhoto}
isAttachmentMode
fill={theme['text-hint-color']}
/>

<ActionSheet ref={actionSheetRef} gestureEnabled defaultOverlayOpacity={0.3}>
<AttachmentActionItem
text="Camera"
Expand Down

0 comments on commit a7fa450

Please sign in to comment.