forked from akai/readest
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 02d005dae7 |
@@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
name: Report a bug
|
||||||
|
about: Report a bug or a functional regression
|
||||||
|
title: 'Ex: In DarkMode, a blank square appears in bottom right corner while scrolling'
|
||||||
|
labels: ['type: bug']
|
||||||
|
assignees: ''
|
||||||
|
---
|
||||||
|
|
||||||
|
## Bug Description
|
||||||
|
|
||||||
|
A clear and concise description of what the current behavior is.
|
||||||
|
Please also add **screenshots** of the existing application.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```
|
||||||
|
In DarkMode, when scrollbar are displayed (for example on Companies page, with enough companies in the list), we see a blank square in the bottom right corner
|
||||||
|
[screenshot]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Expected behavior
|
||||||
|
|
||||||
|
A clear and concise description of what the expected behavior is.
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```
|
||||||
|
The blank square should be transparent (invisible)
|
||||||
|
```
|
||||||
|
|
||||||
|
## Technical inputs
|
||||||
|
|
||||||
|
**Example:**
|
||||||
|
|
||||||
|
```
|
||||||
|
- We are displaying custom scrollbars that disappear when the user is not scrolling. See ScrollWrapper.
|
||||||
|
- Probably fixable with CSS
|
||||||
|
```
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
name: Release Readest
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
create-release:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
release_id: ${{ steps.create-release.outputs.result }}
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: setup node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
- name: get version
|
||||||
|
run: echo "PACKAGE_VERSION=$(node -p "require('./apps/readest-app/package.json').version")" >> $GITHUB_ENV
|
||||||
|
- name: create release
|
||||||
|
id: create-release
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const { data } = await github.rest.repos.getLatestRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
})
|
||||||
|
return data.id
|
||||||
|
|
||||||
|
build-tauri:
|
||||||
|
needs: create-release
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
config:
|
||||||
|
- os: ubuntu-latest
|
||||||
|
arch: x86_64
|
||||||
|
rust_target: x86_64-unknown-linux-gnu
|
||||||
|
- os: macos-latest
|
||||||
|
arch: aarch64
|
||||||
|
rust_target: x86_64-apple-darwin,aarch64-apple-darwin
|
||||||
|
- os: windows-latest
|
||||||
|
arch: x86_64
|
||||||
|
rust_target: x86_64-pc-windows-msvc
|
||||||
|
|
||||||
|
runs-on: ${{ matrix.config.os }}
|
||||||
|
timeout-minutes: 30
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: initialize git submodules
|
||||||
|
run: git submodule update --init --recursive
|
||||||
|
|
||||||
|
- name: Setup pnpm
|
||||||
|
uses: pnpm/action-setup@v4
|
||||||
|
with:
|
||||||
|
version: 9.14.4
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v3
|
||||||
|
with:
|
||||||
|
node-version: 22
|
||||||
|
cache: pnpm
|
||||||
|
|
||||||
|
- name: install dependencies
|
||||||
|
run: pnpm install
|
||||||
|
|
||||||
|
- name: copy pdfjs-dist to public directory
|
||||||
|
run: pnpm --filter @readest/readest-app setup-pdfjs
|
||||||
|
|
||||||
|
- name: install Rust stable
|
||||||
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
with:
|
||||||
|
targets: ${{ matrix.config.rust_target }}
|
||||||
|
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: ${{ matrix.config.os }}-cargo-${{ hashFiles('apps/readest-app/src-tauri/Cargo.lock') }}
|
||||||
|
workspaces: apps/readest-app/src-tauri -> target
|
||||||
|
|
||||||
|
- name: install dependencies (ubuntu only)
|
||||||
|
if: matrix.config.os == 'ubuntu-latest'
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
|
||||||
|
- name: Create .env.local file for Next.js
|
||||||
|
run: |
|
||||||
|
echo "NEXT_PUBLIC_POSTHOG_KEY=${{ vars.NEXT_PUBLIC_POSTHOG_KEY }}" >> .env.local
|
||||||
|
echo "NEXT_PUBLIC_POSTHOG_HOST=${{ vars.NEXT_PUBLIC_POSTHOG_HOST }}" >> .env.local
|
||||||
|
echo "NEXT_PUBLIC_DEEPL_API_KEY=${{ vars.NEXT_PUBLIC_DEEPL_API_KEY }}" >> .env.local
|
||||||
|
|
||||||
|
- name: Copy .env.local to apps/readest-app
|
||||||
|
run: cp .env.local apps/readest-app
|
||||||
|
|
||||||
|
- uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
|
||||||
|
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
|
||||||
|
APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }}
|
||||||
|
APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }}
|
||||||
|
APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }}
|
||||||
|
APPLE_ID: ${{ secrets.APPLE_ID }}
|
||||||
|
APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }}
|
||||||
|
APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }}
|
||||||
|
with:
|
||||||
|
projectPath: apps/readest-app
|
||||||
|
releaseId: ${{ needs.create-release.outputs.release_id }}
|
||||||
|
args: ${{ matrix.config.os == 'macos-latest' && '--target universal-apple-darwin' || '' }}
|
||||||
|
|
||||||
|
publish-release:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [create-release, build-tauri]
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: publish release
|
||||||
|
id: publish-release
|
||||||
|
uses: actions/github-script@v6
|
||||||
|
env:
|
||||||
|
release_id: ${{ needs.create-release.outputs.release_id }}
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
github.rest.repos.updateRelease({
|
||||||
|
owner: context.repo.owner,
|
||||||
|
repo: context.repo.repo,
|
||||||
|
release_id: process.env.release_id,
|
||||||
|
draft: false,
|
||||||
|
prerelease: false
|
||||||
|
})
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
[submodule "packages/foliate-js"]
|
[submodule "packages/foliate-js"]
|
||||||
path = packages/foliate-js
|
path = packages/foliate-js
|
||||||
url = git@github.com:johnfactotum/foliate-js.git
|
url = https://github.com/chrox/foliate-js.git
|
||||||
[submodule "packages/tauri"]
|
[submodule "packages/tauri"]
|
||||||
path = packages/tauri
|
path = packages/tauri
|
||||||
url = git@github.com:chrox/tauri.git
|
url = https://github.com/chrox/tauri.git
|
||||||
|
|||||||
@@ -6,34 +6,16 @@ extern crate cocoa;
|
|||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate objc;
|
extern crate objc;
|
||||||
|
|
||||||
|
#[cfg(target_os = "macos")]
|
||||||
|
mod menu;
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
mod tauri_traffic_light_positioner_plugin;
|
mod tauri_traffic_light_positioner_plugin;
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
use {
|
use tauri::TitleBarStyle;
|
||||||
tauri::menu::{SubmenuBuilder, HELP_SUBMENU_ID},
|
|
||||||
tauri::TitleBarStyle,
|
|
||||||
tauri_plugin_shell::ShellExt,
|
|
||||||
};
|
|
||||||
|
|
||||||
use tauri::{WebviewUrl, WebviewWindowBuilder};
|
use tauri::{WebviewUrl, WebviewWindowBuilder};
|
||||||
|
|
||||||
fn handle_menu_event(app: &tauri::AppHandle, event: &tauri::menu::MenuEvent) {
|
|
||||||
if event.id() == "privacy_policy" {
|
|
||||||
if let Err(e) = app.shell().open("https://readest.com/privacy-policy", None) {
|
|
||||||
eprintln!("Failed to open privacy policy: {}", e);
|
|
||||||
}
|
|
||||||
} else if event.id() == "report_issue" {
|
|
||||||
if let Err(e) = app.shell().open("mailto:support@bilingify.com", None) {
|
|
||||||
eprintln!("Failed to open mail client: {}", e);
|
|
||||||
}
|
|
||||||
} else if event.id() == "readest_help" {
|
|
||||||
if let Err(e) = app.shell().open("https://readest.com/support", None) {
|
|
||||||
eprintln!("Failed to open support page: {}", e);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
#[cfg_attr(mobile, tauri::mobile_entry_point)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
let builder = tauri::Builder::default()
|
let builder = tauri::Builder::default()
|
||||||
@@ -75,24 +57,7 @@ pub fn run() {
|
|||||||
win_builder.build().unwrap();
|
win_builder.build().unwrap();
|
||||||
|
|
||||||
#[cfg(target_os = "macos")]
|
#[cfg(target_os = "macos")]
|
||||||
{
|
menu::setup_macos_menu(&app.handle())?;
|
||||||
let global_menu = app.menu().unwrap();
|
|
||||||
if let Some(item) = global_menu.get(HELP_SUBMENU_ID) {
|
|
||||||
global_menu.remove(&item)?;
|
|
||||||
}
|
|
||||||
global_menu.append(
|
|
||||||
&SubmenuBuilder::new(app, "Help")
|
|
||||||
.text("privacy_policy", "Privacy Policy")
|
|
||||||
.separator()
|
|
||||||
.text("report_issue", "Report An Issue...")
|
|
||||||
.text("readest_help", "Readest Help")
|
|
||||||
.build()?,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
app.on_menu_event(move |app, event| {
|
|
||||||
handle_menu_event(app, &event);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
use tauri::menu::MenuEvent;
|
||||||
|
use tauri::menu::{SubmenuBuilder, HELP_SUBMENU_ID};
|
||||||
|
use tauri::AppHandle;
|
||||||
|
use tauri_plugin_shell::ShellExt;
|
||||||
|
|
||||||
|
pub fn setup_macos_menu(app: &AppHandle) -> tauri::Result<()> {
|
||||||
|
let global_menu = app.menu().unwrap();
|
||||||
|
|
||||||
|
if let Some(item) = global_menu.get(HELP_SUBMENU_ID) {
|
||||||
|
global_menu.remove(&item)?;
|
||||||
|
}
|
||||||
|
|
||||||
|
global_menu.append(
|
||||||
|
&SubmenuBuilder::new(app, "Help")
|
||||||
|
.text("privacy_policy", "Privacy Policy")
|
||||||
|
.separator()
|
||||||
|
.text("report_issue", "Report An Issue...")
|
||||||
|
.text("readest_help", "Readest Help")
|
||||||
|
.build()?,
|
||||||
|
)?;
|
||||||
|
|
||||||
|
app.on_menu_event(|app, event| {
|
||||||
|
handle_menu_event(app, &event);
|
||||||
|
});
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn handle_menu_event(app: &AppHandle, event: &MenuEvent) {
|
||||||
|
if event.id() == "privacy_policy" {
|
||||||
|
if let Err(e) = app.shell().open("https://readest.com/privacy-policy", None) {
|
||||||
|
eprintln!("Failed to open privacy policy: {}", e);
|
||||||
|
}
|
||||||
|
} else if event.id() == "report_issue" {
|
||||||
|
if let Err(e) = app.shell().open("mailto:support@bilingify.com", None) {
|
||||||
|
eprintln!("Failed to open mail client: {}", e);
|
||||||
|
}
|
||||||
|
} else if event.id() == "readest_help" {
|
||||||
|
if let Err(e) = app.shell().open("https://readest.com/support", None) {
|
||||||
|
eprintln!("Failed to open support page: {}", e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -56,7 +56,7 @@
|
|||||||
"requireLiteralLeadingDot": false
|
"requireLiteralLeadingDot": false
|
||||||
},
|
},
|
||||||
"updater": {
|
"updater": {
|
||||||
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IDNDMDdERDIyMTQ1QzE5NUQKUldSZEdWd1VJdDBIUE50UXVDeHZtUXVyb1lnNUtVUFVKS0Fva2FDRVc0K0NubWpmajlxY2I1bCsK",
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEU0OTAxMURGQkUzQjFENTQKUldSVUhUdSszeEdRNUExdmFkWnlvYWNYNG5wamkxMmUxRk5SejlMOTJVd28yNXlVTDh6Wld4OC8K",
|
||||||
"endpoints": ["https://github.com/chrox/readest/releases/latest/download/latest.json"]
|
"endpoints": ["https://github.com/chrox/readest/releases/latest/download/latest.json"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "@sindresorhus/tsconfig",
|
"extends": "@sindresorhus/tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
|
"target": "ES2022",
|
||||||
"lib": [
|
"lib": [
|
||||||
"dom",
|
"dom",
|
||||||
"dom.iterable",
|
"dom.iterable",
|
||||||
|
|||||||
Generated
+5
-17
@@ -10,7 +10,7 @@ importers:
|
|||||||
devDependencies:
|
devDependencies:
|
||||||
'@sindresorhus/tsconfig':
|
'@sindresorhus/tsconfig':
|
||||||
specifier: ^6.0.0
|
specifier: ^6.0.0
|
||||||
version: 7.0.0
|
version: 6.0.0
|
||||||
cross-env:
|
cross-env:
|
||||||
specifier: ^7.0.3
|
specifier: ^7.0.3
|
||||||
version: 7.0.3
|
version: 7.0.3
|
||||||
@@ -610,8 +610,8 @@ packages:
|
|||||||
'@rushstack/eslint-patch@1.10.4':
|
'@rushstack/eslint-patch@1.10.4':
|
||||||
resolution: {integrity: sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==}
|
resolution: {integrity: sha512-WJgX9nzTqknM393q1QJDJmoW28kUfEnybeTfVNcNAPnIx210RXm2DiXiHzfNPJNIUUb1tJnz/l4QGtJ30PgWmA==}
|
||||||
|
|
||||||
'@sindresorhus/tsconfig@7.0.0':
|
'@sindresorhus/tsconfig@6.0.0':
|
||||||
resolution: {integrity: sha512-i5K04hLAP44Af16zmDjG07E1NHuDgCM07SJAT4gY0LZSRrWYzwt4qkLem6TIbIVh0k51RkN2bF+lP+lM5eC9fw==}
|
resolution: {integrity: sha512-+fUdfuDd/7O2OZ9/UvJy76IEWn2Tpvm2l+rwUoS2Yz4jCUTSNOQQv2PLWrwekt8cPLwHmpHaBpay34bkBmVl2Q==}
|
||||||
engines: {node: '>=18'}
|
engines: {node: '>=18'}
|
||||||
|
|
||||||
'@swc/counter@0.1.3':
|
'@swc/counter@0.1.3':
|
||||||
@@ -747,9 +747,6 @@ packages:
|
|||||||
resolution: {integrity: sha512-tJxahnjm9dEI1X+hQSC5f2BSd/coZaqbIl1m3TCl0q9SVuC52XcXfV0XmoCU1+PmjyucuVITwoTnN8OlTbEXXA==}
|
resolution: {integrity: sha512-tJxahnjm9dEI1X+hQSC5f2BSd/coZaqbIl1m3TCl0q9SVuC52XcXfV0XmoCU1+PmjyucuVITwoTnN8OlTbEXXA==}
|
||||||
deprecated: This is a stub types definition for localforage (https://github.com/localForage/localForage). localforage provides its own type definitions, so you don't need @types/localforage installed!
|
deprecated: This is a stub types definition for localforage (https://github.com/localForage/localForage). localforage provides its own type definitions, so you don't need @types/localforage installed!
|
||||||
|
|
||||||
'@types/node@20.17.9':
|
|
||||||
resolution: {integrity: sha512-0JOXkRyLanfGPE2QRCwgxhzlBAvaRdCNMcvbd7jFfpmD4eEXll7LRwy5ymJmyeZqk7Nh7eD2LeUyQ68BbndmXw==}
|
|
||||||
|
|
||||||
'@types/node@22.10.1':
|
'@types/node@22.10.1':
|
||||||
resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==}
|
resolution: {integrity: sha512-qKgsUwfHZV2WCWLAnVP1JqnpE6Im6h3Y0+fYgMTasNQ7V++CBX5OT1as0g0f+OyubbFqhf6XVNIsmN4IIhEgGQ==}
|
||||||
|
|
||||||
@@ -3496,9 +3493,6 @@ packages:
|
|||||||
unbox-primitive@1.0.2:
|
unbox-primitive@1.0.2:
|
||||||
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==}
|
||||||
|
|
||||||
undici-types@6.19.8:
|
|
||||||
resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==}
|
|
||||||
|
|
||||||
undici-types@6.20.0:
|
undici-types@6.20.0:
|
||||||
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
|
resolution: {integrity: sha512-Ny6QZ2Nju20vw1SRHe3d9jVu6gJ+4e3+MMpqu7pqE5HT6WsTSlce++GQmK5UXS8mzV8DSYHrQH+Xrf2jVcuKNg==}
|
||||||
|
|
||||||
@@ -3940,7 +3934,7 @@ snapshots:
|
|||||||
|
|
||||||
'@rushstack/eslint-patch@1.10.4': {}
|
'@rushstack/eslint-patch@1.10.4': {}
|
||||||
|
|
||||||
'@sindresorhus/tsconfig@7.0.0': {}
|
'@sindresorhus/tsconfig@6.0.0': {}
|
||||||
|
|
||||||
'@swc/counter@0.1.3': {}
|
'@swc/counter@0.1.3': {}
|
||||||
|
|
||||||
@@ -4055,10 +4049,6 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
localforage: 1.10.0
|
localforage: 1.10.0
|
||||||
|
|
||||||
'@types/node@20.17.9':
|
|
||||||
dependencies:
|
|
||||||
undici-types: 6.19.8
|
|
||||||
|
|
||||||
'@types/node@22.10.1':
|
'@types/node@22.10.1':
|
||||||
dependencies:
|
dependencies:
|
||||||
undici-types: 6.20.0
|
undici-types: 6.20.0
|
||||||
@@ -6255,7 +6245,7 @@ snapshots:
|
|||||||
|
|
||||||
jest-worker@27.5.1:
|
jest-worker@27.5.1:
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/node': 20.17.9
|
'@types/node': 22.10.1
|
||||||
merge-stream: 2.0.0
|
merge-stream: 2.0.0
|
||||||
supports-color: 8.1.1
|
supports-color: 8.1.1
|
||||||
|
|
||||||
@@ -7474,8 +7464,6 @@ snapshots:
|
|||||||
has-symbols: 1.0.3
|
has-symbols: 1.0.3
|
||||||
which-boxed-primitive: 1.0.2
|
which-boxed-primitive: 1.0.2
|
||||||
|
|
||||||
undici-types@6.19.8: {}
|
|
||||||
|
|
||||||
undici-types@6.20.0: {}
|
undici-types@6.20.0: {}
|
||||||
|
|
||||||
union-value@1.0.1:
|
union-value@1.0.1:
|
||||||
|
|||||||
Reference in New Issue
Block a user