diff --git a/client/Gruntfile.js b/client/Gruntfile.js index 55ea402..ad62cec 100644 --- a/client/Gruntfile.js +++ b/client/Gruntfile.js @@ -31,10 +31,6 @@ function getJsTimestamp() { return fs.statSync("dist/js/app.js").mtime.valueOf(); } -function getPrivacyTimestamp() { - return fs.statSync("app/privacy_standalone.txt").mtime.valueOf() + fs.statSync("app/eula.txt").mtime.valueOf(); -} - function getFileUtf8(filepath) { return function() { return fs.readFileSync(filepath).toString("utf-8"); @@ -162,12 +158,6 @@ module.exports = function (grunt) { replace: getCssTimestamp, flags: "g" }, - { - name: "privacy-timestamp", - search: "\\{!privacy-timestamp!\\}", - replace: getPrivacyTimestamp, - flags: "g" - }, { name: "config-session-payloadMessageDelay", search: "parseInt\\(\"\\d+!config.session.payloadMessageDelay\"\\)", diff --git a/client/app/js/app.js b/client/app/js/app.js index 0b20219..9987eca 100644 --- a/client/app/js/app.js +++ b/client/app/js/app.js @@ -203,9 +203,6 @@ define( /* * * * END EDITOR/CONSOLE/PROMPT, START GUI * * * */ // Privacy Policy - $.get("privacy.txt?{!privacy-timestamp!}", function (data) { - $("#privacy").find("article").html(data); - }); $("#privacy").find("[data-purpose='close']").click(function () { anal.sitecontrol("privacy-close"); }); diff --git a/front/src/app.ts b/front/src/app.ts index 9f76049..65ee3af 100644 --- a/front/src/app.ts +++ b/front/src/app.ts @@ -18,6 +18,7 @@ * . */ +import Fs = require("fs"); import Path = require("path"); import { config, logger } from "./shared_wrap"; @@ -56,6 +57,8 @@ async function main() { buildData.locales = config.front.locales; } + buildData.privacy_html = await Fs.promises.readFile(Path.join(__dirname, "..", "..", config.front.static_path, "privacy.txt"), { encoding: "utf-8" }); + try { log.trace("Connecting to Mongo..."); await Mongo.connect(); diff --git a/front/src/express_setup.ts b/front/src/express_setup.ts index e0bbbd6..5bd62f5 100644 --- a/front/src/express_setup.ts +++ b/front/src/express_setup.ts @@ -67,6 +67,7 @@ export let server: Http.Server; export interface BuildData { locales_path?: string; locales?: string[]; + privacy_html?: string; } function getT(req: Express.Request) { diff --git a/front/src/views/index.ejs b/front/src/views/index.ejs index e307bae..f16cda7 100644 --- a/front/src/views/index.ejs +++ b/front/src/views/index.ejs @@ -450,7 +450,7 @@ with Octave Online Server. If not, see .