Compare commits
9 Commits
6fff664947
...
8f8f2b9909
Author | SHA1 | Date |
---|---|---|
Romain H | 8f8f2b9909 | |
Romain H | 669eedbf03 | |
Romain H | 59a0c99142 | |
Christian P. MOMON | 55afcd2ce7 | |
Christian P. MOMON | 83e0ae6303 | |
Christian P. MOMON | d948e8efc7 | |
Christian P. MOMON | deb795625c | |
Christian P. MOMON | 898e9742c9 | |
Christian P. MOMON | 9cb706fa73 |
|
@ -77,7 +77,7 @@ export default class Archive {
|
|||
|
||||
clear() {
|
||||
this.files = [];
|
||||
this.dlimit = this.defaultDownloadLimit;
|
||||
this.dlimit = 100;
|
||||
this.timeLimit = this.defaultTimeLimit;
|
||||
this.password = null;
|
||||
}
|
||||
|
|
112
app/ui/footer.js
112
app/ui/footer.js
|
@ -1,5 +1,7 @@
|
|||
const html = require('choo/html');
|
||||
const Component = require('choo/component');
|
||||
const version = require('../../package.json').version;
|
||||
/*const { browserName } = require('../utils');*/
|
||||
|
||||
class Footer extends Component {
|
||||
constructor(name, state) {
|
||||
|
@ -12,112 +14,18 @@ class Footer extends Component {
|
|||
}
|
||||
|
||||
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`
|
||||
<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
|
||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-start"
|
||||
<a
|
||||
href="https://admin.chapril.org/doku.php?id=admin:chatons:drop.chapril.org#personnalisation"
|
||||
rel="noreferrer noopener"
|
||||
alt="Version"
|
||||
target="_blank"
|
||||
>
|
||||
${footer}
|
||||
</ul>
|
||||
<ul
|
||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
||||
>
|
||||
${links}
|
||||
</ul>
|
||||
FirefoxSend chapril-${version}
|
||||
</a>
|
||||
</footer>
|
||||
`;
|
||||
}
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
const html = require('choo/html');
|
||||
const Component = require('choo/component');
|
||||
const Account = require('./account');
|
||||
const assets = require('../../common/assets');
|
||||
const { platform } = require('../utils');
|
||||
/*const assets = require('../../common/assets');*/
|
||||
/*const { platform } = require('../utils');*/
|
||||
|
||||
class Header extends Component {
|
||||
constructor(name, state, emit) {
|
||||
|
@ -18,45 +18,66 @@ class Header extends Component {
|
|||
}
|
||||
|
||||
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`
|
||||
<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>
|
||||
`;
|
||||
}
|
||||
|
|
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 |
|
@ -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
|
||||
-mozilla = Mozilla
|
||||
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
|
||||
# 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 }
|
||||
|
|
|
@ -49,7 +49,7 @@ const conf = convict({
|
|||
},
|
||||
expire_times_seconds: {
|
||||
format: 'positive-int-array',
|
||||
default: [300, 3600, 86400, 604800],
|
||||
default: [300, 3600, 86400, 172800, 432000, 604800],
|
||||
env: 'EXPIRE_TIMES_SECONDS'
|
||||
},
|
||||
default_expire_seconds: {
|
||||
|
@ -59,7 +59,7 @@ const conf = convict({
|
|||
},
|
||||
max_expire_seconds: {
|
||||
format: Number,
|
||||
default: 86400 * 7,
|
||||
default: 432000,
|
||||
env: 'MAX_EXPIRE_SECONDS'
|
||||
},
|
||||
download_counts: {
|
||||
|
|
|
@ -39,6 +39,11 @@ module.exports = function(state, body = '') {
|
|||
--color-primary-accent: ${state.ui.colors.accent};
|
||||
}
|
||||
</style>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
href="/Chapril-banner/v2/chapril-banner.css"
|
||||
/>
|
||||
<link
|
||||
rel="stylesheet"
|
||||
type="text/css"
|
||||
|
|
|
@ -57,8 +57,9 @@ module.exports = async function(req) {
|
|||
locale,
|
||||
capabilities: { account: false },
|
||||
translate: getTranslator(locale),
|
||||
title: config.custom_title,
|
||||
description: config.custom_description,
|
||||
title: 'DropChaprilOrg',
|
||||
description:
|
||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
baseUrl,
|
||||
ui: {
|
||||
colors: {
|
||||
|
|
Loading…
Reference in New Issue