Skip to content
This repository has been archived by the owner on Jan 17, 2023. It is now read-only.

Commit

Permalink
Fix #5247, put shutdown placeholder page in place (#5274)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
ianb authored and jaredhirsch committed Jan 3, 2019
1 parent ce488dc commit a1ac977
Show file tree
Hide file tree
Showing 5 changed files with 71 additions and 0 deletions.
5 changes: 5 additions & 0 deletions server/src/pages/hosting-shutdown/model.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
exports.createModel = function(req) {
return {
title: "shutdown" /* req.getText("shutdownPageTitle") */,
};
};
8 changes: 8 additions & 0 deletions server/src/pages/hosting-shutdown/page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const { Page } = require("../../reactruntime");
const viewModule = require("./view");

exports.page = new Page({
dir: __dirname,
viewModule,
noBrowserJavascript: true,
});
6 changes: 6 additions & 0 deletions server/src/pages/hosting-shutdown/server.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
const reactrender = require("../../reactrender");

exports.app = function(req, res) {
const page = require("./page").page;
reactrender.render(req, res, page);
};
50 changes: 50 additions & 0 deletions server/src/pages/hosting-shutdown/view.js
Original file line number Diff line number Diff line change
@@ -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 (
<reactruntime.HeadTemplate {...this.props}>
<link rel="stylesheet" href={this.props.staticLink("/static/css/shot-index.css")} />
</reactruntime.HeadTemplate>
);
}
}

Head.propTypes = {
staticLink: PropTypes.func,
};

class Body extends React.Component {

render() {
return (
<reactruntime.BodyTemplate {...this.props}>
<div className="column-space full-height">
<Header hasLogo={true} hasFxa={this.props.hasFxa} />
<div id="shot-index" className="flex-1">
<div className="no-shots" key="no-shots-found">
{ /* <Localized id="shutdownPageIntro"> */ }
<h1>Hosting shutdown notice.</h1>
{ /* </Localized> */ }
{ /* <Localized id="shutdownPageDescription"> */ }
<p>We will be discontinuing hosted screenshots. You will still be able to download and copy screenshots in Firefox.</p>
{ /* </Localized> */ }
</div>
</div>
<Footer {...this.props} />
</div>
</reactruntime.BodyTemplate>
);
}
}

Body.propTypes = {
};

exports.HeadFactory = React.createFactory(Head);
exports.BodyFactory = React.createFactory(Body);
2 changes: 2 additions & 0 deletions server/src/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a1ac977

Please sign in to comment.