forked from mozilla/send
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cc85486
commit f0cfc19
Showing
34 changed files
with
2,246 additions
and
146 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,81 @@ | ||
@import './base.css'; | ||
@import './pages/share/share.css'; | ||
@import './pages/signin/signin.css'; | ||
@import './pages/uploads/uploads.css'; | ||
@import './pages/unsupported/unsupported.css'; | ||
@import './templates/archiveTile/archiveTile.css'; | ||
@import './templates/controlArea/controlArea.css'; | ||
@import './templates/downloadButton/downloadButton.css'; | ||
@import './templates/downloadPassword/downloadPassword.css'; | ||
@import './templates/file/file.css'; | ||
@import './templates/fileIcon/fileIcon.css'; | ||
@import './templates/fileList/fileList.css'; | ||
@import './templates/fileManager/fileManager.css'; | ||
@import './templates/footer/footer.css'; | ||
@import './templates/fxPromo/fxPromo.css'; | ||
@import './templates/header/header.css'; | ||
@import './templates/modal/modal.css'; | ||
@import './templates/okDialog/okDialog.css'; | ||
@import './templates/passwordInput/passwordInput.css'; | ||
@import './templates/popup/popup.css'; | ||
@import './templates/selectbox/selectbox.css'; | ||
@import './templates/setPasswordSection/setPasswordSection.css'; | ||
@import './templates/signupDialog/signupDialog.css'; | ||
@import './templates/signupPromo/signupPromo.css'; | ||
@import './templates/title/title.css'; | ||
@import './templates/uploadedFile/uploadedFile.css'; | ||
@import './templates/uploadedFileList/uploadedFileList.css'; | ||
@import './templates/userAccount/userAccount.css'; | ||
@import 'tailwindcss/preflight'; | ||
@import 'tailwindcss/components'; | ||
@import 'tailwindcss/utilities'; | ||
|
||
a { | ||
color: inherit; | ||
text-decoration: none; | ||
} | ||
|
||
progress { | ||
@apply bg-grey-light; | ||
@apply rounded-sm; | ||
@apply w-full; | ||
@apply h-1; | ||
} | ||
|
||
progress::-moz-progress-bar { | ||
@apply bg-blue; | ||
@apply rounded-sm; | ||
} | ||
|
||
progress::-webkit-progress-bar { | ||
@apply bg-grey-light; | ||
@apply rounded-sm; | ||
@apply w-full; | ||
@apply h-1; | ||
} | ||
|
||
progress::-webkit-progress-value { | ||
@apply bg-blue; | ||
@apply rounded-sm; | ||
} | ||
|
||
.main { | ||
@apply bg-blue-lightest; | ||
|
||
min-height: calc(100vh - 6rem); | ||
} | ||
|
||
.header-logo { | ||
background-image: url('../assets/send_logo.svg'); | ||
background-position: left; | ||
background-repeat: no-repeat; | ||
background-size: 2rem; | ||
padding-left: 2.5rem; | ||
text-decoration: none; | ||
} | ||
|
||
.feedback-link { | ||
background-color: #000; | ||
background-image: url('../assets/feedback.svg'); | ||
background-position: 0.125rem 0.25rem; | ||
background-repeat: no-repeat; | ||
background-size: 1.125rem; | ||
color: #fff; | ||
display: block; | ||
font-size: 0.75rem; | ||
line-height: 0.75rem; | ||
padding: 0.375rem 0.375rem 0.375rem 1.25rem; | ||
text-indent: 0.125rem; | ||
white-space: nowrap; | ||
} | ||
|
||
.bg-shades { | ||
background-color: rgba(0, 0, 0, 0.7); | ||
} | ||
|
||
@screen md { | ||
.main { | ||
@apply flex-1; | ||
@apply self-center; | ||
@apply bg-white; | ||
@apply shadow-md; | ||
@apply m-auto; | ||
|
||
min-width: 30rem; | ||
max-width: 60rem; | ||
min-height: 30rem; | ||
max-height: 38rem; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
const choo = require('choo'); | ||
const html = require('choo/html'); | ||
const nanotiming = require('nanotiming'); | ||
const download = require('./ui/download'); | ||
const footer = require('./ui/footer'); | ||
const fxPromo = require('./ui/fxPromo'); | ||
const modal = require('./ui/modal'); | ||
const header = require('./ui/header'); | ||
|
||
nanotiming.disabled = true; | ||
|
||
function banner(state, emit) { | ||
if (state.promo && !state.route.startsWith('/unsupported/')) { | ||
return fxPromo(state, emit); | ||
} | ||
} | ||
|
||
function body(main) { | ||
return function(state, emit) { | ||
const b = html`<body class="flex flex-col font-sans bg-white md:h-screen md:bg-grey-lightest"> | ||
${state.modal && modal(state, emit)} | ||
${banner(state, emit)} | ||
${header(state, emit)} | ||
${main(state, emit)} | ||
${footer(state)} | ||
</body>`; | ||
if (state.layout) { | ||
// server side only | ||
return state.layout(state, b); | ||
} | ||
return b; | ||
}; | ||
} | ||
|
||
module.exports = function() { | ||
const app = choo(); | ||
app.route('/', body(require('./ui/welcome'))); | ||
app.route('/download/:id', body(download)); | ||
app.route('/download/:id/:key', body(download)); | ||
app.route('/unsupported/:reason', body(require('./ui/unsupported'))); | ||
app.route('/legal', body(require('./ui/legal'))); | ||
app.route('/error', body(require('./ui/error'))); | ||
app.route('/blank', body(require('./ui/blank'))); | ||
app.route('/oauth', async function(state, emit) { | ||
try { | ||
await state.user.finishLogin(state.query.code, state.query.state); | ||
emit('replaceState', '/'); | ||
} catch (e) { | ||
emit('replaceState', '/error'); | ||
setTimeout(() => emit('render')); | ||
} | ||
}); | ||
app.route('*', body(require('./ui/notFound'))); | ||
return app; | ||
}; |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.