Compare commits

..

7 Commits

Author SHA1 Message Date
schlagmichdoch c7b7badb3d Increase version to v1.11.1
## Fixes
- Fix PWA install button on chromium based browsers (#383) (Thanks @realchrislovett)
- Fix wrong file extension on chromium based browsers if mime type is not set (#355)

## Languages
- Translations updates from Hosted Weblate (Japanese)
2025-02-19 12:24:53 +01:00
schlagmichdoch 13e75f525d Merge pull request #382 from weblate/weblate-pairdrop-pairdrop-spa
Translations update from Hosted Weblate
2025-02-19 12:19:46 +01:00
schlagmichdoch b7c1893ac0 Merge pull request #381 from schlagmichdoch/fix-filename-wo-suffix
WIP:Fix chromium file extension if mime type is not set
2025-02-19 12:17:55 +01:00
Chris Lovett 341fa7fdf0 Restore desktop Chrome PWA button (#383)
* Restore desktop Chrome PWA button with start_url ./
2025-02-19 11:46:00 +01:00
Hosted Weblate aa09da3076 Translated using Weblate (Japanese)
Currently translated at 100.0% (166 of 166 strings)

Co-authored-by: maboroshin <maboroshin@users.noreply.hosted.weblate.org>
Translate-URL: https://hosted.weblate.org/projects/pairdrop/pairdrop-spa/ja/
Translation: PairDrop/pairdrop-spa
2025-02-18 13:34:01 +01:00
schlagmichdoch 547038c9bc Fix file name display if no file extension is present 2025-02-17 19:32:54 +01:00
schlagmichdoch a39d8cdc84 Fix chromium filename by defaulting mime to "application/octet-stream" 2025-02-17 19:20:17 +01:00
11 changed files with 28 additions and 25 deletions
+2 -2
View File
@@ -36,7 +36,7 @@ If applicable, add screenshots to help explain your problem.
**Bug occurs on official PairDrop instance https://pairdrop.net/** **Bug occurs on official PairDrop instance https://pairdrop.net/**
No | Yes No | Yes
Version: v1.11.0 Version: v1.11.1
**Bug occurs on self-hosted PairDrop instance** **Bug occurs on self-hosted PairDrop instance**
No | Yes No | Yes
@@ -44,7 +44,7 @@ No | Yes
**Self-Hosted Setup** **Self-Hosted Setup**
Proxy: Nginx | Apache2 Proxy: Nginx | Apache2
Deployment: docker run | docker compose | npm run start:prod Deployment: docker run | docker compose | npm run start:prod
Version: v1.11.0 Version: v1.11.1
**Additional context** **Additional context**
Add any other context about the problem here. Add any other context about the problem here.
+2 -2
View File
@@ -45,11 +45,11 @@ This pairdrop-cli version was released alongside v1.10.4
#### Linux / Mac #### Linux / Mac
1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases) 1. Download the latest _pairdrop-cli.zip_ from the [releases page](https://github.com/schlagmichdoch/PairDrop/releases)
```shell ```shell
wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.0/pairdrop-cli.zip" wget "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.1/pairdrop-cli.zip"
``` ```
or or
```shell ```shell
curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.0/pairdrop-cli.zip" curl -LO "https://github.com/schlagmichdoch/PairDrop/releases/download/v1.11.1/pairdrop-cli.zip"
``` ```
2. Unzip the archive to a folder of your choice e.g. `/usr/share/pairdrop-cli/` 2. Unzip the archive to a folder of your choice e.g. `/usr/share/pairdrop-cli/`
```shell ```shell
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "pairdrop", "name": "pairdrop",
"version": "1.11.0", "version": "1.11.1",
"lockfileVersion": 3, "lockfileVersion": 3,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "pairdrop", "name": "pairdrop",
"version": "1.11.0", "version": "1.11.1",
"license": "ISC", "license": "ISC",
"dependencies": { "dependencies": {
"express": "^4.18.2", "express": "^4.18.2",
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "pairdrop", "name": "pairdrop",
"version": "1.11.0", "version": "1.11.1",
"type": "module", "type": "module",
"description": "", "description": "",
"main": "server/index.js", "main": "server/index.js",
+1 -1
View File
@@ -668,7 +668,7 @@
</svg> </svg>
<div class="title-wrapper" dir="ltr"> <div class="title-wrapper" dir="ltr">
<h1>PairDrop</h1> <h1>PairDrop</h1>
<div class="font-subheading">v1.11.0</div> <div class="font-subheading">v1.11.1</div>
</div> </div>
<div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div> <div class="font-subheading" data-i18n-key="about.claim" data-i18n-attrs="text"></div>
<div class="row"> <div class="row">
+10 -10
View File
@@ -12,7 +12,7 @@
"routed": "サーバーを経由します", "routed": "サーバーを経由します",
"discovery": "このデバイスを検出可能なネットワーク:", "discovery": "このデバイスを検出可能なネットワーク:",
"on-this-network_title": "このネットワーク上のすべてのデバイスからアクセスできます。", "on-this-network_title": "このネットワーク上のすべてのデバイスからアクセスできます。",
"known-as": "のデバイスに表示される名前:" "known-as": "のデバイス名前:"
}, },
"notifications": { "notifications": {
"request-title": "{{name}}は{{count}}個の{{descriptor}}を共有しようとしています", "request-title": "{{name}}は{{count}}個の{{descriptor}}を共有しようとしています",
@@ -25,7 +25,7 @@
"connected": "接続しました", "connected": "接続しました",
"pairing-not-persistent": "このデバイスとのペアリングは解除される可能性があります", "pairing-not-persistent": "このデバイスとのペアリングは解除される可能性があります",
"text-content-incorrect": "無効なテキスト内容です", "text-content-incorrect": "無効なテキスト内容です",
"message-transfer-completed": "メッセージ送信が完了しました", "message-transfer-completed": "メッセージ送信しました",
"file-transfer-completed": "ファイル転送が完了しました", "file-transfer-completed": "ファイル転送が完了しました",
"file-content-incorrect": "無効なファイル内容です", "file-content-incorrect": "無効なファイル内容です",
"files-incorrect": "ファイルが間違っています", "files-incorrect": "ファイルが間違っています",
@@ -59,7 +59,7 @@
}, },
"header": { "header": {
"cancel-share-mode": "キャンセル", "cancel-share-mode": "キャンセル",
"theme-auto_title": "システムテーマに合わせる", "theme-auto_title": "システムテーマに合わせる",
"install_title": "PairDropをインストール", "install_title": "PairDropをインストール",
"theme-dark_title": "常にダークテーマを使用する", "theme-dark_title": "常にダークテーマを使用する",
"pair-device_title": "他のデバイスとペアリングする", "pair-device_title": "他のデバイスとペアリングする",
@@ -74,7 +74,7 @@
"expand_title": "ヘッダーボタン列を拡大する" "expand_title": "ヘッダーボタン列を拡大する"
}, },
"instructions": { "instructions": {
"x-instructions_mobile": "タップでファイル送信、長押しでメッセージ送信します", "x-instructions_mobile": "タップでファイル送信、長押しでメッセージ送信",
"x-instructions-share-mode_desktop": "クリックして{{descriptor}}を送信", "x-instructions-share-mode_desktop": "クリックして{{descriptor}}を送信",
"activate-share-mode-and-other-files-plural": "とその他{{count}}個のファイル", "activate-share-mode-and-other-files-plural": "とその他{{count}}個のファイル",
"x-instructions-share-mode_mobile": "タップして{{descriptor}}を送信", "x-instructions-share-mode_mobile": "タップして{{descriptor}}を送信",
@@ -82,7 +82,7 @@
"no-peers-subtitle": "ペアリングや公開ルームを使用すると、他のネットワーク上のデバイスと共有できます", "no-peers-subtitle": "ペアリングや公開ルームを使用すると、他のネットワーク上のデバイスと共有できます",
"activate-share-mode-shared-text": "共有されたテキスト", "activate-share-mode-shared-text": "共有されたテキスト",
"x-instructions_desktop": "左クリックでファイルを送信、右クリックでメッセージを送信します", "x-instructions_desktop": "左クリックでファイルを送信、右クリックでメッセージを送信します",
"no-peers-title": "ファイル共有するには他のデバイスでPairDropを開いてください", "no-peers-title": "ファイル共有するには他のデバイスでPairDropを開きます",
"x-instructions_data-drop-peer": "ドロップするとこのデバイスに送信します", "x-instructions_data-drop-peer": "ドロップするとこのデバイスに送信します",
"x-instructions_data-drop-bg": "送信したいデバイスの上でドロップしてください", "x-instructions_data-drop-bg": "送信したいデバイスの上でドロップしてください",
"no-peers_data-drop-bg": "送信したいデバイスの上でドロップしてください", "no-peers_data-drop-bg": "送信したいデバイスの上でドロップしてください",
@@ -103,7 +103,7 @@
"dialogs": { "dialogs": {
"base64-paste-to-send": "ここをタップして{{type}}を送信", "base64-paste-to-send": "ここをタップして{{type}}を送信",
"auto-accept-instructions-2": "」を有効にすると、そのデバイスから送信されたすべてのファイルを自動的に受け入れます。", "auto-accept-instructions-2": "」を有効にすると、そのデバイスから送信されたすべてのファイルを自動的に受け入れます。",
"receive-text-title": "メッセージを受信しました", "receive-text-title": "メッセージを受信",
"edit-paired-devices-title": "ペアリング設定", "edit-paired-devices-title": "ペアリング設定",
"cancel": "キャンセル", "cancel": "キャンセル",
"auto-accept-instructions-1": "「", "auto-accept-instructions-1": "「",
@@ -123,14 +123,14 @@
"file-other-description-image": "とその他1個の画像", "file-other-description-image": "とその他1個の画像",
"temporary-public-room-title": "公開ルーム", "temporary-public-room-title": "公開ルーム",
"base64-files": "ファイル", "base64-files": "ファイル",
"has-sent": "が送信しました:", "has-sent": "が送信:",
"file-other-description-file": "とその他1個のファイル", "file-other-description-file": "とその他1個のファイル",
"close": "閉じる", "close": "閉じる",
"system-language": "システム言語", "system-language": "システム言語",
"unpair": "ペアリング解除", "unpair": "ペアリング解除",
"title-image": "画像", "title-image": "画像",
"file-other-description-file-plural": "とその他{{count}}個のファイル", "file-other-description-file-plural": "とその他{{count}}個のファイル",
"would-like-to-share": "が以下のファイルを共有しようとしています", "would-like-to-share": "がこれを共有しています",
"send-message-to": "このデバイスにメッセージを送信:", "send-message-to": "このデバイスにメッセージを送信:",
"language-selector-title": "言語設定", "language-selector-title": "言語設定",
"pair": "ペアリング", "pair": "ペアリング",
@@ -174,8 +174,8 @@
"privacypolicy_title": "プライバシーポリシーを開く" "privacypolicy_title": "プライバシーポリシーを開く"
}, },
"document-titles": { "document-titles": {
"file-transfer-requested": "ファイル転送がリクエストされました", "file-transfer-requested": "ファイル転送の要求があります",
"image-transfer-requested": "画像の転送がリクエストされました", "image-transfer-requested": "画像の転送の要求があります",
"message-received-plural": "{{count}}個のメッセージを受信しました", "message-received-plural": "{{count}}個のメッセージを受信しました",
"message-received": "メッセージを受信しました", "message-received": "メッセージを受信しました",
"file-received": "ファイルを受信しました", "file-received": "ファイルを受信しました",
+1
View File
@@ -26,6 +26,7 @@
} }
], ],
"background_color": "#efefef", "background_color": "#efefef",
"start_url": "./",
"display": "standalone", "display": "standalone",
"theme_color": "#3367d6", "theme_color": "#3367d6",
"screenshots" : [ "screenshots" : [
+2 -3
View File
@@ -1082,7 +1082,7 @@ class PeersManager {
} }
async _onFilesSelected(message) { async _onFilesSelected(message) {
let files = mime.addMissingMimeTypesToFiles(message.files); let files = mime.addMissingMimeTypesToFiles([...message.files]);
await this.peers[message.to].requestFileTransfer(files); await this.peers[message.to].requestFileTransfer(files);
} }
@@ -1306,9 +1306,8 @@ class FileDigester {
const blob = new Blob(this._buffer) const blob = new Blob(this._buffer)
this._buffer = null; this._buffer = null;
this._callback(new File([blob], this._name, { this._callback(new File([blob], this._name, {
type: this._mime, type: this._mime || "application/octet-stream",
lastModified: new Date().getTime() lastModified: new Date().getTime()
})); }));
} }
} }
+3 -1
View File
@@ -873,7 +873,9 @@ class ReceiveDialog extends Dialog {
const fileName = files[0].name; const fileName = files[0].name;
const fileNameSplit = fileName.split('.'); const fileNameSplit = fileName.split('.');
const fileExtension = '.' + fileNameSplit[fileNameSplit.length - 1]; const fileExtension = fileNameSplit.length > 1
? '.' + fileNameSplit[fileNameSplit.length - 1]
: '';
this.$fileStem.innerText = fileName.substring(0, fileName.length - fileExtension.length); this.$fileStem.innerText = fileName.substring(0, fileName.length - fileExtension.length);
this.$fileExtension.innerText = fileExtension; this.$fileExtension.innerText = fileExtension;
this.$fileSize.innerText = this._formatFileSize(totalSize); this.$fileSize.innerText = this._formatFileSize(totalSize);
+3 -2
View File
@@ -392,7 +392,8 @@ const mime = (() => {
"vob": "video/x-ms-vob", "vob": "video/x-ms-vob",
"wmv": "video/x-ms-wmv", "wmv": "video/x-ms-wmv",
"avi": "video/x-msvideo", "avi": "video/x-msvideo",
"*": "video/x-sgi-movie" "*": "video/x-sgi-movie",
"kdbx": "application/x-keepass2"
} }
return { return {
@@ -409,7 +410,7 @@ const mime = (() => {
// if filetype is empty guess via suffix otherwise leave unchanged // if filetype is empty guess via suffix otherwise leave unchanged
for (let i = 0; i < files.length; i++) { for (let i = 0; i < files.length; i++) {
if (!files[i].type) { if (!files[i].type) {
files[i] = new File([files[i]], files[i].name, {type: mime.guessMimeByFilename(files[i].name) || ""}); files[i] = new File([files[i]], files[i].name, {type: mime.guessMimeByFilename(files[i].name) || "application/octet-stream"});
} }
} }
return files; return files;
+1 -1
View File
@@ -1,4 +1,4 @@
const cacheVersion = 'v1.11.0'; const cacheVersion = 'v1.11.1';
const cacheTitle = `pairdrop-cache-${cacheVersion}`; const cacheTitle = `pairdrop-cache-${cacheVersion}`;
const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions const forceFetch = false; // FOR DEVELOPMENT: Set to true to always update assets instead of using cached versions
const relativePathsToCache = [ const relativePathsToCache = [