Add link to Android application

This commit is contained in:
Pierre HUBERT 2021-02-20 11:13:42 +01:00
parent f5e0629b3e
commit ceaf5edc8b
4 changed files with 32 additions and 20 deletions

View File

@ -4,7 +4,7 @@
* @author Pierre HUBERT * @author Pierre HUBERT
*/ */
const BottomLinks = [ const BottomLinks = () => [
//Language selector //Language selector
{ {
@ -13,6 +13,14 @@ const BottomLinks = [
onclick: function(){ComunicWeb.components.langPicker.show();} 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 //About Comunic
{ {
innerLang: "bottom_bar_action_about", innerLang: "bottom_bar_action_about",

View File

@ -43,26 +43,27 @@ ComunicWeb.components.bottom.main = {
innerHTML: "Comunic     " innerHTML: "Comunic     "
}); });
BottomLinks.forEach(function(link){ if(!signed_in())
BottomLinks().forEach(function(link){
var linkEl = createElem2({ var linkEl = createElem2({
appendTo: leftElements, appendTo: leftElements,
type: "a", type: "a",
href: link.href, href: link.href,
innerHTML: link.innerHTML, innerHTML: link.innerHTML,
innerLang: link.innerLang, innerLang: link.innerLang,
innerHTMLprefix: "<i class='fa "+link.icon+"'></i> " 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);
});
} }
} }

View File

@ -197,7 +197,7 @@ ComunicWeb.components.menuBar.authenticated = {
class: "divider" class: "divider"
}); });
BottomLinks.forEach(addMenuOption); BottomLinks().forEach(addMenuOption);
//Return dropdown content element //Return dropdown content element

View File

@ -25,6 +25,9 @@ declare interface DataConservationPolicySettings {
} }
declare interface StaticServerConfig { declare interface StaticServerConfig {
terms_url: string,
play_store_url: string,
android_direct_download_url: string,
password_policy: PasswordPolicy, password_policy: PasswordPolicy,
data_conservation_policy: DataConservationPolicySettings; data_conservation_policy: DataConservationPolicySettings;
} }