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

Fix #5247, put shutdown placeholder page in place #5274

Merged
merged 1 commit into from
Jan 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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