fixed initial page load rendering for expired downloads and when the upload list isn't empty. fixes #1069 and fixes #1021
This commit is contained in:
parent
e1bbff0047
commit
06b25dcba6
@ -2,6 +2,11 @@ const html = require('choo/html');
|
|||||||
|
|
||||||
module.exports = function() {
|
module.exports = function() {
|
||||||
return html`
|
return html`
|
||||||
<main class="main container"></main>
|
<main class="main relative">
|
||||||
|
<section class="h-full w-full p-6 md:flex md:flex-row z-10">
|
||||||
|
<div class="md:mr-6 md:w-1/2 w-full"></div>
|
||||||
|
<div class="md:w-1/2 mt-6 md:mt-0 w-full"></div>
|
||||||
|
</section>
|
||||||
|
</main>
|
||||||
`;
|
`;
|
||||||
};
|
};
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const archiveTile = require('./archiveTile');
|
const archiveTile = require('./archiveTile');
|
||||||
const intro = require('./intro');
|
const intro = require('./intro');
|
||||||
|
const notFound = require('./notFound');
|
||||||
|
|
||||||
function password(state, emit) {
|
function password(state, emit) {
|
||||||
const fileInfo = state.fileInfo;
|
const fileInfo = state.fileInfo;
|
||||||
@ -81,6 +82,9 @@ module.exports = function(state, emit) {
|
|||||||
let content = '';
|
let content = '';
|
||||||
if (!state.fileInfo) {
|
if (!state.fileInfo) {
|
||||||
state.fileInfo = createFileInfo(state);
|
state.fileInfo = createFileInfo(state);
|
||||||
|
if (!state.fileInfo.nonce) {
|
||||||
|
return notFound(state);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!state.transfer && !state.fileInfo.requiresPassword) {
|
if (!state.transfer && !state.fileInfo.requiresPassword) {
|
||||||
|
@ -11,7 +11,7 @@ function stripEvents(str) {
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
index: async function(req, res) {
|
index: async function(req, res) {
|
||||||
const appState = await state(req);
|
const appState = await state(req);
|
||||||
res.send(stripEvents(routes().toString('/', appState)));
|
res.send(stripEvents(routes().toString('/blank', appState)));
|
||||||
},
|
},
|
||||||
|
|
||||||
blank: async function(req, res) {
|
blank: async function(req, res) {
|
||||||
|
Loading…
Reference in New Issue
Block a user