mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-26 05:49:22 +00:00
Add link to Android application
This commit is contained in:
parent
f5e0629b3e
commit
ceaf5edc8b
@ -4,7 +4,7 @@
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
const BottomLinks = [
|
||||
const BottomLinks = () => [
|
||||
|
||||
//Language selector
|
||||
{
|
||||
@ -13,6 +13,14 @@ const BottomLinks = [
|
||||
onclick: function(){ComunicWeb.components.langPicker.show();}
|
||||
},
|
||||
|
||||
// Android application
|
||||
{
|
||||
innerHTML: tr("Android app"),
|
||||
icon: "fa-android",
|
||||
href: ServerConfig.conf.play_store_url,
|
||||
target: "_blank"
|
||||
},
|
||||
|
||||
//About Comunic
|
||||
{
|
||||
innerLang: "bottom_bar_action_about",
|
||||
|
@ -43,26 +43,27 @@ ComunicWeb.components.bottom.main = {
|
||||
innerHTML: "Comunic "
|
||||
});
|
||||
|
||||
BottomLinks.forEach(function(link){
|
||||
if(!signed_in())
|
||||
BottomLinks().forEach(function(link){
|
||||
|
||||
var linkEl = createElem2({
|
||||
appendTo: leftElements,
|
||||
type: "a",
|
||||
href: link.href,
|
||||
innerHTML: link.innerHTML,
|
||||
innerLang: link.innerLang,
|
||||
innerHTMLprefix: "<i class='fa "+link.icon+"'></i> "
|
||||
var linkEl = createElem2({
|
||||
appendTo: leftElements,
|
||||
type: "a",
|
||||
href: link.href,
|
||||
innerHTML: link.innerHTML,
|
||||
innerLang: link.innerLang,
|
||||
innerHTMLprefix: "<i class='fa "+link.icon+"'></i> "
|
||||
});
|
||||
|
||||
if(link.target)
|
||||
linkEl.setAttribute("target", link.target);
|
||||
|
||||
if(link.onclick)
|
||||
linkEl.onclick = link.onclick;
|
||||
|
||||
add_space(leftElements);
|
||||
add_space(leftElements);
|
||||
});
|
||||
|
||||
if(link.target)
|
||||
linkEl.setAttribute("target", link.target);
|
||||
|
||||
if(link.onclick)
|
||||
linkEl.onclick = link.onclick;
|
||||
|
||||
add_space(leftElements);
|
||||
add_space(leftElements);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
@ -197,7 +197,7 @@ ComunicWeb.components.menuBar.authenticated = {
|
||||
class: "divider"
|
||||
});
|
||||
|
||||
BottomLinks.forEach(addMenuOption);
|
||||
BottomLinks().forEach(addMenuOption);
|
||||
|
||||
|
||||
//Return dropdown content element
|
||||
|
3
assets/js/typings/ServerConfig.d.ts
vendored
3
assets/js/typings/ServerConfig.d.ts
vendored
@ -25,6 +25,9 @@ declare interface DataConservationPolicySettings {
|
||||
}
|
||||
|
||||
declare interface StaticServerConfig {
|
||||
terms_url: string,
|
||||
play_store_url: string,
|
||||
android_direct_download_url: string,
|
||||
password_policy: PasswordPolicy,
|
||||
data_conservation_policy: DataConservationPolicySettings;
|
||||
}
|
Loading…
Reference in New Issue
Block a user