mirror of
https://github.com/lingble/chatwoot.git
synced 2025-11-02 20:18:08 +00:00
Add an intermediate pending state for widget messages (#323)
* Add an intermediate pending state for widget messages * Remove unnecessary setTimeout * Rename method
This commit is contained in:
10
app/javascript/widget/helpers/uuid.js
Normal file
10
app/javascript/widget/helpers/uuid.js
Normal file
@@ -0,0 +1,10 @@
|
||||
const getUuid = () =>
|
||||
'xxxxxxxx4xxx'.replace(/[xy]/g, c => {
|
||||
// eslint-disable-next-line
|
||||
const r = (Math.random() * 16) | 0;
|
||||
// eslint-disable-next-line
|
||||
const v = c === 'x' ? r : (r & 0x3) | 0x8;
|
||||
return v.toString(16);
|
||||
});
|
||||
|
||||
export default getUuid;
|
||||
Reference in New Issue
Block a user