@webitel/ui-sdk 24.6.46 → 24.6.49
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/package.json
CHANGED
|
@@ -12,7 +12,6 @@ import applyTransform, {
|
|
|
12
12
|
notify,
|
|
13
13
|
sanitize,
|
|
14
14
|
snakeToCamel,
|
|
15
|
-
starToSearch,
|
|
16
15
|
} from '../../transformers/index.js';
|
|
17
16
|
|
|
18
17
|
const instance = getDefaultInstance();
|
|
@@ -45,7 +44,6 @@ const getUsersList = async (params) => {
|
|
|
45
44
|
|
|
46
45
|
const url = applyTransform(params, [
|
|
47
46
|
merge(getDefaultGetParams()),
|
|
48
|
-
starToSearch('search'),
|
|
49
47
|
(params) => ({ ...params, q: params.search }),
|
|
50
48
|
sanitize(fieldsToSend),
|
|
51
49
|
camelToSnake(),
|
|
Binary file
|
|
@@ -2,6 +2,7 @@ import { CallActions, ChatActions, JobState } from 'webitel-sdk';
|
|
|
2
2
|
import i18n from '../../../locale/i18n.js';
|
|
3
3
|
import BaseStoreModule from '../../../store/BaseStoreModules/BaseStoreModule.js';
|
|
4
4
|
import endChatSound from '../assets/audio/end-chat.wav';
|
|
5
|
+
import endCallSound from '../assets/audio/end-call.mp3';
|
|
5
6
|
import newChatSound from '../assets/audio/new-chat.wav';
|
|
6
7
|
import newMessageSound from '../assets/audio/new-message.wav';
|
|
7
8
|
import ringingSound from '../assets/audio/ringing.mp3';
|
|
@@ -19,10 +20,10 @@ const getNotificationSound = (action) => {
|
|
|
19
20
|
case ChatActions.Close:
|
|
20
21
|
return new Audio(endChatSound);
|
|
21
22
|
case CallActions.Ringing:
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
23
|
+
// default call ringtone sound
|
|
24
|
+
return new Audio(ringingSound);
|
|
25
|
+
case CallActions.Hangup:
|
|
26
|
+
return new Audio(endCallSound);
|
|
26
27
|
default:
|
|
27
28
|
return false;
|
|
28
29
|
}
|
|
@@ -120,10 +121,18 @@ export default class NotificationsStoreModule extends BaseStoreModule {
|
|
|
120
121
|
if (context.getters.IS_SOUND_ALLOWED
|
|
121
122
|
&& !localStorage.getItem('wtIsPlaying')
|
|
122
123
|
) {
|
|
124
|
+
if (action === CallActions.Hangup
|
|
125
|
+
&& !localStorage.getItem('settings/callEndSound'))
|
|
126
|
+
return;
|
|
127
|
+
|
|
123
128
|
const audio = sound instanceof Audio ? sound : new Audio(sound);
|
|
129
|
+
|
|
124
130
|
audio.addEventListener('ended', () => {
|
|
125
131
|
context.dispatch('STOP_SOUND');
|
|
126
132
|
}, { once: true });
|
|
133
|
+
|
|
134
|
+
if (action === CallActions.Ringing) audio.loop = true;
|
|
135
|
+
|
|
127
136
|
audio.play();
|
|
128
137
|
localStorage.setItem('wtIsPlaying', 'true');
|
|
129
138
|
context.commit('SET_CURRENTLY_PLAYING', audio);
|