-
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[mirotalkwebrtc] - add settings/language
- Loading branch information
1 parent
d9d96ed
commit 13b0c70
Showing
5 changed files
with
83 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,7 @@ | |
* @license For private project or commercial purposes contact us at: [email protected] or purchase it directly via Code Canyon: | ||
* @license https://codecanyon.net/item/a-selfhosted-mirotalks-webrtc-rooms-scheduler-server/42643313 | ||
* @author Miroslav Pejic - [email protected] | ||
* @version 1.1.21 | ||
* @version 1.1.22 | ||
*/ | ||
|
||
const isMobile = !!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test( | ||
|
@@ -28,6 +28,7 @@ const navSFU = document.getElementById('navSFU'); | |
const navBRO = document.getElementById('navBRO'); | ||
const navSup = document.getElementById('navSup'); | ||
const navAcc = document.getElementById('navAcc'); | ||
const navSet = document.getElementById('navSet'); | ||
|
||
const myProfile = document.getElementById('myProfile'); | ||
|
||
|
@@ -83,6 +84,9 @@ const accountServicesAllowed = document.getElementById('account-services-allowed | |
const accountRoomsAllowed = document.getElementById('account-rooms-allowed'); | ||
const accountDelete = document.getElementById('account-delete'); | ||
|
||
const settingsDiv = document.getElementById('settingsDiv'); | ||
const settingsClose = document.getElementById('settings-close-btn'); | ||
|
||
const addRowDiv = document.getElementById('addRowDiv'); | ||
const openAddBtn = document.getElementById('open-add-btn'); | ||
const closeAddBtn = document.getElementById('add-close-btn'); | ||
|
@@ -360,10 +364,15 @@ navBRO.addEventListener('click', () => { | |
navSup.addEventListener('click', () => { | ||
openURL(config.Author.Support, true); | ||
}); | ||
|
||
navAcc.addEventListener('click', () => { | ||
getMyAccount(); | ||
}); | ||
|
||
navSet.addEventListener('click', () => { | ||
toggleSettings(); | ||
}); | ||
|
||
hideBoxesDS.addEventListener('click', () => { | ||
toggleBoxesDS(false); | ||
}); | ||
|
@@ -401,6 +410,10 @@ accountDelete.addEventListener('click', () => { | |
delMyAccount(); | ||
}); | ||
|
||
settingsClose.addEventListener('click', () => { | ||
toggleSettings(); | ||
}); | ||
|
||
function navShow(elements = []) { | ||
elemDisplay(search, false); | ||
elemDisplay(dsDash, false); | ||
|
@@ -453,6 +466,17 @@ function toggleAccount() { | |
} | ||
} | ||
|
||
function toggleSettings() { | ||
if (settingsDiv.classList.contains('show')) { | ||
animateCSS(settingsDiv, 'fadeOutRight').then((ok) => { | ||
settingsDiv.classList.toggle('show'); | ||
}); | ||
} else { | ||
settingsDiv.classList.toggle('show'); | ||
animateCSS(settingsDiv, 'fadeInRight'); | ||
} | ||
} | ||
|
||
async function showDataTable() { | ||
navDash.click(); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
'use strict'; | ||
|
||
const trScript = document.createElement('script'); | ||
trScript.setAttribute('async', ''); | ||
trScript.setAttribute('src', 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit'); | ||
document.head.appendChild(trScript); | ||
|
||
function googleTranslateElementInit() { | ||
new google.translate.TranslateElement({ pageLanguage: 'en' }, 'google_translate_element'); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters