Auto-format files using 'npm run format'
This commit is contained in:
parent
74c41897ad
commit
c532ea4770
6 changed files with 14 additions and 12 deletions
|
@ -23,7 +23,7 @@ class FileSender extends EventEmitter {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (xhr.status === 200) {
|
if (xhr.status === 200) {
|
||||||
console.log('The file was successfully deleted.')
|
console.log('The file was successfully deleted.');
|
||||||
} else {
|
} else {
|
||||||
console.log('The file has expired, or has already been deleted.');
|
console.log('The file has expired, or has already been deleted.');
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
const FileSender = require('./fileSender');
|
const FileSender = require('./fileSender');
|
||||||
const { notify } = require('./utils')
|
const { notify } = require('./utils');
|
||||||
const $ = require('jquery');
|
const $ = require('jquery');
|
||||||
|
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
|
|
|
@ -24,12 +24,11 @@ function notify(str) {
|
||||||
if (!('Notification' in window)) {
|
if (!('Notification' in window)) {
|
||||||
return;
|
return;
|
||||||
} else if (Notification.permission === 'granted') {
|
} else if (Notification.permission === 'granted') {
|
||||||
new Notification(str)
|
new Notification(str);
|
||||||
} else if (Notification.permission !== 'denied') {
|
} else if (Notification.permission !== 'denied') {
|
||||||
Notification.requestPermission(function(permission) {
|
Notification.requestPermission(function(permission) {
|
||||||
if (permission === 'granted')
|
if (permission === 'granted') new Notification(str);
|
||||||
new Notification(str);
|
});
|
||||||
})
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,13 @@ const log = mozlog('portal.server');
|
||||||
|
|
||||||
const app = express();
|
const app = express();
|
||||||
|
|
||||||
app.engine('handlebars', exphbs({
|
app.engine(
|
||||||
|
'handlebars',
|
||||||
|
exphbs({
|
||||||
defaultLayout: 'main',
|
defaultLayout: 'main',
|
||||||
partialsDir: 'views/partials/'
|
partialsDir: 'views/partials/'
|
||||||
}));
|
})
|
||||||
|
);
|
||||||
app.set('view engine', 'handlebars');
|
app.set('view engine', 'handlebars');
|
||||||
|
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>Download your file</title>
|
<title>Download your file</title>
|
||||||
<script src="/webcrypto-shim.js"></script>
|
<script src="/webcrypto-shim.js"></script>
|
||||||
<script src="/bundle.js"></script>
|
<script src="/bundle.js"></script>
|
||||||
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css">
|
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/main.css" />
|
<link rel="stylesheet" type="text/css" href="/main.css" />
|
||||||
{{#if shouldRenderAnalytics}}
|
{{#if shouldRenderAnalytics}}
|
||||||
{{> analytics trackerId=trackerId}}
|
{{> analytics trackerId=trackerId}}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
<title>Firefox Fileshare</title>
|
<title>Firefox Fileshare</title>
|
||||||
<script src="/webcrypto-shim.js"></script>
|
<script src="/webcrypto-shim.js"></script>
|
||||||
<script src="/bundle.js"></script>
|
<script src="/bundle.js"></script>
|
||||||
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css">
|
<link rel="stylesheet" href="https://code.cdn.mozilla.net/fonts/fira.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="/main.css" />
|
<link rel="stylesheet" type="text/css" href="/main.css" />
|
||||||
{{#if shouldRenderAnalytics}}
|
{{#if shouldRenderAnalytics}}
|
||||||
{{> analytics trackerId=trackerId}}
|
{{> analytics trackerId=trackerId}}
|
||||||
|
|
Loading…
Reference in a new issue