Skip to content

Commit 9196a58

Browse files
committed
vBeta8.6.9
1 parent 1ddacd6 commit 9196a58

File tree

30 files changed

+7782
-13076
lines changed

30 files changed

+7782
-13076
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
# Dogegram Backend
22

3-
## Current Release - vBeta8.4.2 (Patch)
3+
## Current Release - vBeta8.6.9
4+
5+
## Changelog 8.6.9
6+
- New Email set-up for a few functions.
7+
- Optimization for helper APIs.
8+
- New model for NSFW detection.
9+
- Optimization of Image upload.
10+
- Optimization for less storage used in the database.
11+
- Fix a few bugs, here and there.
12+
- Add a few bugs, I don't know where
413

514
## Changelog 8.4.2
615
- Just to stay in sync with backend...

package-lock.json

Lines changed: 7540 additions & 12953 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"@sentry/tracing": "^6.8.0",
77
"@stripe/react-stripe-js": "^1.6.0",
88
"@stripe/stripe-js": "^1.20.3",
9-
"@testing-library/jest-dom": "^4.2.4",
9+
"@testing-library/jest-dom": "^5.16.1",
1010
"@testing-library/react": "^9.4.0",
1111
"@testing-library/user-event": "^7.2.1",
1212
"axios": "^0.21.1",
@@ -15,23 +15,25 @@
1515
"emoji-mart": "^3.0.1",
1616
"emoji-picker-react": "^3.4.8",
1717
"express": "^4.17.1",
18-
"formik": "^2.1.4",
18+
"formik": "^2.2.9",
1919
"linkifyjs": "^2.1.9",
2020
"lodash": "^4.17.21",
2121
"metatags-generator": "^1.1.8",
2222
"node-fetch": "^3.0.0",
2323
"react": "^16.12.0",
2424
"react-confetti": "^6.0.1",
2525
"react-dom": "^16.12.0",
26+
"react-dropzone": "^12.0.4",
2627
"react-emoji-render": "^1.2.4",
28+
"react-filerobot-image-editor": "^4.1.1",
2729
"react-google-login": "^5.2.2",
2830
"react-google-recaptcha": "^2.1.0",
2931
"react-hot-toast": "^2.1.1",
3032
"react-image-crop": "^8.6.2",
3133
"react-otp-input": "^2.4.0",
3234
"react-redux": "^7.1.3",
3335
"react-router-dom": "^5.1.2",
34-
"react-scripts": "^4.0.3",
36+
"react-scripts": "^5.0.0",
3537
"react-spring": "^8.0.27",
3638
"react-switch": "^6.0.0",
3739
"redux": "^4.0.5",

public/.well_known/assetlinks.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[{
2+
"relation": ["delegate_permission/common.handle_all_urls"],
3+
"target" : {
4+
"namespace": "android_app",
5+
"package_name": "xyz.dogegram.app",
6+
"sha256_cert_fingerprints": [
7+
"B0:B6:44:C6:E2:66:26:F3:43:C2:DE:5C:79:DF:1D:9D:E8:13:2B:E4:C1:AB:BC:E8:C7:3D:6C:EC:FA:50:06:E5"
8+
] }
9+
}
10+
]

public/robots.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# https://www.robotstxt.org/robotstxt.html
22
User-agent: *
3-
Disallow:
3+
Allow: /
4+

src/components/App/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import MobileNav from '../../components/MobileNav/MobileNav';
1919

2020
import LoadingPage from '../../pages/LoadingPage/LoadingPage';
2121

22-
const TipsPage = lazy(()=>import('../../pages/PaymentsPage/TipsPage'));
22+
const TipsPage = lazy(()=>import('../../pages/PaymentsPage/PayPage'));
2323
const ProfilePage = lazy(() => import('../../pages/ProfilePage/ProfilePage'));
2424
const PostPage = lazy(() => import('../../pages/PostPage/PostPage'));
2525
const ConfirmationPage = lazy(() =>

src/components/Avatar/Avatar.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import PropTypes from 'prop-types';
33
import classNames from 'classnames';
44

55
const Avatar = ({
6-
imageSrc = require('../../assets/img/default-avatar.png').default,
6+
imageSrc,
77
className,
88
onClick,
99
style,
@@ -24,7 +24,7 @@ const Avatar = ({
2424
className={avatarClasses}
2525
onClick={onClick}
2626
style={style}
27-
src={imageSrc}
27+
src={imageSrc != undefined ? (imageSrc.includes('dogeis.me') ? imageSrc : `https://bom1-storage.dogegram.xyz/${imageSrc}`) : (require('../../assets/img/default-avatar.png'))}
2828
alt="Avatar"
2929
/>
3030
);

src/components/LoginCard/LoginCard.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,12 @@ const LoginCard = ({
6969
<OtpInput
7070
value={otp}
7171
onChange={(code)=>{
72-
console.log(otp)
7372
setOtp(code)
7473
}}
7574
numInputs={6}
7675
separator={<span>-</span>}
7776
placeholder="PLEASE"
78-
containerStyle={{margin:'20px'}}
77+
containerStyle={{marginTop:'20px', marginBottom:'20px'}}
7978
inputStyle={{
8079
width: '30px ',
8180
height: '30px',

src/components/NewPost/NewPost.js

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -105,29 +105,7 @@ const NewPost = ({ file, hide }) => {
105105
</MobileHeader>
106106
)}
107107
{renderSections()}
108-
{activeSection !== 'details' && (
109-
<nav className="new-post__nav">
110-
<ul>
111-
<li
112-
className={`new-post__nav-item ${
113-
activeSection === 'filter' && 'new-post__nav-item--active'
114-
}`}
115-
onClick={() => setActiveSection('filter')}
116-
style={{ width: '100%' }}
117-
>
118-
<h4 className="heading-4">Crop and add some filter</h4>
119-
</li>
120-
{/* <li
121-
className={`new-post__nav-item ${
122-
activeSection === 'edit' && 'new-post__nav-item--active'
123-
}`}
124-
onClick={() => setActiveSection('edit')}
125-
>
126-
<h4 className="heading-4">Edit</h4>
127-
</li> */}
128-
</ul>
129-
</nav>
130-
)}
108+
131109
</section>
132110
);
133111
};

src/components/NewPost/NewPostEdit/NewPostEdit.js

Lines changed: 50 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,18 @@ import React, { useState, Fragment, useRef } from 'react';
22
import ReactCrop from 'react-image-crop';
33
import 'react-image-crop/dist/ReactCrop.css';
44
import FilterSelector from '../../FilterSelector/FilterSelector';
5+
import FilerobotImageEditor, { TABS, TOOLS } from 'react-filerobot-image-editor';
56

67
import Icon from '../../Icon/Icon';
78

89
const NewPostEdit = ({ previewImage, setPreviewImage, file, filters }) => {
910
const [imageState, setImageState] = useState({
10-
crop: { unit: '%', aspect: 4 / 5 },
11-
isCropping: false,
11+
crop: { },
12+
isCropping: true,
1213
});
1314
const imageRef = useRef();
1415

16+
console.log(previewImage, 'aaaaaaaaafile')
1517
const getCroppedImg = (image, crop) => {
1618
const canvas = document.createElement('canvas');
1719
const scaleX = image.naturalWidth / image.width;
@@ -46,6 +48,17 @@ const NewPostEdit = ({ previewImage, setPreviewImage, file, filters }) => {
4648
});
4749
};
4850

51+
const [isImgEditorShown, setIsImgEditorShown] = useState(false);
52+
53+
54+
const openImgEditor = () => {
55+
setIsImgEditorShown(true);
56+
};
57+
58+
const closeImgEditor = () => {
59+
setIsImgEditorShown(false);
60+
};
61+
4962
const makeClientCrop = async (crop) => {
5063
window.URL.revokeObjectURL(previewImage.src);
5164
if (imageState.imageRef && crop.width && crop.height) {
@@ -70,15 +83,18 @@ const NewPostEdit = ({ previewImage, setPreviewImage, file, filters }) => {
7083
setImageState((previous) => ({ ...previous, imageRef: image }));
7184
};
7285

73-
const onDragStart = () => {
74-
setImageState((previous) => ({ ...previous, isCropping: true }));
75-
};
86+
const saveImage = (editedImageObject) => {
87+
console.log(editedImageObject, 'editedImageObject');
88+
setPreviewImage({ src: editedImageObject.imageBase64 })
89+
};
7690

91+
92+
const baseFileUrl = window.URL.createObjectURL(file);
7793
return (
7894
<Fragment>
7995
<div className="new-post__preview">
8096
<div className="new-post__preview-image-container">
81-
<ReactCrop
97+
{/*<ReactCrop
8298
src={previewImage.src}
8399
crop={imageState.crop}
84100
onChange={onCropChange}
@@ -93,22 +109,36 @@ const NewPostEdit = ({ previewImage, setPreviewImage, file, filters }) => {
93109
filter: previewImage.filter,
94110
}}
95111
ruleOfThirds
96-
/>
97-
<Icon
98-
icon="checkmark-outline"
99-
className="new-post__crop-button"
100-
style={imageState.isCropping ? { display: 'inline-block' } : {}}
101-
onClick={() => makeClientCrop(imageState.crop)}
102-
/>
112+
/>*/}
113+
<FilerobotImageEditor
114+
style={{ width: '100%', height: '100%', position: 'absolute' }}
115+
onBeforeSave={()=>{return false}}
116+
source={previewImage.src ? previewImage.src : baseFileUrl}
117+
onSave={(editedImageObject, designState) => saveImage(editedImageObject)}
118+
annotationsCommon={{
119+
fill: '#ff0000'
120+
}}
121+
Text={{ text: 'something...' }}
122+
Crop={{
123+
presetsItems: [
124+
{
125+
titleKey: 'classicPotrait',
126+
descriptionKey: '4:3',
127+
ratio: 4 / 3,
128+
},
129+
{
130+
titleKey: 'classicLandscape',
131+
descriptionKey: '21:9',
132+
ratio: 21 / 9,
133+
},
134+
],
135+
}}
136+
tabsIds={[TABS.ADJUST, TABS.FINETUNE, TABS.FILTERS, TABS.RESIZE]} // or {['Adjust', 'Annotate', 'Watermark']}
137+
defaultTabId={TABS.ADJUST} // or 'Annotate'
138+
defaultToolId={TOOLS.CROP} // or 'Text'
139+
/>
103140
</div>
104141
</div>
105-
<FilterSelector
106-
setFilter={(filter, filterName) =>
107-
setPreviewImage((previous) => ({ ...previous, filter, filterName }))
108-
}
109-
previewImage={previewImage.src}
110-
filters={filters}
111-
/>
112142
</Fragment>
113143
);
114144
};

0 commit comments

Comments
 (0)