Compare commits

..

1 Commits

Author SHA1 Message Date
Huang Xin 5163d01e08 Release portable binaries for Windows (#102) 2025-01-04 18:13:51 +01:00
35 changed files with 181 additions and 320 deletions
+3 -9
View File
@@ -1,7 +1,7 @@
---
name: Report a bug
about: Report a bug or a functional regression
title: 'Example: In DarkMode, a blank square appears in bottom right corner while scrolling'
title: 'Ex: In DarkMode, a blank square appears in bottom right corner while scrolling'
labels: ['type: bug']
assignees: ''
---
@@ -30,15 +30,9 @@ The blank square should be transparent (invisible)
## Technical inputs
Operating System:
Readest Version:
**Example:**
```
Operating System: macOS 14.3.1
Readest Version: 0.9.0
We are displaying custom scrollbars that disappear when the user is not scrolling. See ScrollWrapper.
Probably fixable with CSS
- We are displaying custom scrollbars that disappear when the user is not scrolling. See ScrollWrapper.
- Probably fixable with CSS
```
+6 -19
View File
@@ -14,7 +14,6 @@ jobs:
release_id: ${{ steps.get-release.outputs.release_id }}
release_tag: ${{ steps.get-release.outputs.release_tag }}
release_note: ${{ steps.get-release-notes.outputs.release_note }}
release_version: ${{ steps.get-release-notes.outputs.release_version }}
steps:
- uses: actions/checkout@v4
@@ -45,7 +44,6 @@ jobs:
const notes = releaseNotes.notes || [];
const releaseNote = notes.map((note, index) => `${index + 1}. ${note}`).join(' ');
console.log('Formatted release note:', releaseNote);
core.setOutput('release_version', version);
core.setOutput('release_note', releaseNote);
build-tauri:
@@ -59,9 +57,6 @@ jobs:
- os: ubuntu-22.04
arch: x86_64
rust_target: x86_64-unknown-linux-gnu
- os: ubuntu-22.04
arch: aarch64
rust_target: aarch64-unknown-linux-gnu
- os: macos-latest
arch: aarch64
rust_target: x86_64-apple-darwin,aarch64-apple-darwin
@@ -147,31 +142,23 @@ jobs:
- name: upload portable binaries (Windows only)
if: matrix.config.os == 'windows-latest'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
echo "Uploading Portable Binaries"
arch=${{ matrix.config.arch }}
version=${{ needs.get-release.outputs.release_version }}
version=$PACKAGE_VERSION
if [ "$arch" = "x86_64" ]; then
bin_file="Readest_${version}_x64-portable.exe"
zip_name="Readest_${version}_x64-portable.zip"
elif [ "$arch" = "aarch64" ]; then
bin_file="Readest_${version}_arm64-portable.exe"
zip_name="Readest_${version}_arm64-portable.zip"
else
echo "Unknown architecture: $arch"
exit 1
fi
exe_file="apps/readest-app/src-tauri/target/${{ matrix.config.rust_target }}/release/readest.exe"
# Browsers on Windows won't download zip files that contain exe files
# so upload the exe files instead. This is totally stupid.
# powershell.exe -Command "Compress-Archive -Path $exe_file -DestinationPath $bin_file -Force"
cp $exe_file $bin_file
echo "Uploading $bin_file to GitHub release"
gh release upload ${{ needs.get-release.outputs.release_tag }} $bin_file --clobber
zip -j $zip_name apps/readest-app/src-tauri/target/release/readest.exe
echo "Uploading $zip_name to GitHub release"
gh release upload ${{ needs.get-release.outputs.release_tag }} $zip_name --clobber
update-release:
permissions:
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "@readest/readest-app",
"version": "0.9.1",
"version": "0.9.0",
"private": true,
"scripts": {
"dev": "dotenv -e .env.tauri -- next dev",
@@ -1,5 +1,4 @@
{
"(detected)": "(erkannt)",
"About Readest": "Über Readest",
"Add your notes here...": "Fügen Sie hier Ihre Notizen hinzu...",
"Animation": "Animation",
@@ -73,7 +72,6 @@
"Notes": "Notizen",
"Open": "Öffnen",
"Open Book": "Buch öffnen",
"Original Text": "Originaltext",
"Override Publisher Font": "Verleger-Schriftart überschreiben",
"Page": "Seite",
"Paging Animation": "Blätter-Animation",
@@ -106,7 +104,6 @@
"System Fonts": "System-Schriftarten",
"Theme Color": "Themenfarbe",
"Theme Mode": "Themenmodus",
"Translated Text": "Übersetzter Text",
"Unknown": "Unbekannt",
"Untitled": "Ohne Titel",
"Updated:": "Aktualisiert:",
@@ -1,5 +1,4 @@
{
"(detected)": "(detectado)",
"About Readest": "Acerca de Readest",
"Add your notes here...": "Añade tus notas aquí...",
"Animation": "Animación",
@@ -73,7 +72,6 @@
"Notes": "Notas",
"Open": "Abrir",
"Open Book": "Abrir libro",
"Original Text": "Texto original",
"Override Publisher Font": "Sobrescribir fuente del editor",
"Page": "Página",
"Paging Animation": "Animación de paginación",
@@ -106,7 +104,6 @@
"System Fonts": "Fuentes del sistema",
"Theme Color": "Color del tema",
"Theme Mode": "Modo del tema",
"Translated Text": "Texto traducido",
"Unknown": "Desconocido",
"Untitled": "Sin título",
"Updated:": "Actualizado:",
@@ -1,5 +1,4 @@
{
"(detected)": "(détecté)",
"About Readest": "À propos de Readest",
"Add your notes here...": "Ajoutez vos notes ici...",
"Animation": "Animation",
@@ -73,7 +72,6 @@
"Notes": "Notes",
"Open": "Ouvrir",
"Open Book": "Ouvrir le livre",
"Original Text": "Texte original",
"Override Publisher Font": "Remplacer la police de l'éditeur",
"Page": "Page",
"Paging Animation": "Animation de page",
@@ -106,7 +104,6 @@
"System Fonts": "Polices système",
"Theme Color": "Couleur du thème",
"Theme Mode": "Mode du thème",
"Translated Text": "Texte traduit",
"Unknown": "Inconnu",
"Untitled": "Sans titre",
"Updated:": "Mis à jour :",
@@ -1,5 +1,4 @@
{
"(detected)": "(terdeteksi)",
"About Readest": "Tentang Readest",
"Add your notes here...": "Tambahkan catatan Anda di sini...",
"Animation": "Animasi",
@@ -73,7 +72,6 @@
"Notes": "Catatan",
"Open": "Buka",
"Open Book": "Buka Buku",
"Original Text": "Teks Asli",
"Override Publisher Font": "Ganti Font Penerbit",
"Page": "Halaman",
"Paging Animation": "Animasi Halaman",
@@ -106,7 +104,6 @@
"System Fonts": "Font Sistem",
"Theme Color": "Warna Tema",
"Theme Mode": "Mode Tema",
"Translated Text": "Teks Terjemahan",
"Unknown": "Tidak Diketahui",
"Untitled": "Tanpa Judul",
"Updated:": "Diperbarui:",
@@ -1,5 +1,4 @@
{
"(detected)": "(rilevato)",
"About Readest": "Informazioni su Readest",
"Add your notes here...": "Aggiungi qui le tue note...",
"Animation": "Animazione",
@@ -73,7 +72,6 @@
"Notes": "Note",
"Open": "Apri",
"Open Book": "Apri libro",
"Original Text": "Testo originale",
"Override Publisher Font": "Sostituisci font editore",
"Page": "Pagina",
"Paging Animation": "Animazione cambio pagina",
@@ -106,7 +104,6 @@
"System Fonts": "Font di sistema",
"Theme Color": "Colore tema",
"Theme Mode": "Modalità tema",
"Translated Text": "Testo tradotto",
"Unknown": "Sconosciuto",
"Untitled": "Senza titolo",
"Updated:": "Aggiornato:",
@@ -1,5 +1,4 @@
{
"(detected)": "(検出)",
"About Readest": "Readestについて",
"Add your notes here...": "ここにメモを追加...",
"Animation": "アニメーション",
@@ -73,7 +72,6 @@
"Notes": "メモ",
"Open": "開く",
"Open Book": "書籍を開く",
"Original Text": "原文",
"Override Publisher Font": "出版社フォントを上書き",
"Page": "ページ",
"Paging Animation": "ページめくりアニメーション",
@@ -106,7 +104,6 @@
"System Fonts": "システムフォント",
"Theme Color": "テーマカラー",
"Theme Mode": "テーマモード",
"Translated Text": "翻訳されたテキスト",
"Unknown": "不明",
"Untitled": "無題",
"Updated:": "更新日:",
@@ -1,5 +1,4 @@
{
"(detected)": "(감지됨)",
"About Readest": "Readest 정보",
"Add your notes here...": "여기에 메모를 추가하세요...",
"Animation": "애니메이션",
@@ -73,7 +72,6 @@
"Notes": "메모",
"Open": "열기",
"Open Book": "책 열기",
"Original Text": "원본 텍스트",
"Override Publisher Font": "출판사 글꼴 재정의",
"Page": "페이지",
"Paging Animation": "페이지 넘김 애니메이션",
@@ -106,7 +104,6 @@
"System Fonts": "시스템 글꼴",
"Theme Color": "테마 색상",
"Theme Mode": "테마 모드",
"Translated Text": "번역된 텍스트",
"Unknown": "알 수 없음",
"Untitled": "제목 없음",
"Updated:": "업데이트일:",
@@ -1,5 +1,4 @@
{
"(detected)": "(detectado)",
"About Readest": "Sobre o Readest",
"Add your notes here...": "Adicione suas notas aqui...",
"Animation": "Animação",
@@ -73,7 +72,6 @@
"Notes": "Notas",
"Open": "Abrir",
"Open Book": "Abrir Livro",
"Original Text": "Texto Original",
"Override Publisher Font": "Substituir Fonte do Editor",
"Page": "Página",
"Paging Animation": "Animação de Página",
@@ -106,7 +104,6 @@
"System Fonts": "Fontes do Sistema",
"Theme Color": "Cor do Tema",
"Theme Mode": "Modo do Tema",
"Translated Text": "Texto Traduzido",
"Unknown": "Desconhecido",
"Untitled": "Sem Título",
"Updated:": "Atualizado:",
@@ -1,5 +1,4 @@
{
"(detected)": "(обнаружено)",
"About Readest": "О Readest",
"Add your notes here...": "Добавьте свои заметки здесь...",
"Animation": "Анимация",
@@ -73,7 +72,6 @@
"Notes": "Заметки",
"Open": "Открыть",
"Open Book": "Открыть книгу",
"Original Text": "Оригинальный текст",
"Override Publisher Font": "Переопределить шрифт издателя",
"Page": "Страница",
"Paging Animation": "Анимация перелистывания",
@@ -106,7 +104,6 @@
"System Fonts": "Системные шрифты",
"Theme Color": "Цвет темы",
"Theme Mode": "Режим темы",
"Translated Text": "Переведённый текст",
"Unknown": "Неизвестно",
"Untitled": "Без названия",
"Updated:": "Обновлено:",
@@ -1,5 +1,4 @@
{
"(detected)": "(algılandı)",
"About Readest": "Readest Hakkında",
"Add your notes here...": "Notlarınızı buraya ekleyin...",
"Animation": "Animasyon",
@@ -73,7 +72,6 @@
"Notes": "Notlar",
"Open": "Aç",
"Open Book": "Kitabı Aç",
"Original Text": "Orijinal Metin",
"Override Publisher Font": "Yayıncı Yazı Tipini Geçersiz Kıl",
"Page": "Sayfa",
"Paging Animation": "Sayfa Çevirme Animasyonu",
@@ -106,7 +104,6 @@
"System Fonts": "Sistem Yazı Tipleri",
"Theme Color": "Tema Rengi",
"Theme Mode": "Tema Modu",
"Translated Text": "Çevrilen Metin",
"Unknown": "Bilinmiyor",
"Untitled": "Başlıksız",
"Updated:": "Güncellendi:",
@@ -1,5 +1,4 @@
{
"(detected)": "(đã phát hiện)",
"About Readest": "Về Readest",
"Add your notes here...": "Thêm ghi chú của bạn vào đây...",
"Animation": "Hiệu ứng động",
@@ -73,7 +72,6 @@
"Notes": "Ghi chú",
"Open": "Mở",
"Open Book": "Mở sách",
"Original Text": "Văn bản gốc",
"Override Publisher Font": "Ghi đè phông chữ của nhà xuất bản",
"Page": "Trang",
"Paging Animation": "Hiệu ứng lật trang",
@@ -106,7 +104,6 @@
"System Fonts": "Phông chữ hệ thống",
"Theme Color": "Màu chủ đề",
"Theme Mode": "Chế độ chủ đề",
"Translated Text": "Văn bản dịch",
"Unknown": "Không xác định",
"Untitled": "Không có tiêu đề",
"Updated:": "Cập nhật:",
@@ -1,5 +1,4 @@
{
"(detected)": "(检测到)",
"About Readest": "关于 Readest",
"Add your notes here...": "在这里添加您的笔记...",
"Animation": "动画",
@@ -73,7 +72,6 @@
"Notes": "笔记",
"Open": "打开",
"Open Book": "打开书籍",
"Original Text": "原文",
"Override Publisher Font": "覆盖内置字体",
"Page": "页面",
"Paging Animation": "翻页动画",
@@ -106,7 +104,6 @@
"System Fonts": "系统字体",
"Theme Color": "主题颜色",
"Theme Mode": "主题模式",
"Translated Text": "译文",
"Unknown": "未知",
"Untitled": "无标题",
"Updated:": "更新日期",
@@ -1,5 +1,4 @@
{
"(detected)": "(檢測到)",
"About Readest": "關於 Readest",
"Add your notes here...": "在這裡添加您的筆記...",
"Animation": "動畫",
@@ -73,7 +72,6 @@
"Notes": "筆記",
"Open": "打開",
"Open Book": "打開書籍",
"Original Text": "原文",
"Override Publisher Font": "覆蓋內置字體",
"Page": "頁面",
"Paging Animation": "翻頁動畫",
@@ -106,7 +104,6 @@
"System Fonts": "系統字體",
"Theme Color": "主題顏色",
"Theme Mode": "主題模式",
"Translated Text": "譯文",
"Unknown": "未知",
"Untitled": "無標題",
"Updated:": "更新日期",
-8
View File
@@ -1,13 +1,5 @@
{
"releases": {
"0.9.1": {
"date": "2025-01-06",
"notes": [
"Restore window position and size when reopening app.",
"Swap font when downloading online fonts.",
"Fix layout issues on Windows and Linux."
]
},
"0.9.0": {
"date": "2025-01-04",
"notes": [
+124 -159
View File
@@ -13,7 +13,7 @@ dependencies = [
"serde",
"serde_json",
"tauri",
"tauri-build 2.0.4 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-build 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-plugin-cli",
"tauri-plugin-deep-link",
"tauri-plugin-devtools",
@@ -28,7 +28,6 @@ dependencies = [
"tauri-plugin-shell",
"tauri-plugin-single-instance",
"tauri-plugin-updater",
"tauri-plugin-window-state",
]
[[package]]
@@ -309,7 +308,7 @@ checksum = "3b43422f69d8ff38f95f1b2bb76517c91589a924d1559a0e935d7c8ce0274c11"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -349,7 +348,7 @@ checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -360,13 +359,13 @@ checksum = "8b75356056920673b02621b35afd0f7dda9306d03c79a30f5c56c44cf256e3de"
[[package]]
name = "async-trait"
version = "0.1.84"
version = "0.1.83"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1b1244b10dcd56c92219da4e14caa97e312079e185f04ba3eea25061561dc0a0"
checksum = "721cae7de5c34fbb2acd27e21e6d2cf7b886dce0c27388d46c4e6c47ea4318dd"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -427,7 +426,7 @@ dependencies = [
"rustversion",
"serde",
"sync_wrapper 0.1.2",
"tower 0.4.13",
"tower",
"tower-layer",
"tower-service",
]
@@ -560,7 +559,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -689,16 +688,16 @@ dependencies = [
[[package]]
name = "cargo_metadata"
version = "0.19.1"
version = "0.18.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8769706aad5d996120af43197bf46ef6ad0fda35216b4505f926a365a232d924"
checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
"thiserror 2.0.9",
"thiserror 1.0.69",
]
[[package]]
@@ -713,9 +712,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.7"
version = "1.2.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a012a0df96dd6d06ba9a1b29d6402d1a5d77c6befd2566afdc26e10603dc93d7"
checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e"
dependencies = [
"shlex",
]
@@ -1096,7 +1095,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13b588ba4ac1a99f7f2964d24b3d896ddc6bf847ee3855dbd4366f058cfcd331"
dependencies = [
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1106,7 +1105,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a2785755761f3ddc1492979ce1e48d2c00d09311c39e4466429188f3dd6501"
dependencies = [
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1130,7 +1129,7 @@ dependencies = [
"proc-macro2",
"quote",
"strsim",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1141,7 +1140,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806"
dependencies = [
"darling_core",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1168,7 +1167,7 @@ checksum = "30542c1ad912e0e3d22a1935c290e12e8a29d704a420177a31faad4a601a0800"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1181,7 +1180,7 @@ dependencies = [
"proc-macro2",
"quote",
"rustc_version",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1205,7 +1204,7 @@ dependencies = [
"tonic",
"tonic-health",
"tonic-web",
"tower 0.4.13",
"tower",
"tower-http",
"tower-layer",
"tracing",
@@ -1271,7 +1270,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1303,7 +1302,7 @@ checksum = "f2b99bf03862d7f545ebc28ddd33a665b50865f4dfd84031a393823879bd4c54"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1425,7 +1424,7 @@ checksum = "de0d48a183585823424a4ce1aa132d174a6a81bd540895822eb4c8373a8e49e8"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1565,7 +1564,7 @@ checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1668,7 +1667,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1925,7 +1924,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -1940,9 +1939,9 @@ dependencies = [
[[package]]
name = "glob"
version = "0.3.2"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2"
checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b"
[[package]]
name = "gobject-sys"
@@ -2004,7 +2003,7 @@ dependencies = [
"proc-macro-error",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -2425,7 +2424,7 @@ checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -2996,7 +2995,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -3485,7 +3484,7 @@ dependencies = [
"phf_shared 0.11.2",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -3532,7 +3531,7 @@ checksum = "3c0f5fad0874fc7abcd4d750e76917eaebbecaa2c20bde22e1dbeeba8beb758c"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -3719,7 +3718,7 @@ dependencies = [
"itertools",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -3839,9 +3838,9 @@ dependencies = [
[[package]]
name = "quote"
version = "1.0.38"
version = "1.0.37"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc"
checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af"
dependencies = [
"proc-macro2",
]
@@ -4014,9 +4013,9 @@ dependencies = [
[[package]]
name = "reqwest"
version = "0.12.12"
version = "0.12.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "43e734407157c3c2034e0258f5e4473ddb361b1e85f95a66690d67264d7cd1da"
checksum = "a77c62af46e79de0a562e1a9849205ffcb7fc1238876e9bd743357570e04046f"
dependencies = [
"base64 0.22.1",
"bytes",
@@ -4051,7 +4050,6 @@ dependencies = [
"tokio",
"tokio-rustls",
"tokio-util",
"tower 0.5.2",
"tower-service",
"url",
"wasm-bindgen",
@@ -4064,14 +4062,12 @@ dependencies = [
[[package]]
name = "rfd"
version = "0.15.2"
version = "0.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6a24763657bff09769a8ccf12c8b8a50416fb035fe199263b4c5071e4e3f006f"
checksum = "46f6f80a9b882647d9014673ca9925d30ffc9750f2eed2b4490e189eaebd01e8"
dependencies = [
"ashpd",
"block2",
"core-foundation 0.10.0",
"core-foundation-sys",
"glib-sys",
"gobject-sys",
"gtk-sys",
@@ -4084,7 +4080,7 @@ dependencies = [
"wasm-bindgen",
"wasm-bindgen-futures",
"web-sys",
"windows-sys 0.59.0",
"windows-sys 0.48.0",
]
[[package]]
@@ -4247,9 +4243,9 @@ dependencies = [
[[package]]
name = "rustversion"
version = "1.0.19"
version = "1.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4"
checksum = "0e819f2bc632f285be6d7cd36e25940d45b2391dd6d9b939e79de557f7014248"
[[package]]
name = "ryu"
@@ -4290,7 +4286,7 @@ dependencies = [
"proc-macro2",
"quote",
"serde_derive_internals",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4342,9 +4338,9 @@ dependencies = [
[[package]]
name = "serde"
version = "1.0.217"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70"
checksum = "0b9781016e935a97e8beecf0c933758c97a5520d32930e460142b4cd80c6338e"
dependencies = [
"serde_derive",
]
@@ -4362,13 +4358,13 @@ dependencies = [
[[package]]
name = "serde_derive"
version = "1.0.217"
version = "1.0.216"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0"
checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4379,7 +4375,7 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4402,7 +4398,7 @@ checksum = "6c64451ba24fc7a6a2d60fc75dd9c83c90903b19028d4eff35e88fc1e86564e9"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4428,9 +4424,9 @@ dependencies = [
[[package]]
name = "serde_with"
version = "3.12.0"
version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa"
checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817"
dependencies = [
"base64 0.22.1",
"chrono",
@@ -4446,14 +4442,14 @@ dependencies = [
[[package]]
name = "serde_with_macros"
version = "3.12.0"
version = "3.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e"
checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d"
dependencies = [
"darling",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4715,9 +4711,9 @@ dependencies = [
[[package]]
name = "syn"
version = "2.0.94"
version = "2.0.91"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "987bc0be1cdea8b10216bd06e2ca407d40b9543468fafd3ddfb02f36e77f71f3"
checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035"
dependencies = [
"proc-macro2",
"quote",
@@ -4747,7 +4743,7 @@ checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4795,9 +4791,9 @@ dependencies = [
[[package]]
name = "tao"
version = "0.31.1"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3731d04d4ac210cd5f344087733943b9bfb1a32654387dad4d1c70de21aee2c9"
checksum = "cc6b53216f32e60efc27dfa111268481e4dfba53e553e4cdebcaed9db36c11bb"
dependencies = [
"bitflags 2.6.0",
"cocoa 0.26.0",
@@ -4839,7 +4835,7 @@ checksum = "f4e16beb8b2ac17db28eab8bca40e62dbfbb34c0fcdc6d9826b11b7b5d047dfd"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -4867,7 +4863,7 @@ checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "tauri"
version = "2.2.0"
version = "2.1.1"
dependencies = [
"anyhow",
"bytes",
@@ -4898,11 +4894,11 @@ dependencies = [
"serde_repr",
"serialize-to-javascript",
"swift-rs",
"tauri-build 2.0.4",
"tauri-build 2.0.3",
"tauri-macros",
"tauri-runtime",
"tauri-runtime-wry",
"tauri-utils 2.1.1",
"tauri-utils 2.1.0",
"thiserror 2.0.9",
"tokio",
"tracing",
@@ -4917,7 +4913,7 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.4"
version = "2.0.3"
dependencies = [
"anyhow",
"cargo_toml",
@@ -4929,7 +4925,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
"tauri-utils 2.1.1",
"tauri-utils 2.1.0",
"tauri-winres",
"toml 0.8.19",
"walkdir",
@@ -4937,9 +4933,9 @@ dependencies = [
[[package]]
name = "tauri-build"
version = "2.0.4"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b274ec7239ada504deb615f1c8abd7ba99631e879709e6f10e5d17217058d976"
checksum = "7bd2a4bcfaf5fb9f4be72520eefcb61ae565038f8ccba2a497d8c28f463b8c01"
dependencies = [
"anyhow",
"cargo_toml",
@@ -4951,7 +4947,7 @@ dependencies = [
"semver",
"serde",
"serde_json",
"tauri-utils 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-utils 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-winres",
"toml 0.8.19",
"walkdir",
@@ -4959,7 +4955,7 @@ dependencies = [
[[package]]
name = "tauri-codegen"
version = "2.0.4"
version = "2.0.3"
dependencies = [
"base64 0.22.1",
"brotli",
@@ -4973,8 +4969,8 @@ dependencies = [
"serde",
"serde_json",
"sha2",
"syn 2.0.94",
"tauri-utils 2.1.1",
"syn 2.0.91",
"tauri-utils 2.1.0",
"thiserror 2.0.9",
"time",
"url",
@@ -4984,21 +4980,21 @@ dependencies = [
[[package]]
name = "tauri-macros"
version = "2.0.4"
version = "2.0.3"
dependencies = [
"heck 0.5.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"tauri-codegen",
"tauri-utils 2.1.1",
"tauri-utils 2.1.0",
]
[[package]]
name = "tauri-plugin"
version = "2.0.4"
version = "2.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5841b9a0200e954ef7457f8d327091424328891e267a97b641dc246cc54d0dec"
checksum = "e753f2a30933a9bbf0a202fa47d7cc4a3401f06e8d6dcc53b79aa62954828c79"
dependencies = [
"anyhow",
"glob",
@@ -5006,7 +5002,7 @@ dependencies = [
"schemars",
"serde",
"serde_json",
"tauri-utils 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-utils 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"toml 0.8.19",
"walkdir",
]
@@ -5038,7 +5034,7 @@ dependencies = [
"serde_json",
"tauri",
"tauri-plugin",
"tauri-utils 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-utils 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 2.0.9",
"tracing",
"url",
@@ -5107,7 +5103,7 @@ dependencies = [
"serde_repr",
"tauri",
"tauri-plugin",
"tauri-utils 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tauri-utils 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"thiserror 2.0.9",
"toml 0.8.19",
"url",
@@ -5289,24 +5285,9 @@ dependencies = [
"zip",
]
[[package]]
name = "tauri-plugin-window-state"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "234dd891cc7960fa28f93ea911f3e0d9ce8375ebf9ff303831bdd7a3443d5714"
dependencies = [
"bitflags 2.6.0",
"log",
"serde",
"serde_json",
"tauri",
"tauri-plugin",
"thiserror 2.0.9",
]
[[package]]
name = "tauri-runtime"
version = "2.3.0"
version = "2.2.0"
dependencies = [
"dpi",
"gtk",
@@ -5315,7 +5296,7 @@ dependencies = [
"raw-window-handle",
"serde",
"serde_json",
"tauri-utils 2.1.1",
"tauri-utils 2.1.0",
"thiserror 2.0.9",
"url",
"windows",
@@ -5323,7 +5304,7 @@ dependencies = [
[[package]]
name = "tauri-runtime-wry"
version = "2.3.0"
version = "2.2.0"
dependencies = [
"gtk",
"http 1.2.0",
@@ -5337,7 +5318,7 @@ dependencies = [
"softbuffer",
"tao",
"tauri-runtime",
"tauri-utils 2.1.1",
"tauri-utils 2.1.0",
"tracing",
"url",
"webkit2gtk",
@@ -5348,7 +5329,7 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.1.1"
version = "2.1.0"
dependencies = [
"brotli",
"cargo_metadata",
@@ -5383,9 +5364,9 @@ dependencies = [
[[package]]
name = "tauri-utils"
version = "2.1.1"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "96fb10e7cc97456b2d5b9c03e335b5de5da982039a303a20d10006885e4523a0"
checksum = "9271a88f99b4adea0dc71d0baca4505475a0bbd139fb135f62958721aaa8fe54"
dependencies = [
"cargo_metadata",
"ctor",
@@ -5429,13 +5410,12 @@ dependencies = [
[[package]]
name = "tempfile"
version = "3.15.0"
version = "3.14.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8a559c81686f576e8cd0290cd2a24a2a9ad80c98b3478856500fcbd7acd704"
checksum = "28cce251fcbc87fac86a866eeb0d6c2d536fc16d06f184bb61aeae11aa4cee0c"
dependencies = [
"cfg-if",
"fastrand",
"getrandom 0.2.15",
"once_cell",
"rustix",
"windows-sys 0.59.0",
@@ -5484,7 +5464,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -5495,7 +5475,7 @@ checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -5611,7 +5591,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -5715,7 +5695,7 @@ dependencies = [
"serde",
"serde_spanned",
"toml_datetime",
"winnow 0.6.22",
"winnow 0.6.20",
]
[[package]]
@@ -5739,7 +5719,7 @@ dependencies = [
"prost",
"tokio",
"tokio-stream",
"tower 0.4.13",
"tower",
"tower-layer",
"tower-service",
"tracing",
@@ -5798,21 +5778,6 @@ dependencies = [
"tracing",
]
[[package]]
name = "tower"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9"
dependencies = [
"futures-core",
"futures-util",
"pin-project-lite",
"sync_wrapper 1.0.2",
"tokio",
"tower-layer",
"tower-service",
]
[[package]]
name = "tower-http"
version = "0.4.4"
@@ -5863,7 +5828,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -6180,7 +6145,7 @@ dependencies = [
"log",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"wasm-bindgen-shared",
]
@@ -6215,7 +6180,7 @@ checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"wasm-bindgen-backend",
"wasm-bindgen-shared",
]
@@ -6374,9 +6339,9 @@ dependencies = [
[[package]]
name = "webview2-com"
version = "0.34.0"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "823e7ebcfaea51e78f72c87fc3b65a1e602c321f407a0b36dbb327d7bb7cd921"
checksum = "6f61ff3d9d0ee4efcb461b14eb3acfda2702d10dc329f339303fc3e57215ae2c"
dependencies = [
"webview2-com-macros",
"webview2-com-sys",
@@ -6394,14 +6359,14 @@ checksum = "1d228f15bba3b9d56dde8bddbee66fa24545bd17b48d5128ccf4a8742b18e431"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
name = "webview2-com-sys"
version = "0.34.0"
version = "0.33.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a82bce72db6e5ee83c68b5de1e2cd6ea195b9fbff91cb37df5884cbe3222df4"
checksum = "a3a3e2eeb58f82361c93f9777014668eb3d07e7d174ee4c819575a9208011886"
dependencies = [
"thiserror 1.0.69",
"windows",
@@ -6493,7 +6458,7 @@ checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -6504,7 +6469,7 @@ checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -6791,9 +6756,9 @@ dependencies = [
[[package]]
name = "winnow"
version = "0.6.22"
version = "0.6.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39281189af81c07ec09db316b302a3e67bf9bd7cbf6c820b50e35fee9c2fa980"
checksum = "36c1fec1a2bb5866f07c25f68c26e565c4c200aebb96d7e55710c19d3e8ac49b"
dependencies = [
"memchr",
]
@@ -6822,9 +6787,9 @@ checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51"
[[package]]
name = "wry"
version = "0.48.0"
version = "0.47.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e644bf458e27b11b0ecafc9e5633d1304fdae82baca1d42185669752fe6ca4f"
checksum = "61ce51277d65170f6379d8cda935c80e3c2d1f0ff712a123c8bddb11b31a4b73"
dependencies = [
"base64 0.22.1",
"block2",
@@ -6852,7 +6817,7 @@ dependencies = [
"sha2",
"soup3",
"tao-macros",
"thiserror 2.0.9",
"thiserror 1.0.69",
"tracing",
"url",
"webkit2gtk",
@@ -6935,7 +6900,7 @@ checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"synstructure",
]
@@ -7000,7 +6965,7 @@ dependencies = [
"tracing",
"uds_windows",
"windows-sys 0.59.0",
"winnow 0.6.22",
"winnow 0.6.20",
"xdg-home",
"zbus_macros 5.2.0",
"zbus_names 4.1.0",
@@ -7016,7 +6981,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"zvariant_utils 2.1.0",
]
@@ -7029,7 +6994,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"zbus_names 4.1.0",
"zvariant 5.1.0",
"zvariant_utils 3.0.2",
@@ -7054,7 +7019,7 @@ checksum = "856b7a38811f71846fd47856ceee8bccaec8399ff53fb370247e66081ace647b"
dependencies = [
"serde",
"static_assertions",
"winnow 0.6.22",
"winnow 0.6.20",
"zvariant 5.1.0",
]
@@ -7076,7 +7041,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -7096,7 +7061,7 @@ checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"synstructure",
]
@@ -7125,7 +7090,7 @@ checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -7167,7 +7132,7 @@ dependencies = [
"serde",
"static_assertions",
"url",
"winnow 0.6.22",
"winnow 0.6.20",
"zvariant_derive 5.1.0",
"zvariant_utils 3.0.2",
]
@@ -7181,7 +7146,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"zvariant_utils 2.1.0",
]
@@ -7194,7 +7159,7 @@ dependencies = [
"proc-macro-crate 3.2.0",
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
"zvariant_utils 3.0.2",
]
@@ -7206,7 +7171,7 @@ checksum = "c51bcff7cc3dbb5055396bcf774748c3dab426b4b8659046963523cee4808340"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.94",
"syn 2.0.91",
]
[[package]]
@@ -7219,6 +7184,6 @@ dependencies = [
"quote",
"serde",
"static_assertions",
"syn 2.0.94",
"winnow 0.6.22",
"syn 2.0.91",
"winnow 0.6.20",
]
-1
View File
@@ -47,4 +47,3 @@ rand = "0.8"
tauri-plugin-cli = "2"
tauri-plugin-single-instance = "2.2.0"
tauri-plugin-updater = "2"
tauri-plugin-window-state = "2.2.0"
@@ -51,12 +51,7 @@
"os:default",
"core:window:default",
"core:window:allow-close",
"core:window:allow-center",
"core:window:allow-minimize",
"core:window:allow-maximize",
"core:window:allow-set-size",
"core:window:allow-set-focus",
"core:window:allow-is-maximized",
"core:window:allow-start-dragging",
"core:window:allow-toggle-maximize",
"shell:default",
+5 -10
View File
@@ -9,7 +9,7 @@ extern crate objc;
#[cfg(target_os = "macos")]
mod menu;
#[cfg(target_os = "macos")]
mod traffic_light_plugin;
mod tauri_traffic_light_positioner_plugin;
#[cfg(target_os = "macos")]
use tauri::TitleBarStyle;
@@ -95,8 +95,7 @@ pub fn run() {
.get_webview_window("main")
.expect("no main window")
.set_focus();
app.emit("single-instance", Payload { args: argv, cwd })
.unwrap();
app.emit("single-instance", Payload { args: argv, cwd }).unwrap();
}));
let builder = builder.plugin(tauri_plugin_deep_link::init());
@@ -104,11 +103,8 @@ pub fn run() {
#[cfg(desktop)]
let builder = builder.plugin(tauri_plugin_updater::Builder::new().build());
#[cfg(desktop)]
let builder = builder.plugin(tauri_plugin_window_state::Builder::default().build());
#[cfg(target_os = "macos")]
let builder = builder.plugin(traffic_light_plugin::init());
let builder = builder.plugin(tauri_traffic_light_positioner_plugin::init());
builder
.setup(|#[allow(unused_variables)] app| {
@@ -176,7 +172,8 @@ pub fn run() {
#[cfg(desktop)]
let win_builder = win_builder
.inner_size(800.0, 600.0)
.resizable(true);
.resizable(true)
.maximized(true);
#[cfg(target_os = "macos")]
let win_builder = win_builder
@@ -188,8 +185,6 @@ pub fn run() {
let win_builder = win_builder
.decorations(false)
.transparent(true)
.visible(false)
.shadow(true)
.title("Readest");
win_builder.build().unwrap();
+1 -1
View File
@@ -137,7 +137,7 @@
}
},
"updater": {
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEJFMEQ1QjE2OEU1NEIzNTEKUldSUnMxU09GbHNOdmpEaWFMT1crRFpEV2VORzQ2MklxaFc0M1R0ci9xY2c1bENXS0xhM1R1L2sK",
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU0OTAxMURGQkUzQjFENTQKUldSVUhUdSszeEdRNUExdmFkWnlvYWNYNG5wamkxMmUxRk5SejlMOTJVd28yNXlVTDh6Wld4OC8K",
"endpoints": ["https://github.com/readest/readest/releases/latest/download/latest.json"]
}
}
@@ -49,7 +49,7 @@ const BooksGrid: React.FC<BooksGridProps> = ({ bookKeys, onCloseBook }) => {
<div
id={`gridcell-${bookKey}`}
key={bookKey}
className='relative h-full w-full rounded-window overflow-hidden'
className='relative h-full w-full overflow-hidden'
>
{isBookmarked && <Ribbon width={marginGap} />}
<HeaderBar
@@ -33,7 +33,7 @@ const Reader: React.FC<{ ids?: string }> = ({ ids }) => {
return (
library.length > 0 &&
settings.globalReadSettings && (
<div className='reader-page rounded-window bg-base-100 text-base-content min-h-screen select-none'>
<div className='reader-page bg-base-100 text-base-content min-h-screen select-none'>
<Suspense>
<ReaderContent ids={ids} settings={settings} />
<AboutWindow />
@@ -82,9 +82,7 @@ const Annotator: React.FC<{ bookKey: string }> = ({ bookKey }) => {
setSelection({ key: bookKey, text: sel.toString(), range: sel.getRangeAt(0), index });
}
};
if (bookData.book?.format !== 'PDF') {
detail.doc?.addEventListener('pointerup', handlePointerup);
}
detail.doc?.addEventListener('pointerup', handlePointerup);
};
const onDrawAnnotation = (event: Event) => {
@@ -2,7 +2,6 @@ import React, { useEffect, useState } from 'react';
import Popup from '@/components/Popup';
import { Position } from '@/utils/sel';
import { useSettingsStore } from '@/store/settingsStore';
import { useTranslation } from '@/hooks/useTranslation';
import { isWebAppPlatform } from '@/services/environment';
const LANGUAGES = {
@@ -38,7 +37,6 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
popupWidth,
popupHeight,
}) => {
const _ = useTranslation();
const { settings, setSettings } = useSettingsStore();
const [sourceLang, setSourceLang] = useState('AUTO');
const [targetLang, setTargetLang] = useState(settings.globalReadSettings.translateTargetLang);
@@ -126,7 +124,7 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
>
<div className='text-neutral-content relative h-[50%] overflow-y-auto border-b border-neutral-400/75 p-4 font-sans'>
<div className='mb-2 flex items-center justify-between'>
<h1 className='text-base font-semibold'>{_('Original Text')}</h1>
<h1 className='text-base font-semibold'>Original Text</h1>
<select
value={sourceLang}
onChange={handleSourceLangChange}
@@ -136,7 +134,7 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
return (
<option key={code} value={code}>
{detectedSourceLang && sourceLang === 'AUTO' && code === 'AUTO'
? `${LANGUAGES[detectedSourceLang] || detectedSourceLang} ` + _('(detected)')
? `${LANGUAGES[detectedSourceLang] || detectedSourceLang} (detected)`
: name}
</option>
);
@@ -148,7 +146,7 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
<div className='text-neutral-content relative h-[50%] overflow-y-auto p-4 font-sans'>
<div className='mb-2 flex items-center justify-between'>
<h2 className='text-base font-semibold'>{_('Translated Text')}</h2>
<h2 className='text-base font-semibold'>Translated Text</h2>
<select
value={targetLang}
onChange={handleTargetLangChange}
@@ -165,7 +163,7 @@ const DeepLPopup: React.FC<DeepLPopupProps> = ({
</div>
{loading ? (
<p className='text-base italic text-gray-500'>{_('Loading...')}</p>
<p className='text-base italic text-gray-500'>Loading...</p>
) : error ? (
<p className='text-base text-red-600'>{error}</p>
) : (
@@ -73,7 +73,7 @@ const SettingsDialog: React.FC<{ bookKey: string; config: BookConfig }> = ({ boo
</div>
<div className='flex h-full items-center justify-end'>
<Dropdown
className='dropdown-bottom dropdown-end'
className='dropdown-bottom dropdown-end absolute right-[7%]'
buttonClassName='btn btn-ghost h-8 min-h-8 w-8 p-0'
toggleButton={<PiDotsThreeVerticalBold size={16} />}
>
@@ -21,8 +21,6 @@ export const useProgressSync = (
const { user } = useAuth();
const view = getView(bookKey);
const config = getConfig(bookKey);
// flag to prevent accidental sync without first pulling the config
const configSynced = useRef(false);
const pushConfig = (bookKey: string, config: BookConfig | null) => {
if (!config || !user) return;
@@ -33,26 +31,13 @@ export const useProgressSync = (
);
syncConfigs([compressedConfig], bookHash, 'push');
};
const pullConfig = (bookKey: string) => {
if (!user) return;
const bookHash = bookKey.split('-')[0]!;
syncConfigs([], bookHash, 'pull');
};
const syncConfig = () => {
if (!configSynced.current) {
pullConfig(bookKey);
} else {
pushConfig(bookKey, config);
}
};
useEffect(() => {
if (!user) return;
pullConfig(bookKey);
const bookHash = bookKey.split('-')[0]!;
syncConfigs([], bookHash, 'pull');
return () => {
if (configSynced.current) {
pushConfig(bookKey, config);
}
pushConfig(bookKey, config);
};
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
@@ -61,19 +46,18 @@ export const useProgressSync = (
const syncTimeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);
useEffect(() => {
if (!config?.location || !user) return;
const now = Date.now();
const timeSinceLastSync = now - lastProgressSyncTime.current;
if (timeSinceLastSync > SYNC_PROGRESS_INTERVAL_SEC * 1000) {
if (configSynced.current && timeSinceLastSync > SYNC_PROGRESS_INTERVAL_SEC * 1000) {
lastProgressSyncTime.current = now;
syncConfig();
pushConfig(bookKey, config);
} else {
if (syncTimeoutRef.current) clearTimeout(syncTimeoutRef.current);
syncTimeoutRef.current = setTimeout(
() => {
lastProgressSyncTime.current = Date.now();
pushConfig(bookKey, config);
syncTimeoutRef.current = null;
syncConfig();
},
SYNC_PROGRESS_INTERVAL_SEC * 1000 - timeSinceLastSync,
);
@@ -82,9 +66,9 @@ export const useProgressSync = (
}, [config]);
// sync progress once when the book is opened
const configSynced = useRef(false);
useEffect(() => {
if (!configSynced.current && syncedConfigs) {
configSynced.current = true;
if (!configSynced.current && syncedConfigs?.length > 0) {
const syncedConfig = syncedConfigs.filter((c) => c.bookHash === bookKey.split('-')[0])[0];
if (syncedConfig) {
const newConfig = deserializeConfig(
@@ -93,6 +77,7 @@ export const useProgressSync = (
DEFAULT_BOOK_SEARCH_CONFIG,
);
setConfig(bookKey, { ...config, ...newConfig });
configSynced.current = true;
if ((syncedConfig.progress?.[1] ?? 0) > 0 && (config?.progress?.[1] ?? 0) > 0) {
const syncedFraction = syncedConfig.progress![0] / syncedConfig.progress![1];
const configFraction = config!.progress![0] / config!.progress![1];
+1 -1
View File
@@ -21,7 +21,7 @@ const Popup = ({
}) => (
<div>
<div
className={`triangle text-base-200 absolute z-40 ${triangleClassName}`}
className={`triangle text-base-200 absolute z-10 ${triangleClassName}`}
style={{
left:
trianglePosition?.dir === 'left'
+15 -18
View File
@@ -51,15 +51,14 @@ export function useSync(bookKey?: string) {
);
const [syncing, setSyncing] = useState(false);
// null means unsynced, empty array means synced no changes
const [syncResult, setSyncResult] = useState<SyncResult>({
books: null,
configs: null,
notes: null,
books: [],
configs: [],
notes: [],
});
const [syncedBooks, setSyncedBooks] = useState<Book[] | null>(null);
const [syncedConfigs, setSyncedConfigs] = useState<BookConfig[] | null>(null);
const [syncedNotes, setSyncedNotes] = useState<BookNote[] | null>(null);
const [syncedBooks, setSyncedBooks] = useState<Book[]>([]);
const [syncedConfigs, setSyncedConfigs] = useState<BookConfig[]>([]);
const [syncedNotes, setSyncedNotes] = useState<BookNote[]>([]);
const { syncClient } = useSyncContext();
@@ -77,11 +76,11 @@ export function useSync(bookKey?: string) {
try {
const result = await syncClient.pullChanges(since, type, bookId);
setSyncResult({ ...syncResult, [type]: result[type] });
const records = result[type];
if (!records?.length) return;
const maxTime = computeMaxTimestamp(records);
if (!records.length) return;
const maxTime = computeMaxTimestamp(result[type]);
setLastSyncedAt(maxTime);
setSyncResult(result);
switch (type) {
case 'books':
settings.lastSyncedAtBooks = maxTime;
@@ -170,18 +169,16 @@ export function useSync(bookKey?: string) {
useEffect(() => {
if (!syncing && syncResult) {
const { books: dbBooks, configs: dbBookConfigs, notes: dbBookNotes } = syncResult;
const books = dbBooks?.map((dbBook) =>
transformsFromDB['books'](dbBook as unknown as DBBook),
);
const configs = dbBookConfigs?.map((dbBookConfig) =>
const books = dbBooks.map((dbBook) => transformsFromDB['books'](dbBook as unknown as DBBook));
const configs = dbBookConfigs.map((dbBookConfig) =>
transformsFromDB['configs'](dbBookConfig as unknown as DBBookConfig),
);
const notes = dbBookNotes?.map((dbBookNote) =>
const notes = dbBookNotes.map((dbBookNote) =>
transformsFromDB['notes'](dbBookNote as unknown as DBBookNote),
);
if (books) setSyncedBooks(books);
if (configs) setSyncedConfigs(configs);
if (notes) setSyncedNotes(notes);
if (books.length) setSyncedBooks(books);
if (configs.length) setSyncedConfigs(configs);
if (notes.length) setSyncedNotes(notes);
}
}, [syncResult, syncing]);
+3 -3
View File
@@ -18,9 +18,9 @@ interface BookConfigRecord extends BookDataRecord, BookConfig {}
interface BookNoteRecord extends BookDataRecord, BookNote {}
export interface SyncResult {
books: BookRecord[] | null;
notes: BookNoteRecord[] | null;
configs: BookConfigRecord[] | null;
books: BookRecord[];
notes: BookNoteRecord[];
configs: BookConfigRecord[];
}
export interface SyncData {
-1
View File
@@ -6,7 +6,6 @@
--background: #ffffff;
--foreground: #171717;
border-radius: 10px;
scrollbar-gutter: auto !important;
}
@media (prefers-color-scheme: dark) {
+4 -8
View File
@@ -35,8 +35,7 @@ const getFontStyles = (
const getAdditionalFontFaces = () => `
@font-face {
font-family: "FangSong";
font-display: swap;
src: local("Fang Song"), local("FangSong"), local("Noto Serif CJK"), url("https://db.onlinewebfonts.com/t/2ecbfe1d9bfc191c6f15c0ccc23cbd43.eot");
src: url("https://db.onlinewebfonts.com/t/2ecbfe1d9bfc191c6f15c0ccc23cbd43.eot");
src: url("https://db.onlinewebfonts.com/t/2ecbfe1d9bfc191c6f15c0ccc23cbd43.eot?#iefix") format("embedded-opentype"),
url("https://db.onlinewebfonts.com/t/2ecbfe1d9bfc191c6f15c0ccc23cbd43.woff2") format("woff2"),
url("https://db.onlinewebfonts.com/t/2ecbfe1d9bfc191c6f15c0ccc23cbd43.woff") format("woff"),
@@ -45,8 +44,7 @@ const getAdditionalFontFaces = () => `
}
@font-face {
font-family: "Kaiti";
font-display: swap;
src: local("Kai"), local("KaiTi"), local("AR PL UKai"), url("https://db.onlinewebfonts.com/t/1ee9941f1b8c128110ca4307dda59917.eot");
src: url("https://db.onlinewebfonts.com/t/1ee9941f1b8c128110ca4307dda59917.eot");
src: url("https://db.onlinewebfonts.com/t/1ee9941f1b8c128110ca4307dda59917.eot?#iefix")format("embedded-opentype"),
url("https://db.onlinewebfonts.com/t/1ee9941f1b8c128110ca4307dda59917.woff2")format("woff2"),
url("https://db.onlinewebfonts.com/t/1ee9941f1b8c128110ca4307dda59917.woff")format("woff"),
@@ -55,8 +53,7 @@ const getAdditionalFontFaces = () => `
}
@font-face {
font-family: "Heiti";
font-display: swap;
src: local("Hei"), local("SimHei"), local("WenQuanYi Zen Hei"), url("https://db.onlinewebfonts.com/t/a4948b9d43a91468825a5251df1ec58d.eot");
src: url("https://db.onlinewebfonts.com/t/a4948b9d43a91468825a5251df1ec58d.eot");
src: url("https://db.onlinewebfonts.com/t/a4948b9d43a91468825a5251df1ec58d.eot?#iefix")format("embedded-opentype"),
url("https://db.onlinewebfonts.com/t/a4948b9d43a91468825a5251df1ec58d.woff2")format("woff2"),
url("https://db.onlinewebfonts.com/t/a4948b9d43a91468825a5251df1ec58d.woff")format("woff"),
@@ -65,8 +62,7 @@ const getAdditionalFontFaces = () => `
}
@font-face {
font-family: "XiHeiti";
font-display: swap;
src: local("PingFang SC"), local("Microsoft YaHei"), local("WenQuanYi Micro Hei"), url("https://db.onlinewebfonts.com/t/4f0b783ba4a1b381fc7e7af81ecab481.eot");
src: url("https://db.onlinewebfonts.com/t/4f0b783ba4a1b381fc7e7af81ecab481.eot");
src: url("https://db.onlinewebfonts.com/t/4f0b783ba4a1b381fc7e7af81ecab481.eot?#iefix")format("embedded-opentype"),
url("https://db.onlinewebfonts.com/t/4f0b783ba4a1b381fc7e7af81ecab481.woff2")format("woff2"),
url("https://db.onlinewebfonts.com/t/4f0b783ba4a1b381fc7e7af81ecab481.woff")format("woff"),