@esvndev/es-react-template-chat 0.0.99 → 0.0.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +45 -65
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +45 -65
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -72282,7 +72282,7 @@ const ChatLog = (props) => {
|
|
|
72282
72282
|
const [isOpen, setIsOpen] = useState(false);
|
|
72283
72283
|
const [openModalPreview, setOpenModalPreview] = useState(false);
|
|
72284
72284
|
useState(false);
|
|
72285
|
-
useState(false);
|
|
72285
|
+
const [openModalReminder, setOpenModalReminder] = useState(false);
|
|
72286
72286
|
useState(false);
|
|
72287
72287
|
useState('');
|
|
72288
72288
|
useState(null);
|
|
@@ -72860,70 +72860,50 @@ const ChatLog = (props) => {
|
|
|
72860
72860
|
fontWeight: 500
|
|
72861
72861
|
}, children: moment(chat.time).format("HH:mm") })] }));
|
|
72862
72862
|
}, []);
|
|
72863
|
-
|
|
72864
|
-
|
|
72865
|
-
|
|
72866
|
-
|
|
72867
|
-
|
|
72868
|
-
|
|
72869
|
-
|
|
72870
|
-
|
|
72871
|
-
|
|
72872
|
-
|
|
72873
|
-
|
|
72874
|
-
|
|
72875
|
-
|
|
72876
|
-
|
|
72877
|
-
|
|
72878
|
-
|
|
72879
|
-
|
|
72880
|
-
|
|
72881
|
-
|
|
72882
|
-
|
|
72883
|
-
|
|
72884
|
-
|
|
72885
|
-
|
|
72886
|
-
|
|
72887
|
-
|
|
72888
|
-
|
|
72889
|
-
|
|
72890
|
-
|
|
72891
|
-
|
|
72892
|
-
|
|
72893
|
-
|
|
72894
|
-
|
|
72895
|
-
|
|
72896
|
-
|
|
72897
|
-
|
|
72898
|
-
|
|
72899
|
-
|
|
72900
|
-
|
|
72901
|
-
|
|
72902
|
-
|
|
72903
|
-
|
|
72904
|
-
|
|
72905
|
-
|
|
72906
|
-
|
|
72907
|
-
// <div
|
|
72908
|
-
// style={{
|
|
72909
|
-
// border: '1px solid #00cfe8',
|
|
72910
|
-
// color: '#00cfe8',
|
|
72911
|
-
// padding: '8px',
|
|
72912
|
-
// borderRadius: 4,
|
|
72913
|
-
// cursor: 'pointer',
|
|
72914
|
-
// fontWeight: 600,
|
|
72915
|
-
// fontSize: 14,
|
|
72916
|
-
// width: '100%'
|
|
72917
|
-
// }}
|
|
72918
|
-
// onClick={() => {
|
|
72919
|
-
// setOpenModalReminder(true)
|
|
72920
|
-
// }}
|
|
72921
|
-
// >
|
|
72922
|
-
// Xem chi tiết
|
|
72923
|
-
// </div>
|
|
72924
|
-
// </div>
|
|
72925
|
-
// )
|
|
72926
|
-
// }, [])
|
|
72863
|
+
useCallback((chat) => {
|
|
72864
|
+
let msgContent = chat.msg;
|
|
72865
|
+
let timeDisplay = chat.time;
|
|
72866
|
+
try {
|
|
72867
|
+
const parsed = JSON.parse(chat.msg);
|
|
72868
|
+
if (parsed && typeof parsed === 'object') {
|
|
72869
|
+
msgContent = parsed.content || chat.msg;
|
|
72870
|
+
timeDisplay = parsed.scheduleTime || chat.time;
|
|
72871
|
+
}
|
|
72872
|
+
}
|
|
72873
|
+
catch (e) {
|
|
72874
|
+
// Not JSON, use original
|
|
72875
|
+
}
|
|
72876
|
+
return (jsxs("div", { style: {
|
|
72877
|
+
borderTopRightRadius: 6,
|
|
72878
|
+
borderBottomRightRadius: 6,
|
|
72879
|
+
// borderTopLeftRadius: 6, // Should be conditional or default
|
|
72880
|
+
borderBottomLeftRadius: 6,
|
|
72881
|
+
backgroundColor: '#fff',
|
|
72882
|
+
padding: '20px 20px 15px 20px',
|
|
72883
|
+
boxShadow: '0 4px 24px 0 rgba(34, 41, 47, 0.1)',
|
|
72884
|
+
minWidth: 300,
|
|
72885
|
+
textAlign: 'center',
|
|
72886
|
+
marginBottom: 15
|
|
72887
|
+
}, children: [jsx("div", { style: { marginBottom: 8, display: 'flex', justifyContent: 'center' }, children: jsx(SvgClock, { color: "#ea5455", fontSize: 32 }) }), jsx("div", { style: { fontWeight: 600, fontSize: 16, marginBottom: 4, color: '#5e5873' }, children: msgContent }), jsxs("div", { style: { color: '#6e6b7b', fontSize: 12, marginBottom: 16, display: 'flex', alignItems: 'center', justifyContent: 'center' }, children: [jsx(SvgClock, { fontSize: 12, style: { marginRight: 4 } }), moment(timeDisplay).calendar(null, {
|
|
72888
|
+
lastDay: '[Hôm qua lúc] HH:mm',
|
|
72889
|
+
sameDay: '[Hôm nay lúc] HH:mm',
|
|
72890
|
+
nextDay: '[Ngày mai lúc] HH:mm',
|
|
72891
|
+
lastWeek: 'dddd [lúc] HH:mm',
|
|
72892
|
+
nextWeek: 'dddd [lúc] HH:mm',
|
|
72893
|
+
sameElse: 'DD/MM/YYYY HH:mm'
|
|
72894
|
+
})] }), jsx("div", { style: {
|
|
72895
|
+
border: '1px solid #00cfe8',
|
|
72896
|
+
color: '#00cfe8',
|
|
72897
|
+
padding: '8px',
|
|
72898
|
+
borderRadius: 4,
|
|
72899
|
+
cursor: 'pointer',
|
|
72900
|
+
fontWeight: 600,
|
|
72901
|
+
fontSize: 14,
|
|
72902
|
+
width: '100%'
|
|
72903
|
+
}, onClick: () => {
|
|
72904
|
+
setOpenModalReminder(true);
|
|
72905
|
+
}, children: "Xem chi ti\u1EBFt" })] }));
|
|
72906
|
+
}, []);
|
|
72927
72907
|
// const renderMessageReply = useCallback((type: IArchiveType, msg?: string, path?: any[]) => {
|
|
72928
72908
|
// switch (type) {
|
|
72929
72909
|
// case "file": // ✅ THÊM CASE NÀY
|