Skip to content

Commit

Permalink
clear
Browse files Browse the repository at this point in the history
  • Loading branch information
Gannon001 committed May 6, 2019
1 parent acf03ba commit f1ba98f
Show file tree
Hide file tree
Showing 19 changed files with 33 additions and 31 deletions.
4 changes: 2 additions & 2 deletions resources/esx_addons_gcphone/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function notifyAlertSMS (number, alert, listSrc)
end

AddEventHandler('esx_phone:registerNumber', function(number, type, sharePos, hasDispatch, hideNumber, hidePosIfAnon)
print('==== Enregistrement du telephone ' .. number .. ' => ' .. type)
print('= INFO = Enregistrement du telephone ' .. number .. ' => ' .. type)
local hideNumber = hideNumber or false
local hidePosIfAnon = hidePosIfAnon or false

Expand Down Expand Up @@ -89,7 +89,7 @@ AddEventHandler('esx_addons_gcphone:startCall', function (number, message, coord
}, PhoneNumbers[number].sources)
end)
else
print('Appels sur un service non enregistre => numero : ' .. number)
print('= WARNING = Appels sur un service non enregistre => numero : ' .. number)
end
end)

Expand Down
6 changes: 1 addition & 5 deletions resources/gcphone/client/client.lua
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ end)
RegisterNUICallback('notififyUseRTC', function (use, cb)
USE_RTC = use
if USE_RTC == true and inCall == true then
print('USE RTC ON')
inCall = false
Citizen.InvokeNative(0xE036A705F989E049)
NetworkSetTalkerProximity(2.5)
Expand Down Expand Up @@ -730,7 +729,6 @@ end)
RegisterNUICallback('takePhoto', function(data, cb)
CreateMobilePhone(1)
CellCamActivate(true, true)
print(json.encode(data))
takePhoto = true
while takePhoto do
Citizen.Wait(0)
Expand All @@ -750,9 +748,7 @@ RegisterNUICallback('takePhoto', function(data, cb)
local resp = json.decode(data)
DestroyMobilePhone()
CellCamActivate(false, false)
print(json.encode(resp))
cb(json.encode({ url = resp.files[1].url }))

cb(json.encode({ url = resp.files[1].url }))
end)
takePhoto = false
end
Expand Down
6 changes: 2 additions & 4 deletions resources/gcphone/server/server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -387,13 +387,11 @@ AddEventHandler('gcPhone:internal_startCall', function(source, phone_number, rtc
local srcIdentifier = getPlayerID(source)

local srcPhone = ''
print(json.encode(extraData))
if extraData ~= nil and extraData.useNumber ~= nil then
srcPhone = extraData.useNumber
else
srcPhone = getNumberPhone(srcIdentifier)
end
print('CALL WITH NUMBER ' .. srcPhone)
local destPlayer = getIdentifierByPhoneNumber(phone_number)
local is_valid = destPlayer ~= nil and destPlayer ~= srcIdentifier
AppelsEnCours[indexCall] = {
Expand Down Expand Up @@ -436,14 +434,14 @@ end)

RegisterServerEvent('gcPhone:candidates')
AddEventHandler('gcPhone:candidates', function (callId, candidates)
print('send cadidate', callId, candidates)
-- print('send cadidate', callId, candidates)
if AppelsEnCours[callId] ~= nil then
local source = source
local to = AppelsEnCours[callId].transmitter_src
if source == to then
to = AppelsEnCours[callId].receiver_src
end
print('TO', to)
-- print('TO', to)
TriggerClientEvent('gcPhone:candidates', to, candidates)
end
end)
Expand Down
2 changes: 1 addition & 1 deletion src_htmlPhone/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<html>
<head>
<meta charset="utf-8">
<link href="//netdna.bootstrapcdn.com/font-awesome/4.0.3/css/font-awesome.css" rel="stylesheet">
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
</head>
<body>
<div id="app"></div>
Expand Down
2 changes: 1 addition & 1 deletion src_htmlPhone/src/PhoneAPI.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class PhoneAPI {
this.voiceRTC = new VoiceRTC(this.config.RTCConfig)
USE_VOICE_RTC = true
}
console.log('JS USE RTC', this.config.useWebRTCVocal)
// console.log('JS USE RTC', this.config.useWebRTCVocal)
this.notififyUseRTC(this.config.useWebRTCVocal)
}
return this.config
Expand Down
6 changes: 3 additions & 3 deletions src_htmlPhone/src/components/Appels/AppelsRecents.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ export default {
const isValid = numero.startsWith('#') === false
this.ignoreControls = true
let choix = [
{id: 1, title: this.IntlString('APP_PHONE_DELETE'), icons: 'fa-circle-o', color: 'orange'},
{id: 2, title: this.IntlString('APP_PHONE_DELETE_ALL'), icons: 'fa-circle-o', color: 'red'},
{id: 1, title: this.IntlString('APP_PHONE_DELETE'), icons: 'fa-trash', color: 'orange'},
{id: 2, title: this.IntlString('APP_PHONE_DELETE_ALL'), icons: 'fa-trash', color: 'red'},
{id: 3, title: this.IntlString('CANCEL'), icons: 'fa-undo'}
]
if (isValid === true) {
choix = [{id: 0, title: this.IntlString('APP_PHONE_CALL'), icons: 'fa-call-o'}, ...choix]
choix = [{id: 0, title: this.IntlString('APP_PHONE_CALL'), icons: 'fa-phone'}, ...choix]
}
const rep = await Modal.CreateModal({ choix })
this.ignoreControls = false
Expand Down
1 change: 0 additions & 1 deletion src_htmlPhone/src/components/Menu.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ export default {
this.$router.push({ name: app.routeName })
},
onEnter () {
console.log(this.Apps[this.currentSelect])
this.openApp(this.Apps[this.currentSelect])
},
onBack: function () {
Expand Down
4 changes: 2 additions & 2 deletions src_htmlPhone/src/components/Modal/Modal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
v-bind:style="{color: val.color}"
@click.stop="selectItem(val)"
>
<i @click.stop="selectItem(val)" class="fa" :class="val.icons" ></i>{{val.title}}
<i @click.stop="selectItem(val)" class="fas" :class="val.icons" ></i>{{val.title}}
</div>


Expand Down Expand Up @@ -126,7 +126,7 @@ export default {
font-weight: 400;
font-size: 22px;
}
.modal-choix .fa {
.modal-choix .fa, .modal-choix .fas {
font-size: 18px;
line-height: 24px;
margin-left: 12px;
Expand Down
4 changes: 2 additions & 2 deletions src_htmlPhone/src/components/Tchat/TchatChannel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default {
this.ignoreControls = true
let choix = [
{id: 1, title: this.IntlString('APP_DARKTCHAT_NEW_CHANNEL'), icons: 'fa-plus', color: 'green'},
{id: 2, title: this.IntlString('APP_DARKTCHAT_DELETE_CHANNEL'), icons: 'fa-circle-o', color: 'orange'},
{id: 2, title: this.IntlString('APP_DARKTCHAT_DELETE_CHANNEL'), icons: 'fa-minus', color: 'orange'},
{id: 3, title: this.IntlString('APP_DARKTCHAT_CANCEL'), icons: 'fa-undo'}
]
if (this.tchatChannels.length === 0) {
Expand Down Expand Up @@ -104,7 +104,7 @@ export default {
},
async addChannelOption () {
try {
const rep = await Modal.CreateTextModal({limit: 20, title: 'Ajouter un channel'})
const rep = await Modal.CreateTextModal({limit: 20, title: this.IntlString('APP_DARKTCHAT_NEW_CHANNEL')})
let channel = (rep || {}).text || ''
channel = channel.toLowerCase().replace(/[^a-z]/g, '')
if (channel.length > 0) {
Expand Down
3 changes: 2 additions & 1 deletion src_htmlPhone/src/components/messages/Messages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ export default {
})
},
quit () {
this.$router.push({path: '/messages'})
// this.$router.push({path: '/messages'})
this.$router.go(-1)
},
onUp: function () {
if (this.ignoreControls === true) return
Expand Down
15 changes: 12 additions & 3 deletions src_htmlPhone/src/components/messages/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export default {
}
},
methods: {
...mapActions(['deleteMessagesNumber', 'deleteAllMessages']),
...mapActions(['deleteMessagesNumber', 'deleteAllMessages', 'startCall']),
onSelect: function (data) {
if (data.id === -1) {
this.$router.push({name: 'messages.selectcontact'})
Expand All @@ -33,15 +33,24 @@ export default {
this.disableList = true
Modal.CreateModal({
choix: [
{id: 1, title: this.IntlString('APP_MESSAGE_ERASE_CONVERSATION'), icons: 'fa-circle-o', color: 'orange'},
{id: 2, title: this.IntlString('APP_MESSAGE_ERASE_ALL_CONVERSATIONS'), icons: 'fa-circle-o', color: 'red'},
{id: 4, title: this.IntlString('APP_PHONE_CALL'), icons: 'fa-phone'},
{id: 5, title: this.IntlString('APP_PHONE_CALL_ANONYMOUS'), icons: 'fa-mask'},
{id: 6, title: this.IntlString('APP_MESSAGE_NEW_MESSAGE'), icons: 'fa-sms'},
{id: 1, title: this.IntlString('APP_MESSAGE_ERASE_CONVERSATION'), icons: 'fa-trash', color: 'orange'},
{id: 2, title: this.IntlString('APP_MESSAGE_ERASE_ALL_CONVERSATIONS'), icons: 'fa-trash', color: 'red'},
{id: 3, title: this.IntlString('CANCEL'), icons: 'fa-undo'}
]
}).then(rep => {
if (rep.id === 1) {
this.deleteMessagesNumber({num: data.number})
} else if (rep.id === 2) {
this.deleteAllMessages()
} else if (rep.id === 4) {
this.startCall({ numero: data.number })
} else if (rep.id === 5) {
this.startCall({ numero: '#' + data.number })
} else if (rep.id === 6) {
this.$router.push({name: 'messages.view', params: data})
}
this.disableList = false
})
Expand Down
1 change: 0 additions & 1 deletion src_htmlPhone/src/components/twitter/TwitterScreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ export default {
this.currentScreenIndex = 0
},
openMenu (index) {
console.log('Click detect index => ' + index)
this.currentScreenIndex = index
},
quit () {
Expand Down
2 changes: 0 additions & 2 deletions src_htmlPhone/src/components/twitter/TwitterTopTweet.vue
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,6 @@ export default {
}
},
onBack () {
console.log('onBackonBackonBackonBack')
if (this.imgZoom !== undefined) {
this.imgZoom = undefined
return
Expand All @@ -183,7 +182,6 @@ export default {
if (this.selectMessage !== -1) {
this.selectMessage = -1
} else {
console.log('emit')
this.$bus.$emit('twitterHome')
}
},
Expand Down
3 changes: 2 additions & 1 deletion src_htmlPhone/src/store/modules/phone.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const state = {
zoom: window.localStorage['gc_zoom'] || '100%',
volume: parseFloat(window.localStorage['gc_volume']) || 1,
mouse: window.localStorage['gc_mouse'] === 'true',
lang: window.localStorage['gc_language'] || 'fr_FR',
lang: window.localStorage['gc_language'],
config: {
reseau: 'Gannon',
useFormatNumberFrance: false,
Expand Down Expand Up @@ -88,6 +88,7 @@ const getters = {
return AvailableLanguage
},
IntlString ({ config, lang }) {
lang = lang || config.defaultLanguage
if (config.language[lang] === undefined) {
return (LABEL) => LABEL
}
Expand Down
5 changes: 3 additions & 2 deletions src_htmlPhone/static/config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
"number": "police",
"display": "Police",
"backgroundColor": "blue",
"letter": "J"
"letter": "P"
}
],

Expand Down Expand Up @@ -216,8 +216,8 @@
"routeName": "9gag"
}
],
"defaultLanguage": "en_US",
"language": {

"fr_FR": {
"NAME": "Français",
"PHONE_WARNING_MESSAGE": "Saturation mémoires !",
Expand All @@ -235,6 +235,7 @@
"APP_CONFIG_RESET": "Formater",
"APP_CONFIG_RESET_CONFIRM": "TOUT SUPPRIMER",
"APP_PHONE_CALL": "Appeler",
"APP_PHONE_CALL_ANONYMOUS": "Appeler en anomyne",
"APP_PHONE_DELETE": "Effacer",
"APP_PHONE_DELETE_ALL": "Effacer TOUT.",
"APP_PHONE_TITLE": "Téléphone",
Expand Down
Binary file removed src_htmlPhone/static/fonts/fontawesome-webfont.eot
Binary file not shown.
Binary file removed src_htmlPhone/static/fonts/fontawesome-webfont.ttf
Binary file not shown.
Binary file removed src_htmlPhone/static/fonts/fontawesome-webfont.woff
Binary file not shown.
Binary file removed src_htmlPhone/static/fonts/fontawesome-webfont.woff2
Binary file not shown.

0 comments on commit f1ba98f

Please sign in to comment.