From a1ac977a5fef2f55d14ac8eb5178f4072656b2d2 Mon Sep 17 00:00:00 2001 From: Ian Bicking Date: Thu, 3 Jan 2019 10:38:08 -0600 Subject: [PATCH] Fix #5247, put shutdown placeholder page in place (#5274) This uses /hosting-shutdown, to try to make it clear that only the server is going away, not the other aspects of the product. The text isn't localized because it isn't written yet, but localization routines are commented-out in the code. --- server/src/pages/hosting-shutdown/model.js | 5 +++ server/src/pages/hosting-shutdown/page.js | 8 ++++ server/src/pages/hosting-shutdown/server.js | 6 +++ server/src/pages/hosting-shutdown/view.js | 50 +++++++++++++++++++++ server/src/server.js | 2 + 5 files changed, 71 insertions(+) create mode 100644 server/src/pages/hosting-shutdown/model.js create mode 100644 server/src/pages/hosting-shutdown/page.js create mode 100644 server/src/pages/hosting-shutdown/server.js create mode 100644 server/src/pages/hosting-shutdown/view.js diff --git a/server/src/pages/hosting-shutdown/model.js b/server/src/pages/hosting-shutdown/model.js new file mode 100644 index 0000000000..d1f78c8312 --- /dev/null +++ b/server/src/pages/hosting-shutdown/model.js @@ -0,0 +1,5 @@ +exports.createModel = function(req) { + return { + title: "shutdown" /* req.getText("shutdownPageTitle") */, + }; +}; diff --git a/server/src/pages/hosting-shutdown/page.js b/server/src/pages/hosting-shutdown/page.js new file mode 100644 index 0000000000..be08193ec1 --- /dev/null +++ b/server/src/pages/hosting-shutdown/page.js @@ -0,0 +1,8 @@ +const { Page } = require("../../reactruntime"); +const viewModule = require("./view"); + +exports.page = new Page({ + dir: __dirname, + viewModule, + noBrowserJavascript: true, +}); diff --git a/server/src/pages/hosting-shutdown/server.js b/server/src/pages/hosting-shutdown/server.js new file mode 100644 index 0000000000..308a5818a1 --- /dev/null +++ b/server/src/pages/hosting-shutdown/server.js @@ -0,0 +1,6 @@ +const reactrender = require("../../reactrender"); + +exports.app = function(req, res) { + const page = require("./page").page; + reactrender.render(req, res, page); +}; diff --git a/server/src/pages/hosting-shutdown/view.js b/server/src/pages/hosting-shutdown/view.js new file mode 100644 index 0000000000..aecff4be26 --- /dev/null +++ b/server/src/pages/hosting-shutdown/view.js @@ -0,0 +1,50 @@ +const reactruntime = require("../../reactruntime"); +const { Footer } = require("../../footer-view.js"); +// const { Localized } = require("fluent-react/compat"); +const React = require("react"); +const PropTypes = require("prop-types"); +const { Header } = require("../../header.js"); + +class Head extends React.Component { + render() { + return ( + + + + ); + } +} + +Head.propTypes = { + staticLink: PropTypes.func, +}; + +class Body extends React.Component { + + render() { + return ( + +
+
+
+
+ { /* */ } +

Hosting shutdown notice.

+ { /*
*/ } + { /* */ } +

We will be discontinuing hosted screenshots. You will still be able to download and copy screenshots in Firefox.

+ { /*
*/ } +
+
+
+
+ ); + } +} + +Body.propTypes = { +}; + +exports.HeadFactory = React.createFactory(Head); +exports.BodyFactory = React.createFactory(Body); diff --git a/server/src/server.js b/server/src/server.js index bd60d21a0b..f6ab2ef46c 100644 --- a/server/src/server.js +++ b/server/src/server.js @@ -1268,6 +1268,8 @@ app.use("/creating", require("./pages/creating/server").app); app.use("/settings", require("./pages/settings/server").app); +app.use("/hosting-shutdown", require("./pages/hosting-shutdown/server").app); + app.use("/", require("./pages/shot/server").app); app.use("/", require("./pages/homepage/server").app);