make legal buttons configurable

This commit is contained in:
Peli de Halleux 2015-07-22 15:43:11 -07:00
Родитель 6268094b3f
Коммит 91628e645a
4 изменённых файлов: 11 добавлений и 7 удалений

Просмотреть файл

@ -553,11 +553,11 @@ module TDev.Browser {
m.fullWhite();
m.add(div("wall-dialog-header", Runtime.appName));
m.add(div("wall-dialog-body", lf("Running against cloud services v{0}.", relId)));
var legalButtons = Cloud.config.legalButtons.map(b => link(b.name, b.url));
var btns: HTMLElement;
m.add(btns = div("wall-dialog-buttons",
Cloud.getUserId() ? HTML.mkButton(lf("sign out"),() => TheEditor.logoutDialog()) : undefined,
link(lf("terms of use"), "/terms-of-use"),
link(lf("privacy and cookies"), "/privacy")
Cloud.getUserId() ? HTML.mkButton(lf("sign out"), () => TheEditor.logoutDialog()) : undefined,
legalButtons
));
if (EditorSettings.widgets().githubLinks) {
@ -701,7 +701,7 @@ module TDev.Browser {
var copyrights = "<div class='beta-legal'>" +
betaNote +
"<span class='beta-black'>© Copyright 2015 " + Runtime.companyCopyright + "</span>&nbsp;&nbsp;" +
"<span class='beta-underline'>terms of use</span>&nbsp;|&nbsp;<span class='beta-underline'>privacy policy</span>" +
Cloud.config.legalButtons.map(b => Util.fmt("<span class='beta-underline'>{0:q}</span>", b.name)).join("&nbsp;|&nbsp;")
"</div>";
Browser.setInnerHTML(beta, copyrights);

Просмотреть файл

@ -194,6 +194,7 @@ module TDev.Cloud {
hashtag: string;
topicPath: string;
localTopicPath: string;
legalButtons: { name: string; url: string; }[];
tdVersion?: string;
releaseid?: string;
@ -222,6 +223,10 @@ module TDev.Cloud {
liteVersion: null,
topicPath: "/docs/",
localTopicPath: "#topic:",
legalButtons: [
{ name: "terms of use", url: "/terms-of-use" },
{ name: "privacy and cookies", url: "/privacy"}
]
}
export function isArtUrl(url : string) : boolean {

Просмотреть файл

@ -243,8 +243,7 @@ module TDev {
link("try touchdevelop", "")));
m.add(div("wall-dialog-buttons",
link(lf("terms of use"), "/terms-of-use"),
link(lf("privacy and cookies"), "/privacy")
Cloud.config.legalButtons.map(b => link(b.name, b.url))
));
m.show();

Просмотреть файл

@ -1589,7 +1589,7 @@ height: 100%;
bottom: 0;
right: 0em;
left:0em;
font-size: 0.8em;
font-size: 0.7em;
z-index:1;
padding: 0.5em;