mirror of
https://github.com/timvisee/send.git
synced 2026-04-16 21:34:19 -04:00
Compare commits
1 Commits
v3.4.24
...
revert-101
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71587a604e |
139
.gitlab-ci.yml
139
.gitlab-ci.yml
@@ -1,72 +1,105 @@
|
||||
image: "node:15-slim"
|
||||
|
||||
stages:
|
||||
- test
|
||||
- artifact
|
||||
- release
|
||||
|
||||
before_script:
|
||||
# Install dependencies
|
||||
- apt-get update
|
||||
- apt-get install -y git python3 build-essential libxtst6
|
||||
|
||||
# Prepare Chrome for puppeteer
|
||||
- apt-get install -y wget gnupg
|
||||
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
||||
- apt-get update
|
||||
- apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends
|
||||
|
||||
# Build Send, run npm tests
|
||||
test:
|
||||
stage: test
|
||||
image: "node:16-slim"
|
||||
only:
|
||||
- api
|
||||
- branches
|
||||
- chat
|
||||
- merge_requests
|
||||
- pushes
|
||||
- schedules
|
||||
- tags
|
||||
- triggers
|
||||
- web
|
||||
before_script:
|
||||
# Install dependencies
|
||||
- apt-get update
|
||||
- apt-get install -y git python3 build-essential libxtst6
|
||||
|
||||
# Prepare Chrome for puppeteer
|
||||
- apt-get install -y wget gnupg
|
||||
- wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -
|
||||
- sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
|
||||
- apt-get update
|
||||
- apt-get install -y gconf-service libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 ca-certificates fonts-liberation libappindicator1 libnss3 lsb-release xdg-utils
|
||||
- apt-get install -y google-chrome-stable fonts-ipafont-gothic fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 --no-install-recommends
|
||||
script:
|
||||
- npm ci
|
||||
- npm run lint
|
||||
- npm test
|
||||
|
||||
release-docker:
|
||||
# Build Docker image, export Docker image artifact
|
||||
artifact-docker:
|
||||
stage: artifact
|
||||
image: docker:latest
|
||||
needs: []
|
||||
services:
|
||||
- docker:dind
|
||||
variables:
|
||||
IMG_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||
IMG_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||
before_script: []
|
||||
script:
|
||||
- docker build -t $IMG_NAME .
|
||||
- docker image save -o $IMG_FILE $IMG_NAME
|
||||
artifacts:
|
||||
name: artifact-docker
|
||||
paths:
|
||||
- $IMG_FILE
|
||||
expire_in: 1 week
|
||||
|
||||
# Release public Docker image for the master branch
|
||||
release-docker-master:
|
||||
stage: release
|
||||
image: docker:latest
|
||||
dependencies:
|
||||
- artifact-docker
|
||||
services:
|
||||
- docker:dind
|
||||
only:
|
||||
- api
|
||||
- branches
|
||||
- chat
|
||||
- merge_requests
|
||||
- pushes
|
||||
- schedules
|
||||
- tags
|
||||
- triggers
|
||||
- web
|
||||
- master
|
||||
variables:
|
||||
IMG_IMPORT_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||
IMG_IMPORT_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||
IMG_NAME: "registry.gitlab.com/timvisee/send:master-$CI_COMMIT_SHORT_SHA"
|
||||
before_script: []
|
||||
script:
|
||||
- docker login "$CI_REGISTRY" -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
||||
- docker buildx create --name sendBuilder
|
||||
- docker buildx use sendBuilder
|
||||
- |
|
||||
if [ "$CI_PIPELINE_SOURCE" == "merge_request_event" ]; then
|
||||
IMAGE_NAMES="$CI_REGISTRY_IMAGE/mr:$CI_MERGE_REQUEST_IID"
|
||||
elif [ "$CI_COMMIT_TAG" != "" ]; then
|
||||
IMAGE_NAMES="$CI_REGISTRY_IMAGE:$CI_COMMIT_TAG $CI_REGISTRY_IMAGE:latest"
|
||||
else
|
||||
IMAGE_NAMES="$CI_REGISTRY_IMAGE/$CI_COMMIT_BRANCH:$CI_COMMIT_SHORT_SHA"
|
||||
fi
|
||||
- |
|
||||
for image in $IMAGE_NAMES; do
|
||||
docker buildx build --platform linux/amd64,linux/arm64 -t $image . --push
|
||||
done
|
||||
- |
|
||||
echo "Container image pushed. You can pull it with";
|
||||
for image in $IMAGE_NAMES; do
|
||||
echo "docker pull $image"
|
||||
done
|
||||
# Login in to registry
|
||||
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
||||
|
||||
# Load existing, retag for new image images
|
||||
- docker image load -i $IMG_IMPORT_FILE
|
||||
- docker tag $IMG_IMPORT_NAME $IMG_NAME
|
||||
|
||||
# Publish tagged image
|
||||
- docker push $IMG_NAME
|
||||
|
||||
- 'echo "Docker image artifact published, available as:" && echo " docker pull $IMG_NAME"'
|
||||
|
||||
# Release public Docker image for a version tag
|
||||
release-docker:
|
||||
stage: release
|
||||
image: docker:latest
|
||||
dependencies:
|
||||
- artifact-docker
|
||||
services:
|
||||
- docker:dind
|
||||
only:
|
||||
- /^v(\d+\.)*\d+$/
|
||||
variables:
|
||||
IMG_IMPORT_FILE: "send:git-$CI_COMMIT_SHORT_SHA.tar"
|
||||
IMG_IMPORT_NAME: "send:git-$CI_COMMIT_SHORT_SHA"
|
||||
IMG_NAME: "registry.gitlab.com/timvisee/send:$CI_COMMIT_REF_NAME"
|
||||
IMG_NAME_LATEST: "registry.gitlab.com/timvisee/send:latest"
|
||||
before_script: []
|
||||
script:
|
||||
# Login in to registry
|
||||
- 'docker login registry.gitlab.com -u $DOCKER_USER -p $DOCKER_PASS'
|
||||
|
||||
# Load existing, retag for new image images
|
||||
- docker image load -i $IMG_IMPORT_FILE
|
||||
- docker tag $IMG_IMPORT_NAME $IMG_NAME
|
||||
- docker tag $IMG_IMPORT_NAME $IMG_NAME_LATEST
|
||||
|
||||
# Publish tagged image
|
||||
- docker push $IMG_NAME
|
||||
- docker push $IMG_NAME_LATEST
|
||||
|
||||
- 'echo "Docker image artifact published, available as:" && echo " docker pull $IMG_NAME_LATEST" && echo " docker pull $IMG_NAME"'
|
||||
|
||||
@@ -152,7 +152,7 @@ AWS example using Ubuntu Server `20.04`: [docs/AWS.md](docs/AWS.md)
|
||||
- Web: _this repository_
|
||||
- Command-line: [`ffsend`](https://github.com/timvisee/ffsend)
|
||||
- Android: _see [Android](#android) section_
|
||||
- Thunderbird: [FileLink provider for Send](https://addons.thunderbird.net/thunderbird/addon/filelink-provider-for-send/)
|
||||
- Thunderbird: [FileLink provider for Send](https://addons.thunderbird.net/en-US/thunderbird/addon/filelink-provider-for-send/)
|
||||
|
||||
#### Android
|
||||
|
||||
|
||||
@@ -17,7 +17,6 @@ export default class Archive {
|
||||
constructor(files = [], defaultTimeLimit = 86400, defaultDownloadLimit = 1) {
|
||||
this.files = Array.from(files);
|
||||
this.defaultTimeLimit = defaultTimeLimit;
|
||||
this.defaultDownloadLimit = defaultDownloadLimit;
|
||||
this.timeLimit = defaultTimeLimit;
|
||||
this.dlimit = defaultDownloadLimit;
|
||||
this.password = null;
|
||||
@@ -77,7 +76,7 @@ export default class Archive {
|
||||
|
||||
clear() {
|
||||
this.files = [];
|
||||
this.dlimit = this.defaultDownloadLimit;
|
||||
this.dlimit = 1;
|
||||
this.timeLimit = this.defaultTimeLimit;
|
||||
this.password = null;
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ function expiryInfo(translate, archive) {
|
||||
}
|
||||
|
||||
function password(state) {
|
||||
const MAX_LENGTH = 4096;
|
||||
const MAX_LENGTH = 32;
|
||||
|
||||
return html`
|
||||
<div class="mb-2 px-1">
|
||||
@@ -486,16 +486,6 @@ module.exports.empty = function(state, emit) {
|
||||
})}
|
||||
</button>
|
||||
`;
|
||||
const warning = state.WEB_UI.UPLOAD_AREA_WARNING_HTML
|
||||
? html`
|
||||
<p
|
||||
class="w-full mt-8 p-2 border-default dark:border-grey-70 rounded-default text-orange-60 bg-yellow-40 text-center leading-normal"
|
||||
>
|
||||
${raw(state.WEB_UI.UPLOAD_AREA_WARNING_HTML)}
|
||||
</p>
|
||||
`
|
||||
: '';
|
||||
|
||||
return html`
|
||||
<send-upload-area
|
||||
class="flex flex-col items-center justify-center border-2 border-dashed border-grey-transparent rounded-default px-6 py-16 h-full w-full dark:border-grey-60"
|
||||
@@ -536,7 +526,7 @@ module.exports.empty = function(state, emit) {
|
||||
>
|
||||
${state.translate('addFilesButton')}
|
||||
</label>
|
||||
${upsell} ${warning}
|
||||
${upsell}
|
||||
</send-upload-area>
|
||||
`;
|
||||
|
||||
@@ -569,16 +559,6 @@ module.exports.preview = function(state, emit) {
|
||||
${archiveDetails(state.translate, archive)}
|
||||
</div>
|
||||
`;
|
||||
const warning = state.WEB_UI.DOWNLOAD_WARNING_HTML
|
||||
? html`
|
||||
<p
|
||||
class="w-full mt-4 p-2 border-default dark:border-grey-70 rounded-default text-orange-60 bg-yellow-40 text-center leading-normal"
|
||||
>
|
||||
${raw(state.WEB_UI.DOWNLOAD_WARNING_HTML)}
|
||||
</p>
|
||||
`
|
||||
: '';
|
||||
|
||||
return html`
|
||||
<send-archive
|
||||
class="flex flex-col max-h-full bg-white p-4 w-full md:w-128 dark:bg-grey-90"
|
||||
@@ -594,7 +574,6 @@ module.exports.preview = function(state, emit) {
|
||||
>
|
||||
${state.translate('downloadButtonLabel')}
|
||||
</button>
|
||||
${warning}
|
||||
</send-archive>
|
||||
`;
|
||||
|
||||
|
||||
@@ -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
|
||||
? 'border-red dark:border-red-40'
|
||||
: 'border-grey'} leading-loose px-2 py-1 dark:bg-grey-80"
|
||||
maxlength="4096"
|
||||
maxlength="32"
|
||||
autocomplete="off"
|
||||
placeholder="${state.translate('unlockInputPlaceholder')}"
|
||||
oninput="${inputChanged}"
|
||||
|
||||
@@ -65,45 +65,6 @@ class Footer extends Component {
|
||||
`);
|
||||
}
|
||||
|
||||
// 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"
|
||||
@@ -111,7 +72,7 @@ class Footer extends Component {
|
||||
<ul
|
||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-start"
|
||||
>
|
||||
${footer}
|
||||
<li class="m-2">${translate('footerText')}</li>
|
||||
</ul>
|
||||
<ul
|
||||
class="flex flex-col md:flex-row items-start md:items-center md:justify-end"
|
||||
|
||||
@@ -9,7 +9,6 @@ docker pull registry.gitlab.com/timvisee/send:latest
|
||||
docker run -v $PWD/uploads:/uploads -p 1443:1443 \
|
||||
-e 'DETECT_BASE_URL=true' \
|
||||
-e 'REDIS_HOST=localhost' \
|
||||
-e 'FILE_DIR=/uploads' \
|
||||
registry.gitlab.com/timvisee/send:latest
|
||||
```
|
||||
|
||||
@@ -34,7 +33,7 @@ Config options expecting array values (e.g. `EXPIRE_TIMES_SECONDS`, `DOWNLOAD_CO
|
||||
| `PORT` | Port the server will listen on (defaults to `1443`)
|
||||
| `NODE_ENV` | Run in `development` mode (unsafe) or `production` mode (the default)
|
||||
| `SEND_FOOTER_DMCA_URL` | A URL to a contact page for DMCA requests (empty / not shown by default)
|
||||
| `SENTRY_CLIENT`, `SENTRY_DSN` | Sentry Client ID and DSN for error tracking (optional, disabled by default)
|
||||
| `SENTRY_CLIENT`, `SENTRY_DSN` | Sentry Client ID and DNS for error tracking (optional, disabled by default)
|
||||
|
||||
*Note: more options can be found here: https://github.com/timvisee/send/blob/master/server/config.js*
|
||||
|
||||
@@ -97,11 +96,6 @@ See the table below for the variables and their default values.
|
||||
| UI_CUSTOM_ASSETS_FACEBOOK | | A custom header image for Facebook |
|
||||
| UI_CUSTOM_ASSETS_TWITTER | | A custom header image for Twitter |
|
||||
| UI_CUSTOM_ASSETS_WORDMARK | | A custom wordmark (Text next to the logo) |
|
||||
| UI_CUSTOM_CSS | | Allows you to define a custom CSS file for custom styling |
|
||||
| CUSTOM_FOOTER_TEXT | | Allows you to define a custom footer |
|
||||
| CUSTOM_FOOTER_URL | | Allows you to define a custom URL in your footer |
|
||||
|
||||
Side note: If you define a custom URL and a custom footer, only the footer text will display, but will be hyperlinked to the URL.
|
||||
|
||||
## Examples
|
||||
|
||||
|
||||
29949
package-lock.json
generated
29949
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "send",
|
||||
"description": "File Sharing Experiment",
|
||||
"version": "3.4.24",
|
||||
"version": "3.4.20",
|
||||
"author": "Mozilla (https://mozilla.org)",
|
||||
"contributors": [
|
||||
"Tim Visee <3a4fb3964f@sinenomine.email> (https://timvisee.com)"
|
||||
@@ -98,7 +98,7 @@
|
||||
"husky": "^3.0.9",
|
||||
"intl-pluralrules": "^1.3.1",
|
||||
"lint-staged": "^9.4.2",
|
||||
"mocha": "^10.1.0",
|
||||
"mocha": "^6.2.2",
|
||||
"morgan": "^1.9.1",
|
||||
"nanobus": "^4.5.0",
|
||||
"nanohtml": "^1.9.0",
|
||||
@@ -141,7 +141,7 @@
|
||||
"choo": "^7.0.0",
|
||||
"cldr-core": "^35.1.0",
|
||||
"configstore": "github:dannycoates/configstore#master",
|
||||
"convict": "^6.2.4",
|
||||
"convict": "^6.2.3",
|
||||
"convict-format-with-validator": "^6.2.0",
|
||||
"double-ended-queue": "^2.1.0-0",
|
||||
"express": "^4.17.3",
|
||||
|
||||
@@ -48,12 +48,12 @@ passwordSetError = Toto heslo nemohlo být nastaveno
|
||||
-send-brand =
|
||||
{ $case ->
|
||||
*[nom] Send
|
||||
[gen] Sendu
|
||||
[dat] Sendu
|
||||
[gen] Send
|
||||
[dat] Send
|
||||
[acc] Send
|
||||
[voc] Sende
|
||||
[loc] Sendu
|
||||
[ins] Sendem
|
||||
[voc] Send
|
||||
[loc] Send
|
||||
[ins] Send
|
||||
}
|
||||
-send-short-brand =
|
||||
{ $case ->
|
||||
@@ -86,7 +86,7 @@ passwordSetError = Toto heslo nemohlo být nastaveno
|
||||
[ins] Mozillou
|
||||
}
|
||||
introTitle = Jednoduché a soukromé sdílení souborů
|
||||
introDescription = Se { -send-brand(case: "ins") } jsou sdílené soubory šifrované end-to-end, takže ani my nevíme, co sdílíte. Platnost odkazů je navíc omezená. Soubory tak můžete sdílet soukromě a s jistotou, že se nezůstanou na internetu válet navždy.
|
||||
introDescription = S { -send-brand(case: "ins") } jsou sdílené soubory šifrované end-to-end, takže ani my nevíme, co sdílíte. Platnost odkazů je navíc omezená. Soubory tak můžete sdílet soukromě a s jistotou, že se nezůstanou na internetu válet navždy.
|
||||
notifyUploadEncryptDone = Váš soubor je zašifrovaný a připraven k odeslání
|
||||
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
||||
archiveExpiryInfo = Platnost vyprší po { $downloadCount } nebo za { $timespan }
|
||||
@@ -131,7 +131,7 @@ copyLinkDescription = Soubor můžete sdílet tímto odkazem:
|
||||
copyLinkButton = Zkopírovat odkaz
|
||||
downloadTitle = Stáhnout soubory
|
||||
downloadDescription = Tento soubor byl sdílen přes { -send-brand(case: "acc") } s end-to-end šifrováním a odkazem s omezenou platností.
|
||||
trySendDescription = Vyzkoušejte jednoduché a bezpečné sdílení souborů se { -send-brand(case: "ins") }
|
||||
trySendDescription = Vyzkoušejte jednoduché a bezpečné sdílení souborů s { -send-brand(case: "ins") }
|
||||
# count will always be > 10
|
||||
tooManyFiles =
|
||||
{ $count ->
|
||||
@@ -189,6 +189,6 @@ downloadFirefoxPromo = { -send-short-brand } od aplikace { -firefox }.
|
||||
shareLinkDescription = Sdílet odkaz na soubor:
|
||||
shareLinkButton = Sdílet odkaz
|
||||
# $name is the name of the file
|
||||
shareMessage = Stáhněte si soubor „{ $name }“ se { -send-brand(case: "ins") } - jednoduché a bezpečné sdílení souborů
|
||||
shareMessage = Stáhněte si soubor „{ $name }“ s { -send-brand(case: "ins") } - jednoduché a bezpečné sdílení souborů
|
||||
trailheadPromo = Existuje způsob, jak ochránit své soukromí. Používejte Firefox.
|
||||
learnMore = Zjistit více.
|
||||
|
||||
@@ -53,7 +53,7 @@ introTitle = Простой и безопасный обмен файлами
|
||||
introDescription = { -send-brand } позволяет вам делиться файлами со сквозным шифрованием и ограниченным сроком действия ссылки на загрузку. Так что, вы сможете делиться файлами приватно и они не останутся в сети навсегда.
|
||||
notifyUploadEncryptDone = Ваш файл зашифрован и готов к отправке
|
||||
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
||||
archiveExpiryInfo = Удалить после { $downloadCount } или через { $timespan }
|
||||
archiveExpiryInfo = Срок хранения истекает после { $downloadCount } или через { $timespan }
|
||||
timespanMinutes =
|
||||
{ $num ->
|
||||
[one] { $num } минуту
|
||||
@@ -89,7 +89,7 @@ gb = ГБ
|
||||
# localized number and byte abbreviation. example "2.5MB"
|
||||
fileSize = { $num }{ $units }
|
||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||
totalSize = Всего: { $size }
|
||||
totalSize = Общий размер: { $size }
|
||||
# the next line after the colon contains a file name
|
||||
copyLinkDescription = Скопируйте ссылку, чтобы поделиться своим файлом:
|
||||
copyLinkButton = Копировать ссылку
|
||||
@@ -117,13 +117,13 @@ legalTitle = Уведомление о конфиденциальности { -s
|
||||
legalDateStamp = Версия 1.0, от 12 марта 2019 года
|
||||
# A short representation of a countdown timer containing the number of days, hours, and minutes remaining as digits, example "2d 11h 56m"
|
||||
expiresDaysHoursMinutes = { $days } дн. { $hours } ч. { $minutes } мин.
|
||||
addFilesButton = Добавить
|
||||
addFilesButton = Выберите файлы для выгрузки
|
||||
uploadButton = Выгрузить
|
||||
# the first part of the string 'Drag and drop files or click to send up to 1GB'
|
||||
dragAndDropFiles = Перетащите файлы сюда
|
||||
# the second part of the string 'Drag and drop files or click to send up to 1GB'
|
||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||
orClickWithSize = или кликните сюда для отправки файлов до { $size }
|
||||
orClickWithSize = или щёлкните здесь, чтобы отправить их (до { $size })
|
||||
addPassword = Защитить паролем
|
||||
emailPlaceholder = Введите ваш адрес электронной почты
|
||||
# $size is the size of the file, displayed using the fileSize message as format (e.g. "2.5MB")
|
||||
|
||||
@@ -2,12 +2,12 @@ title = Send
|
||||
importingFile = 正在导入…
|
||||
encryptingFile = 正在加密…
|
||||
decryptingFile = 正在解密…
|
||||
downloadCount = { $num ->
|
||||
[one] 1 次下载
|
||||
downloadCount =
|
||||
{ $num ->
|
||||
*[other] { $num } 次下载
|
||||
}
|
||||
timespanHours = { $num ->
|
||||
[one] 1 小时
|
||||
timespanHours =
|
||||
{ $num ->
|
||||
*[other] { $num } 小时
|
||||
}
|
||||
copiedUrl = 已复制!
|
||||
@@ -26,11 +26,6 @@ notSupportedOutdatedDetail = 很可惜,此版本的 Firefox 不支持 Send 所
|
||||
updateFirefox = 更新 Firefox
|
||||
deletePopupCancel = 取消
|
||||
deleteButtonHover = 删除
|
||||
footerText = 不附属于 Mozilla 或 Firefox。
|
||||
footerLinkDonate = 捐助
|
||||
footerLinkCli = 命令行
|
||||
footerLinkDmca = DMCA
|
||||
footerLinkSource = 源代码
|
||||
passwordTryAgain = 密码不正确。请重试。
|
||||
javascriptRequired = Send 需要 JavaScript
|
||||
whyJavascript = 为什么 Send 需要 JavaScript?
|
||||
@@ -147,4 +142,5 @@ shareLinkDescription = 您的文件链接:
|
||||
shareLinkButton = 分享链接
|
||||
# $name is the name of the file
|
||||
shareMessage = 使用 { -send-brand } 下载“{ $name }”:简单、安全的文件分享服务
|
||||
trailheadPromo = 捍卫隐私不是幻想。加入 Firefox 一同抗争。
|
||||
learnMore = 详细了解。
|
||||
|
||||
@@ -2,12 +2,12 @@ title = Send
|
||||
importingFile = 匯入中…
|
||||
encryptingFile = 加密中…
|
||||
decryptingFile = 解密中…
|
||||
downloadCount = { $num ->
|
||||
[one] 1 次下載
|
||||
downloadCount =
|
||||
{ $num ->
|
||||
*[other] { $num } 次下載
|
||||
}
|
||||
timespanHours = { $num ->
|
||||
[one] 1 小時
|
||||
timespanHours =
|
||||
{ $num ->
|
||||
*[other] { $num } 小時
|
||||
}
|
||||
copiedUrl = 已複製!
|
||||
@@ -26,11 +26,6 @@ notSupportedOutdatedDetail = 很可惜,此版本的 Firefox 不支援 Send 所
|
||||
updateFirefox = 更新 Firefox
|
||||
deletePopupCancel = 取消
|
||||
deleteButtonHover = 刪除
|
||||
footerText = 不隸屬於 Mozilla 或 Firefox。
|
||||
footerLinkDonate = 捐助
|
||||
footerLinkCli = 命令列
|
||||
footerLinkDmca = DMCA
|
||||
footerLinkSource = 原始碼
|
||||
passwordTryAgain = 密碼不正確,請再試一次。
|
||||
javascriptRequired = Send 需要開啟 JavaScript 功能
|
||||
whyJavascript = 為什麼 Send 需要 JavaScript 才能使用?
|
||||
@@ -50,28 +45,27 @@ passwordSetError = 無法設定此密碼
|
||||
-send-short-brand = Send
|
||||
-firefox = Firefox
|
||||
-mozilla = Mozilla
|
||||
|
||||
introTitle = 簡單而私密的檔案共享服務
|
||||
introDescription = { -send-brand } 讓您可透過點對點加密的方式來分享檔案,並提供會自動失效的鏈結。這樣一來就可以保留分享時的隱私,也確保檔案不會永久保存於網路上。
|
||||
notifyUploadEncryptDone = 已加密您的檔案,可以傳送
|
||||
# downloadCount is from the downloadCount string and timespan is a timespanMinutes string. ex. 'Expires after 2 downloads or 25 minutes'
|
||||
archiveExpiryInfo = { $downloadCount } 或 { $timespan } 後失效
|
||||
timespanMinutes = { $num ->
|
||||
[one] 1 分鐘
|
||||
timespanMinutes =
|
||||
{ $num ->
|
||||
*[other] { $num } 分鐘
|
||||
}
|
||||
timespanDays = { $num ->
|
||||
[one] 1 天
|
||||
timespanDays =
|
||||
{ $num ->
|
||||
*[other] { $num } 天
|
||||
}
|
||||
timespanWeeks = { $num ->
|
||||
[one] 1 週
|
||||
timespanWeeks =
|
||||
{ $num ->
|
||||
*[other] { $num } 週
|
||||
}
|
||||
fileCount = { $num ->
|
||||
[one] 1 個檔案
|
||||
*[other] { $num } 個檔案
|
||||
}
|
||||
fileCount =
|
||||
{ $num ->
|
||||
*[other] { $num } 個檔案
|
||||
}
|
||||
# byte abbreviation
|
||||
bytes = 位元組
|
||||
# kibibyte abbreviation
|
||||
@@ -91,15 +85,15 @@ downloadTitle = 下載檔案
|
||||
downloadDescription = 此檔案是透過 { -send-brand } 進行分享,以點對點加密的方式來分享檔案,並提供會自動失效的鏈結。
|
||||
trySendDescription = 快試試 { -send-brand },簡單安全的檔案分享機制。
|
||||
# count will always be > 10
|
||||
tooManyFiles = { $count ->
|
||||
[one] 一次僅能上傳 1 個檔案。
|
||||
*[other] 一次僅能上傳 { $count } 個檔案。
|
||||
}
|
||||
tooManyFiles =
|
||||
{ $count ->
|
||||
*[other] 一次僅能上傳 { $count } 個檔案。
|
||||
}
|
||||
# count will always be > 10
|
||||
tooManyArchives = { $count ->
|
||||
[one] 僅允許 1 個壓縮檔。
|
||||
*[other] 僅允許 { $count } 個壓縮檔。
|
||||
}
|
||||
tooManyArchives =
|
||||
{ $count ->
|
||||
*[other] 僅允許 { $count } 個壓縮檔。
|
||||
}
|
||||
expiredTitle = 此鏈結已經失效。
|
||||
notSupportedDescription = 無法於此瀏覽器使用 { -send-brand }。在最新版的 { -firefox } 中使用 { -send-short-brand } 會有最佳效果,也可在大部分瀏覽器的最新版本當中使用。
|
||||
downloadFirefox = 下載 { -firefox }
|
||||
@@ -142,4 +136,5 @@ shareLinkDescription = 您的檔案鏈結:
|
||||
shareLinkButton = 分享鏈結
|
||||
# $name is the name of the file
|
||||
shareMessage = 使用 { -send-brand } 下載「{ $name }」: 簡單安全的檔案分享機制
|
||||
trailheadPromo = 有種方法可以保護您的隱私,加入 Firefox。
|
||||
learnMore = 了解更多。
|
||||
|
||||
@@ -13,10 +13,6 @@ module.exports = {
|
||||
FOOTER_CLI_URL: config.footer_cli_url,
|
||||
FOOTER_DMCA_URL: config.footer_dmca_url,
|
||||
FOOTER_SOURCE_URL: config.footer_source_url,
|
||||
CUSTOM_FOOTER_TEXT: config.custom_footer_text,
|
||||
CUSTOM_FOOTER_URL: config.custom_footer_url,
|
||||
UPLOAD_AREA_WARNING_HTML: config.upload_area_warning_html,
|
||||
DOWNLOAD_WARNING_HTML: config.download_warning_html,
|
||||
COLORS: {
|
||||
PRIMARY: config.ui_color_primary,
|
||||
ACCENT: config.ui_color_accent
|
||||
|
||||
@@ -165,20 +165,9 @@ const conf = convict({
|
||||
},
|
||||
base_url: {
|
||||
format: 'url',
|
||||
default: 'https://send.example.com',
|
||||
default: 'https://send.firefox.com',
|
||||
env: 'BASE_URL'
|
||||
},
|
||||
custom_title: {
|
||||
format: String,
|
||||
default: 'Send',
|
||||
env: 'CUSTOM_TITLE'
|
||||
},
|
||||
custom_description: {
|
||||
format: String,
|
||||
default:
|
||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
env: 'CUSTOM_DESCRIPTION'
|
||||
},
|
||||
detect_base_url: {
|
||||
format: Boolean,
|
||||
default: false,
|
||||
@@ -254,26 +243,6 @@ const conf = convict({
|
||||
default: 'https://github.com/timvisee/send',
|
||||
env: 'SEND_FOOTER_SOURCE_URL'
|
||||
},
|
||||
custom_footer_text: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_FOOTER_TEXT'
|
||||
},
|
||||
custom_footer_url: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_FOOTER_URL'
|
||||
},
|
||||
upload_area_warning_html: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'SEND_UPLOAD_AREA_WARNING_HTML'
|
||||
},
|
||||
download_warning_html: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'SEND_DOWNLOAD_WARNING_HTML'
|
||||
},
|
||||
ui_color_primary: {
|
||||
format: String,
|
||||
default: '#0a84ff',
|
||||
@@ -284,11 +253,6 @@ const conf = convict({
|
||||
default: '#003eaa',
|
||||
env: 'UI_COLOR_ACCENT'
|
||||
},
|
||||
custom_locale: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'CUSTOM_LOCALE'
|
||||
},
|
||||
ui_custom_assets: {
|
||||
android_chrome_192px: {
|
||||
format: String,
|
||||
@@ -339,11 +303,6 @@ const conf = convict({
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'UI_CUSTOM_ASSETS_WORDMARK'
|
||||
},
|
||||
custom_css: {
|
||||
format: String,
|
||||
default: '',
|
||||
env: 'UI_CUSTOM_CSS'
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -3,10 +3,6 @@ const assets = require('../common/assets');
|
||||
const initScript = require('./initScript');
|
||||
|
||||
module.exports = function(state, body = '') {
|
||||
const custom_css = state.ui.assets.custom_css !== ''
|
||||
? html`<link rel="stylesheet" type="text/css" href="${state.ui.assets.custom_css}" />`
|
||||
: ''
|
||||
|
||||
return html`
|
||||
<!DOCTYPE html>
|
||||
<html lang="${state.locale}">
|
||||
@@ -44,7 +40,6 @@ module.exports = function(state, body = '') {
|
||||
type="text/css"
|
||||
href="${assets.get('app.css')}"
|
||||
/>
|
||||
${custom_css}
|
||||
<link
|
||||
rel="apple-touch-icon"
|
||||
sizes="180x180"
|
||||
|
||||
@@ -3,18 +3,9 @@ const layout = require('./layout');
|
||||
const assets = require('../common/assets');
|
||||
const getTranslator = require('./locale');
|
||||
const { getFxaConfig } = require('./fxa');
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
module.exports = async function(req) {
|
||||
const locale = (() => {
|
||||
if (config.custom_locale != '' && fs.existsSync(path.join(__dirname,'../public/locales',config.custom_locale))) {
|
||||
return config.custom_locale;
|
||||
}
|
||||
else {
|
||||
return req.language || 'en-US';
|
||||
}
|
||||
})();
|
||||
const locale = req.language || 'en-US';
|
||||
let authConfig = null;
|
||||
let robots = 'none';
|
||||
if (req.route && req.route.path === '/') {
|
||||
@@ -43,8 +34,7 @@ module.exports = async function(req) {
|
||||
safari_pinned_tab: assets.get('safari-pinned-tab.svg'),
|
||||
facebook: baseUrl + '/' + assets.get('send-fb.jpg'),
|
||||
twitter: baseUrl + '/' + assets.get('send-twitter.jpg'),
|
||||
wordmark: assets.get('wordmark.svg') + '#logo',
|
||||
custom_css: ''
|
||||
wordmark: assets.get('wordmark.svg') + '#logo'
|
||||
};
|
||||
Object.keys(uiAssets).forEach(index => {
|
||||
if (config.ui_custom_assets[index] !== '')
|
||||
@@ -57,8 +47,9 @@ module.exports = async function(req) {
|
||||
locale,
|
||||
capabilities: { account: false },
|
||||
translate: getTranslator(locale),
|
||||
title: config.custom_title,
|
||||
description: config.custom_description,
|
||||
title: 'Send',
|
||||
description:
|
||||
'Encrypt and send files with a link that automatically expires to ensure your important documents don’t stay online forever.',
|
||||
baseUrl,
|
||||
ui: {
|
||||
colors: {
|
||||
|
||||
@@ -6,13 +6,6 @@ const VersionPlugin = require('./build/version_plugin');
|
||||
const AndroidIndexPlugin = require('./build/android_index_plugin');
|
||||
const ExtractTextPlugin = require('extract-text-webpack-plugin');
|
||||
|
||||
// Fix for node 18+
|
||||
// See: <https://stackoverflow.com/a/78005686/1000145>
|
||||
const crypto = require('crypto');
|
||||
const crypto_orig_createHash = crypto.createHash;
|
||||
crypto.createHash = algorithm =>
|
||||
crypto_orig_createHash(algorithm == 'md4' ? 'sha256' : algorithm);
|
||||
|
||||
const webJsOptions = {
|
||||
babelrc: false,
|
||||
presets: [
|
||||
|
||||
Reference in New Issue
Block a user