diff --git a/src/components/CscCall.vue b/src/components/CscCall.vue index eae3d63e..924ac7fa 100644 --- a/src/components/CscCall.vue +++ b/src/components/CscCall.vue @@ -1,92 +1,296 @@ - diff --git a/src/components/CscCallDialpad.vue b/src/components/CscCallDialpad.vue new file mode 100644 index 00000000..016435bf --- /dev/null +++ b/src/components/CscCallDialpad.vue @@ -0,0 +1,114 @@ + + + + + diff --git a/src/components/call/CscPhoneNumberInput.vue b/src/components/call/CscPhoneNumberInput.vue new file mode 100644 index 00000000..fe334533 --- /dev/null +++ b/src/components/call/CscPhoneNumberInput.vue @@ -0,0 +1,115 @@ + + + + + diff --git a/src/components/card/CscCardCollapsible.vue b/src/components/card/CscCardCollapsible.vue deleted file mode 100644 index ca7e40e6..00000000 --- a/src/components/card/CscCardCollapsible.vue +++ /dev/null @@ -1,101 +0,0 @@ - - - - - diff --git a/src/components/card/CscNumberChip.vue b/src/components/card/CscNumberChip.vue deleted file mode 100644 index 0e509d08..00000000 --- a/src/components/card/CscNumberChip.vue +++ /dev/null @@ -1,26 +0,0 @@ - - - - - diff --git a/src/locales/en.json b/src/locales/en.json index e6d5762c..0420ea8f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -266,7 +266,7 @@ "call": "Established", "inputNumber": "Input a phone number", "inputValidNumber": "Input a valid phone number", - "number": "Number", + "number": "Phone number", "endCall": "End Call", "endCallDialog": "You are about to end the current call. Are you sure?", "notificationTitle": "Incoming call from {number}", diff --git a/src/mixins/platform.js b/src/mixins/platform.js new file mode 100644 index 00000000..a0e8c9c6 --- /dev/null +++ b/src/mixins/platform.js @@ -0,0 +1,13 @@ + +import { + Platform +} from 'quasar-framework' + +export default { + + computed: { + isMobile() { + return Platform.is.mobile; + } + } +} diff --git a/src/plugins/call.js b/src/plugins/call.js index e6ad9960..3a854ad4 100644 --- a/src/plugins/call.js +++ b/src/plugins/call.js @@ -306,6 +306,15 @@ export class RtcEngineCall { } } + sendDTMF(char) { + if(this.localCall !== null) { + this.localCall.sendDTMF(char); + } + else if (this.remoteCall !== null) { + this.remoteCall.sendDTMF(char); + } + } + getCall() { if(this.localCall !== null) { return this.localCall; diff --git a/src/store/call.js b/src/store/call.js index 1854fdf5..49fc9295 100644 --- a/src/store/call.js +++ b/src/store/call.js @@ -34,7 +34,8 @@ export default { muted: false, caller: false, callee: false, - desktopSharingInstall: false + desktopSharingInstall: false, + dtmf: null }, getters: { getNumber(state) { @@ -136,6 +137,9 @@ export default { }, desktopSharingInstall(state) { return state.desktopSharingInstall; + }, + dtmfState(state) { + return state.dtmf; } }, mutations: { @@ -227,6 +231,9 @@ export default { }, desktopSharingInstall(state) { state.desktopSharingInstall = true; + }, + sendDTMF(state, value) { + state.dtmf = value; } }, actions: { @@ -323,6 +330,12 @@ export default { }, hideCall(context) { context.commit('layout/hideRight', null, { root: true }); + }, + sendDTMF(context, value) { + context.commit('sendDTMF', value); + if(Vue.call.hasRunningCall()) { + Vue.call.sendDTMF(value); + } } } };