Compare commits
13 Commits
v3.4.22
...
chapril-v3
Author | SHA1 | Date | |
---|---|---|---|
8f8f2b9909 | |||
669eedbf03 | |||
59a0c99142 | |||
55afcd2ce7 | |||
83e0ae6303 | |||
d948e8efc7 | |||
deb795625c | |||
898e9742c9 | |||
9cb706fa73 | |||
|
6fff664947 | ||
|
439ac0ab7c | ||
|
dee6b3e9cc | ||
|
dc9d072472 |
|
@ -152,7 +152,7 @@ AWS example using Ubuntu Server `20.04`: [docs/AWS.md](docs/AWS.md)
|
||||||
- Web: _this repository_
|
- Web: _this repository_
|
||||||
- Command-line: [`ffsend`](https://github.com/timvisee/ffsend)
|
- Command-line: [`ffsend`](https://github.com/timvisee/ffsend)
|
||||||
- Android: _see [Android](#android) section_
|
- Android: _see [Android](#android) section_
|
||||||
- Thunderbird: [FileLink provider for Send](https://addons.thunderbird.net/en-US/thunderbird/addon/filelink-provider-for-send/)
|
- Thunderbird: [FileLink provider for Send](https://addons.thunderbird.net/thunderbird/addon/filelink-provider-for-send/)
|
||||||
|
|
||||||
#### Android
|
#### Android
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ export default class Archive {
|
||||||
|
|
||||||
clear() {
|
clear() {
|
||||||
this.files = [];
|
this.files = [];
|
||||||
this.dlimit = this.defaultDownloadLimit;
|
this.dlimit = 100;
|
||||||
this.timeLimit = this.defaultTimeLimit;
|
this.timeLimit = this.defaultTimeLimit;
|
||||||
this.password = null;
|
this.password = null;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ function expiryInfo(translate, archive) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function password(state) {
|
function password(state) {
|
||||||
const MAX_LENGTH = 32;
|
const MAX_LENGTH = 4096;
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<div class="mb-2 px-1">
|
<div class="mb-2 px-1">
|
||||||
|
|
|
@ -32,7 +32,7 @@ module.exports = function(state, emit) {
|
||||||
class="w-full border-l border-t border-b rounded-l-lg rounded-r-none ${invalid
|
class="w-full border-l border-t border-b rounded-l-lg rounded-r-none ${invalid
|
||||||
? 'border-red dark:border-red-40'
|
? 'border-red dark:border-red-40'
|
||||||
: 'border-grey'} leading-loose px-2 py-1 dark:bg-grey-80"
|
: 'border-grey'} leading-loose px-2 py-1 dark:bg-grey-80"
|
||||||
maxlength="32"
|
maxlength="4096"
|
||||||
autocomplete="off"
|
autocomplete="off"
|
||||||
placeholder="${state.translate('unlockInputPlaceholder')}"
|
placeholder="${state.translate('unlockInputPlaceholder')}"
|
||||||
oninput="${inputChanged}"
|
oninput="${inputChanged}"
|
||||||
|
|
112
app/ui/footer.js
112
app/ui/footer.js
|
@ -1,5 +1,7 @@
|
||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const Component = require('choo/component');
|
const Component = require('choo/component');
|
||||||
|
const version = require('../../package.json').version;
|
||||||
|
/*const { browserName } = require('../utils');*/
|
||||||
|
|
||||||
class Footer extends Component {
|
class Footer extends Component {
|
||||||
constructor(name, state) {
|
constructor(name, state) {
|
||||||
|
@ -12,112 +14,18 @@ class Footer extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
createElement() {
|
createElement() {
|
||||||
const translate = this.state.translate;
|
|
||||||
|
|
||||||
// Add additional links from configuration if available
|
|
||||||
var links = [];
|
|
||||||
if (this.state != undefined && this.state.WEB_UI != undefined) {
|
|
||||||
const WEB_UI = this.state.WEB_UI;
|
|
||||||
|
|
||||||
if (WEB_UI.FOOTER_DONATE_URL != '') {
|
|
||||||
links.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.FOOTER_DONATE_URL}" target="_blank">
|
|
||||||
${translate('footerLinkDonate')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
if (WEB_UI.FOOTER_CLI_URL != '') {
|
|
||||||
links.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.FOOTER_CLI_URL}" target="_blank">
|
|
||||||
${translate('footerLinkCli')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
if (WEB_UI.FOOTER_DMCA_URL != '') {
|
|
||||||
links.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.FOOTER_DMCA_URL}" target="_blank">
|
|
||||||
${translate('footerLinkDmca')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
if (WEB_UI.FOOTER_SOURCE_URL != '') {
|
|
||||||
links.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.FOOTER_SOURCE_URL}" target="_blank">
|
|
||||||
${translate('footerLinkSource')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
links.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="https://gitlab.com/timvisee/send" target="_blank">
|
|
||||||
${translate('footerLinkSource')}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Defining a custom footer
|
|
||||||
var footer = [];
|
|
||||||
if (this.state != undefined && this.state.WEB_UI != undefined) {
|
|
||||||
const WEB_UI = this.state.WEB_UI;
|
|
||||||
|
|
||||||
if (WEB_UI.CUSTOM_FOOTER_URL != '' && WEB_UI.CUSTOM_FOOTER_TEXT != '') {
|
|
||||||
footer.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.CUSTOM_FOOTER_URL}" target="_blank">
|
|
||||||
${WEB_UI.CUSTOM_FOOTER_TEXT}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
else if (WEB_UI.CUSTOM_FOOTER_URL != '') {
|
|
||||||
footer.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
<a href="${WEB_UI.CUSTOM_FOOTER_URL}" target="_blank">
|
|
||||||
${WEB_UI.CUSTOM_FOOTER_URL}
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
else if (WEB_UI.CUSTOM_FOOTER_TEXT != '') {
|
|
||||||
footer.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
${WEB_UI.CUSTOM_FOOTER_TEXT}
|
|
||||||
</li>
|
|
||||||
`)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
footer.push(html`
|
|
||||||
<li class="m-2">
|
|
||||||
${translate('footerText')}
|
|
||||||
</li>
|
|
||||||
`);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return html`
|
return html`
|
||||||
<footer
|
<footer
|
||||||
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:items-center justify-between"
|
class="flex flex-col md:flex-row items-start w-full flex-none self-start p-6 md:p-8 font-medium text-xs text-grey-60 dark:text-grey-40 md:justify-end justify-between"
|
||||||
>
|
>
|
||||||
<ul
|
<a
|
||||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-start"
|
href="https://admin.chapril.org/doku.php?id=admin:chatons:drop.chapril.org#personnalisation"
|
||||||
|
rel="noreferrer noopener"
|
||||||
|
alt="Version"
|
||||||
|
target="_blank"
|
||||||
>
|
>
|
||||||
${footer}
|
FirefoxSend chapril-${version}
|
||||||
</ul>
|
</a>
|
||||||
<ul
|
|
||||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
|
||||||
>
|
|
||||||
${links}
|
|
||||||
</ul>
|
|
||||||
</footer>
|
</footer>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
const html = require('choo/html');
|
const html = require('choo/html');
|
||||||
const Component = require('choo/component');
|
const Component = require('choo/component');
|
||||||
const Account = require('./account');
|
const Account = require('./account');
|
||||||
const assets = require('../../common/assets');
|
/*const assets = require('../../common/assets');*/
|
||||||
const { platform } = require('../utils');
|
/*const { platform } = require('../utils');*/
|
||||||
|
|
||||||
class Header extends Component {
|
class Header extends Component {
|
||||||
constructor(name, state, emit) {
|
constructor(name, state, emit) {
|
||||||
|
@ -18,45 +18,66 @@ class Header extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
createElement() {
|
createElement() {
|
||||||
let assetMap = {};
|
|
||||||
if (this.state.ui !== undefined) assetMap = this.state.ui.assets;
|
|
||||||
else
|
|
||||||
assetMap = {
|
|
||||||
icon:
|
|
||||||
this.state.WEB_UI.CUSTOM_ASSETS.icon !== ''
|
|
||||||
? this.state.WEB_UI.CUSTOM_ASSETS.icon
|
|
||||||
: assets.get('icon.svg'),
|
|
||||||
wordmark:
|
|
||||||
this.state.WEB_UI.CUSTOM_ASSETS.wordmark !== ''
|
|
||||||
? this.state.WEB_UI.CUSTOM_ASSETS.wordmark
|
|
||||||
: assets.get('wordmark.svg') + '#logo'
|
|
||||||
};
|
|
||||||
const title =
|
|
||||||
platform() === 'android'
|
|
||||||
? html`
|
|
||||||
<a class="flex flex-row items-center">
|
|
||||||
<img src="${assetMap.icon}" />
|
|
||||||
<svg class="w-48">
|
|
||||||
<use xlink:href="${assetMap.wordmark}" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
`
|
|
||||||
: html`
|
|
||||||
<a class="flex flex-row items-center" href="/">
|
|
||||||
<img
|
|
||||||
alt="${this.state.translate('title')}"
|
|
||||||
src="${assetMap.icon}"
|
|
||||||
/>
|
|
||||||
<svg viewBox="66 0 340 64" class="w-48 md:w-64">
|
|
||||||
<use xlink:href="${assetMap.wordmark}" />
|
|
||||||
</svg>
|
|
||||||
</a>
|
|
||||||
`;
|
|
||||||
return html`
|
return html`
|
||||||
<header
|
<header
|
||||||
class="main-header relative flex-none flex flex-row items-center justify-between w-full px-6 md:px-8 h-16 md:h-24 z-20 bg-transparent"
|
class="main-header relative flex-none flex flex-row items-center justify-between px-6 md:px-8 z-20 bg-transparent"
|
||||||
>
|
>
|
||||||
${title} ${this.account.render()}
|
<!-- Chapril banner code: starting… -->
|
||||||
|
<nav class="chapril-banniere-Nav">
|
||||||
|
<div class="chapril-banniere-Logo" aria-hidden="true">
|
||||||
|
<a href="https://www.chapril.org"
|
||||||
|
><img alt="" src="/Chapril-banner/v2/chapril-banner-logo.png"
|
||||||
|
/></a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Menu" aria-hidden="true">
|
||||||
|
<details>
|
||||||
|
<summary>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
<span></span>
|
||||||
|
</summary>
|
||||||
|
<div><a href="https://www.chapril.org/">Accueil Chapril</a></div>
|
||||||
|
<div>
|
||||||
|
<a href="https://www.chapril.org/services.html"
|
||||||
|
>Services libres</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="https://pouet.april.org/@aprilorg">Nous suivre</a>
|
||||||
|
</div>
|
||||||
|
<div><a href="https://www.chapril.org/cgu.html">CGU</a></div>
|
||||||
|
<div>
|
||||||
|
<a href="https://www.chapril.org/a-propos.html"
|
||||||
|
>Mentions légales</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
<div>
|
||||||
|
<a href="https://www.chapril.org/contact.html"
|
||||||
|
>Nous contacter</a
|
||||||
|
>
|
||||||
|
</div>
|
||||||
|
</details>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://www.chapril.org/">Accueil Chapril</a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://www.chapril.org/services.html">Services libres</a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://pouet.april.org/@aprilorg">Nous suivre</a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://www.chapril.org/cgu.html">CGU</a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://www.chapril.org/a-propos.html">Mentions légales</a>
|
||||||
|
</div>
|
||||||
|
<div class="chapril-banniere-Entree">
|
||||||
|
<a href="https://www.chapril.org/contact.html">Nous contacter</a>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
<!-- Chapril banner code: done. -->
|
||||||
</header>
|
</header>
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 588 B After Width: | Height: | Size: 408 B |
Binary file not shown.
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 972 B |
578
package-lock.json
generated
578
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "send",
|
"name": "send",
|
||||||
"description": "File Sharing Experiment",
|
"description": "File Sharing Experiment",
|
||||||
"version": "3.4.22",
|
"version": "3.4.23",
|
||||||
"author": "Mozilla (https://mozilla.org)",
|
"author": "Mozilla (https://mozilla.org)",
|
||||||
"contributors": [
|
"contributors": [
|
||||||
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
||||||
|
|
76
public/chapril.css
Normal file
76
public/chapril.css
Normal file
|
@ -0,0 +1,76 @@
|
||||||
|
#chapril-banner {
|
||||||
|
/* position: fixed; */
|
||||||
|
|
||||||
|
/* top: 0; */
|
||||||
|
height: 42px !important;
|
||||||
|
width: 100%;
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
background-color: #fafafa;
|
||||||
|
text-align: center;
|
||||||
|
border-bottom: 1px solid #bdbdbd;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-zone {
|
||||||
|
width: 100%;
|
||||||
|
|
||||||
|
/* max-width: 950px; */
|
||||||
|
margin: 0 auto;
|
||||||
|
padding: 0;
|
||||||
|
text-align: left;
|
||||||
|
|
||||||
|
/* border: solid 1px red; */
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-zone > div {
|
||||||
|
float: left;
|
||||||
|
margin: 0 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-menu > ul {
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
list-style: none;
|
||||||
|
text-align: justify;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-menu > ul > li {
|
||||||
|
float: left;
|
||||||
|
margin: 0 10px 0 0;
|
||||||
|
padding: 0;
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
font-family: 'DejaVu Sans', Verdana, Geneva, sans-serif !important;
|
||||||
|
height: 42px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-menu > ul > li:hover {
|
||||||
|
background-color: #dadada;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-menu > ul > li > a {
|
||||||
|
height: 42px;
|
||||||
|
color: #555000;
|
||||||
|
font-size: 12px;
|
||||||
|
text-decoration: none !important;
|
||||||
|
line-height: 42px;
|
||||||
|
border: none !important;
|
||||||
|
padding: 10px 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-aprillogo {
|
||||||
|
float: right !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-aprillogo > a > img {
|
||||||
|
padding-top: 2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#chapril-banner-zone > div > a > img {
|
||||||
|
height: auto !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.send-promo {
|
||||||
|
display: none;
|
||||||
|
}
|
Binary file not shown.
Before Width: | Height: | Size: 15 KiB After Width: | Height: | Size: 9.4 KiB |
|
@ -48,7 +48,7 @@ passwordSetError = Ce mot de passe n’a pas pu être défini
|
||||||
-firefox = Firefox
|
-firefox = Firefox
|
||||||
-mozilla = Mozilla
|
-mozilla = Mozilla
|
||||||
introTitle = Partage de fichiers simple et privé
|
introTitle = Partage de fichiers simple et privé
|
||||||
introDescription = { -send-brand } vous permet de partager des fichiers chiffrés de bout en bout ainsi qu’un lien qui expire automatiquement. Ainsi, vous pouvez garder ce que vous partagez en privé et vous assurer que vos contenus ne restent pas en ligne pour toujours.
|
introDescription = DropChaprilOrg vous permet de partager des fichiers chiffrés de bout en bout ainsi qu’un lien qui expire automatiquement. Ainsi, vous pouvez garder ce que vous partagez en privé et vous assurer que vos contenus ne restent pas en ligne pour toujours.
|
||||||
notifyUploadEncryptDone = Votre fichier est chiffré et prêt à l’envoi
|
notifyUploadEncryptDone = Votre fichier est chiffré et prêt à l’envoi
|
||||||
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
||||||
archiveExpiryInfo = Expire après { $downloadCount } ou { $timespan }
|
archiveExpiryInfo = Expire après { $downloadCount } ou { $timespan }
|
||||||
|
|
|
@ -49,7 +49,7 @@ const conf = convict({
|
||||||
},
|
},
|
||||||
expire_times_seconds: {
|
expire_times_seconds: {
|
||||||
format: 'positive-int-array',
|
format: 'positive-int-array',
|
||||||
default: [300, 3600, 86400, 604800],
|
default: [300, 3600, 86400, 172800, 432000, 604800],
|
||||||
env: 'EXPIRE_TIMES_SECONDS'
|
env: 'EXPIRE_TIMES_SECONDS'
|
||||||
},
|
},
|
||||||
default_expire_seconds: {
|
default_expire_seconds: {
|
||||||
|
@ -59,7 +59,7 @@ const conf = convict({
|
||||||
},
|
},
|
||||||
max_expire_seconds: {
|
max_expire_seconds: {
|
||||||
format: Number,
|
format: Number,
|
||||||
default: 86400 * 7,
|
default: 432000,
|
||||||
env: 'MAX_EXPIRE_SECONDS'
|
env: 'MAX_EXPIRE_SECONDS'
|
||||||
},
|
},
|
||||||
download_counts: {
|
download_counts: {
|
||||||
|
|
|
@ -39,6 +39,11 @@ module.exports = function(state, body = '') {
|
||||||
--color-primary-accent: ${state.ui.colors.accent};
|
--color-primary-accent: ${state.ui.colors.accent};
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<link
|
||||||
|
rel="stylesheet"
|
||||||
|
type="text/css"
|
||||||
|
href="/Chapril-banner/v2/chapril-banner.css"
|
||||||
|
/>
|
||||||
<link
|
<link
|
||||||
rel="stylesheet"
|
rel="stylesheet"
|
||||||
type="text/css"
|
type="text/css"
|
||||||
|
|
|
@ -57,8 +57,9 @@ module.exports = async function(req) {
|
||||||
locale,
|
locale,
|
||||||
capabilities: { account: false },
|
capabilities: { account: false },
|
||||||
translate: getTranslator(locale),
|
translate: getTranslator(locale),
|
||||||
title: config.custom_title,
|
title: 'DropChaprilOrg',
|
||||||
description: config.custom_description,
|
description:
|
||||||
|
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||||
baseUrl,
|
baseUrl,
|
||||||
ui: {
|
ui: {
|
||||||
colors: {
|
colors: {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user