mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
Add link to Android application
This commit is contained in:
parent
f5e0629b3e
commit
ceaf5edc8b
@ -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",
|
||||||
|
@ -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);
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -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
|
||||||
|
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 {
|
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;
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user